svn commit: r235759 - in user/des/fbce/root: run vote

Dag-Erling Smorgrav des at FreeBSD.org
Mon May 21 23:48:28 UTC 2012


Author: des
Date: Mon May 21 23:48:27 2012
New Revision: 235759
URL: http://svn.freebsd.org/changeset/base/235759

Log:
  Add checks for active / inactive users.

Modified:
  user/des/fbce/root/run/edit.tt
  user/des/fbce/root/run/index.tt
  user/des/fbce/root/run/register.tt
  user/des/fbce/root/run/withdraw.tt
  user/des/fbce/root/vote/index.tt

Modified: user/des/fbce/root/run/edit.tt
==============================================================================
--- user/des/fbce/root/run/edit.tt	Mon May 21 23:48:09 2012	(r235758)
+++ user/des/fbce/root/run/edit.tt	Mon May 21 23:48:27 2012	(r235759)
@@ -4,18 +4,16 @@
 
 [% PROCESS run/when %]
 
-[% IF nominating == 0 %]
+[% IF !user.active %]
+<p>You are not qualified to run in the election.  If you believe this is incorrect, please contact the election administrator.</p>
+[% ELSIF nominating == 0 %]
 <form method="post" action="">
-  <fieldset>
-    <legend>Slogan</legend>
-    <input name="short" size="80" maxlength="64" value="[% short | html %]"/>
-  </fieldset>
-  <fieldset>
-    <legend>Statement</legend>
-    <textarea name="long" cols="80" rows="24">[% long | html %]</textarea>
+  <p>Slogan</p>
+  <input name="short" size="80" maxlength="64" value="[% short | html %]"/>
+  <p>Statement (<a href="http://search.cpan.org/~chromatic/Text-WikiFormat-0.79/lib/Text/WikiFormat.pm#Wiki_Format">WikiFormat</a>)</p> 
+  <textarea name="long" cols="80" rows="24">[% long | html %]</textarea>
   </fieldset>
   <div>
-    <span class="help"><a href="http://search.cpan.org/~chromatic/Text-WikiFormat-0.79/lib/Text/WikiFormat.pm#Wiki_Format">WikiFormat syntax</a></span>
     <input type="submit" name="submit" value="Update my statement!"/>
     <input type="submit" name="cancel" value="No, I'm fine."/>
     <input type="reset" value="Undo"/>

Modified: user/des/fbce/root/run/index.tt
==============================================================================
--- user/des/fbce/root/run/index.tt	Mon May 21 23:48:09 2012	(r235758)
+++ user/des/fbce/root/run/index.tt	Mon May 21 23:48:27 2012	(r235759)
@@ -4,7 +4,9 @@
 
 [% PROCESS run/when %]
 
-[% IF user.statement.defined %]
+[% IF !user.active %]
+<p>You are not qualified to run in the election.  If you believe this is incorrect, please contact the election administrator.</p>
+[% ELSIF user.statement.defined %]
 <p>You have registered as a candidate in the 2010 FreeBSD Core Team election.  You have provided the following statement:</p>
 
 <div class="statement"> 
@@ -13,14 +15,11 @@
     [% user.statement.long_html %]
   </div>
 </div>
-[% END %]
-
-[% IF nominating == 0 %]
-  [% IF user.statement.defined %]
+  [% IF nominating == 0 %]
 <p>You can <a href="[% c.uri_for('/run/edit') | html %]">edit your statement</a> or <a href="[% c.uri_for('/run/withdraw') | html %]">withdraw your candidacy</a>.</p>
-  [% ELSE %]
-<p>You can <a href="[% c.uri_for('/run/register') | html %]">register your candidacy</a> in the 2010 FreeBSD Core Team election.</p>
   [% END %]
+[% ELSIF nominating == 0 %]
+<p>You can <a href="[% c.uri_for('/run/register') | html %]">register your candidacy</a> in the election.</p>
 [% END %]
 
 [% END %]

Modified: user/des/fbce/root/run/register.tt
==============================================================================
--- user/des/fbce/root/run/register.tt	Mon May 21 23:48:09 2012	(r235758)
+++ user/des/fbce/root/run/register.tt	Mon May 21 23:48:27 2012	(r235759)
@@ -4,12 +4,15 @@
 
 [% PROCESS run/when %]
 
-[% IF nominating == 0 %]
+[% IF !user.active %]
+<p>You are not qualified to run in the election.  If you believe this is incorrect, please contact the election administrator.</p>
+[% ELSIF nominating == 0 %]
 <p>To register as a candidate in the election, enter the following information:</p>
 <ul>
   <li>A short slogan which will appear next to your name on the list of candidates and at the top of your candidate page;</li>
   <li>A longer statement about your background, why you are running and what you intend to do if elected.</li>
 </ul>
+<p>If you have a <a href="http://en.gravatar.com/">Gravatar</a>, it will appear next to your statement.</p>
 <form method="post" action="">
   <p>Slogan</p>
   <input name="short" size="80" maxlength="64" value="[% short | html %]"/>

Modified: user/des/fbce/root/run/withdraw.tt
==============================================================================
--- user/des/fbce/root/run/withdraw.tt	Mon May 21 23:48:09 2012	(r235758)
+++ user/des/fbce/root/run/withdraw.tt	Mon May 21 23:48:27 2012	(r235759)
@@ -2,12 +2,18 @@
 [% PROCESS lib/header %]
 [% WRAPPER lib/main %]
 
+[% IF !user.active %]
+<p>You are not qualified to run in the election.  If you believe this is incorrect, please contact the election administrator.</p>
+[% ELSIF !user.statement.defined %]
+<p>You have not registered as a candidate.</p>
+[% ELSE %]
 <p>Are you sure you want to withdraw your candidacy?  Note that your statement will be permanently deleted from the database; if you change your mind, you will have to start over.</p>
 
 <form method="post" action="">
   <input type="submit" name="submit" value="I'm outta here!"/>
   <input type="submit" name="cancel" value="No, I'll stay."/>
 </form>
+[% END %]
 
 [% END %]
 [% PROCESS lib/footer %]

Modified: user/des/fbce/root/vote/index.tt
==============================================================================
--- user/des/fbce/root/vote/index.tt	Mon May 21 23:48:09 2012	(r235758)
+++ user/des/fbce/root/vote/index.tt	Mon May 21 23:48:27 2012	(r235759)
@@ -29,7 +29,10 @@
 [% WRAPPER lib/main %]
 
 [% PROCESS vote/when %]
-[% IF voting == 0 %]
+
+[% IF !user.active %]
+<p>You are not qualified to vote in the election.  If you believe this is incorrect, please contact the election administrator.</p>
+[% ELSIF voting == 0 %]
   [% IF candidates.count == 0 %]
   <p>There are no candidates to vote for.</p>
   [% ELSE %]
@@ -54,7 +57,7 @@
       [% login = candidate.login %]
       <tr>
 	<td><input type="checkbox" name="vote_for_[% login %]" id="vote_for_[% login %]"[% IF voted_for.$login %] checked="checked"[% END %] onclick="updateTotal()"/></td>
-	<td><label for="vote_for_[% login %]">[% candidate.name | html %]</label></td>
+	<td><label for="vote_for_[% login %]">[% candidate.name | html %]:</label></td>
 	<td><a href="[% c.uri_for('/see/candidate', login) | html %]">[% candidate.statement.short | html %]</a></td>
       </tr>
       [% END %]


More information about the svn-src-user mailing list