From owner-svn-src-user@FreeBSD.ORG Mon May 21 23:48:28 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 059C2106566B; Mon, 21 May 2012 23:48:28 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E41A28FC14; Mon, 21 May 2012 23:48:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4LNmR4l078802; Mon, 21 May 2012 23:48:27 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4LNmR1m078796; Mon, 21 May 2012 23:48:27 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201205212348.q4LNmR1m078796@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Mon, 21 May 2012 23:48:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235759 - in user/des/fbce/root: run vote X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2012 23:48:28 -0000 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 %] +

You are not qualified to run in the election. If you believe this is incorrect, please contact the election administrator.

+[% ELSIF nominating == 0 %]
-
- Slogan - -
-
- Statement - +

Slogan

+ +

Statement (WikiFormat)

+
- WikiFormat syntax 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 %] +

You are not qualified to run in the election. If you believe this is incorrect, please contact the election administrator.

+[% ELSIF user.statement.defined %]

You have registered as a candidate in the 2010 FreeBSD Core Team election. You have provided the following statement:

@@ -13,14 +15,11 @@ [% user.statement.long_html %]
-[% END %] - -[% IF nominating == 0 %] - [% IF user.statement.defined %] + [% IF nominating == 0 %]

You can edit your statement or withdraw your candidacy.

- [% ELSE %] -

You can register your candidacy in the 2010 FreeBSD Core Team election.

[% END %] +[% ELSIF nominating == 0 %] +

You can register your candidacy in the election.

[% 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 %] +

You are not qualified to run in the election. If you believe this is incorrect, please contact the election administrator.

+[% ELSIF nominating == 0 %]

To register as a candidate in the election, enter the following information:

  • A short slogan which will appear next to your name on the list of candidates and at the top of your candidate page;
  • A longer statement about your background, why you are running and what you intend to do if elected.
+

If you have a Gravatar, it will appear next to your statement.

Slogan

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 %] +

You are not qualified to run in the election. If you believe this is incorrect, please contact the election administrator.

+[% ELSIF !user.statement.defined %] +

You have not registered as a candidate.

+[% ELSE %]

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.

+[% 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 %] +

You are not qualified to vote in the election. If you believe this is incorrect, please contact the election administrator.

+[% ELSIF voting == 0 %] [% IF candidates.count == 0 %]

There are no candidates to vote for.

[% ELSE %] @@ -54,7 +57,7 @@ [% login = candidate.login %] - + [% candidate.statement.short | html %] [% END %]