Make variables for name of committee running election and its email address.

GNOME's Election committee was previously hard-code here, but the code is
more reusable if it is no longer hard-coded.  The variables still default to
GNOME's details, but can be overridden with the configuration file.
This commit is contained in:
Bradley M. Kuhn 2013-12-18 17:26:15 -05:00
parent 3fe51fca2d
commit f3fab42403
5 changed files with 18 additions and 4 deletions

View file

@ -123,9 +123,12 @@ if ($display) {
}
global $committee_name;
global $committee_email;
if (isset ($error) && $error != "") {
echo "".$error."\n";
echo "<p>If you don't understand the error, you should probably contact the Membership and Elections Committee, which can be reached at <a href=\"mailto:elections@gnome.org\">elections@gnome.org</a>.</p>\n";
echo "<p>If you don't understand the error, you should probably contact the $committee_name, which can be reached at <a href=\"mailto:elections@gnome.org\">$committee_email</a>.</p>\n";
}
if (isset ($handle))

View file

@ -14,6 +14,8 @@ $tmp_tokens_table = "election_tmp_tokens";
$votes_table = "election_votes";
$members_table = "foundationmembers";
$results_table = "election_results";
$committee_email = "elections@gnome.org";
$committee_name = "the Membership and Elections Committee";
if (is_readable ("include/localconfig.php")) {
/* You can use such a file to have a local config for testing purpose. */

View file

@ -63,9 +63,12 @@ if ($display) {
echo "<p>Please look at the <a href=\"votes.php?election_id=".rawurlencode($election_id)."\">list of all votes</a> and verify that your vote is correct.</p>\n";
}
global $committee_name;
global $committee_email;
if (isset ($error) && $error != "") {
echo "<div class=\"error\">".$error."</div>\n";;
echo "<p>If you don't understand the error, you should probably contact the Membership and Elections Committee, which can be reached at <a href=\"mailto:elections@gnome.org\">elections@gnome.org</a>.</p>\n";
echo "<p>If you don't understand the error, you should probably contact the $committee_name, which can be reached at <a href=\"mailto:$committee_email\">$committee_email</a>.</p>\n";
}
if (isset ($handle))

View file

@ -260,9 +260,12 @@ if ($step == 4) {
if (isset ($handle))
elec_sql_close ($handle);
global $committee_name;
global $committee_email;
if (isset ($error) && $error != "") {
echo "<div class=\"error\">".$error."</div>\n";;
echo "<p>If you don't understand the error, you should probably contact the Elections Committee, which can be reached at <a href=\"mailto:elections@sfconservancy.org\">elections@sfconservancy.org</a>.</p>\n";
echo "<p>If you don't understand the error, you should probably contact the $committee_name, which can be reached at <a href=\"mailto:$committee_email\">$committee_email</a>.</p>\n";
}
if ($step != $max_step && $step >= 1) {

View file

@ -113,9 +113,12 @@ if ($display) {
echo "</table>\n";
}
global $committee_name;
global $committee_email;
if (isset ($error) && $error != "") {
echo "<div class=\"error\">".$error."</div>\n";;
echo "<p>If you don't understand the error, you should probably contact the Membership and Elections Committee, which can be reached at <a href=\"mailto:elections@gnome.org\">elections@gnome.org</a>.</p>\n";
echo "<p>If you don't understand the error, you should probably contact the $committee_name, which can be reached at <a href=\"mailto:$committee_email\">$committee_email</a>.</p>\n";
}
if (isset ($handle))