From owner-svn-src-user@FreeBSD.ORG Fri Jun 8 08:26:53 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 28522106566B; Fri, 8 Jun 2012 08:26:53 +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 083CD8FC0A; Fri, 8 Jun 2012 08:26:53 +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 q588QqTv042855; Fri, 8 Jun 2012 08:26:52 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q588QqYf042852; Fri, 8 Jun 2012 08:26:52 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201206080826.q588QqYf042852@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Fri, 8 Jun 2012 08:26:52 +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: r236740 - in user/des/fbce/root: static 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: Fri, 08 Jun 2012 08:26:53 -0000 Author: des Date: Fri Jun 8 08:26:52 2012 New Revision: 236740 URL: http://svn.freebsd.org/changeset/base/236740 Log: Move info and error messages out of the form (and table) and into their own div, with appropriate styling. Clean up the JavaScript code a little; most importantly, use global variables to avoid unnecessary getElementById() calls. Disable the submit button if too many boxes are checked. Remove the cancel button; it is useless and confusing. Modified: user/des/fbce/root/static/fbce.css user/des/fbce/root/vote/index.tt Modified: user/des/fbce/root/static/fbce.css ============================================================================== --- user/des/fbce/root/static/fbce.css Fri Jun 8 08:23:55 2012 (r236739) +++ user/des/fbce/root/static/fbce.css Fri Jun 8 08:26:52 2012 (r236740) @@ -101,6 +101,16 @@ th { overflow: auto; } +.info { + color: green; + font-weight: bold; +} + +.error { + color: red; + font-weight: bold; +} + /* * Footer */ @@ -131,6 +141,14 @@ th { } /* + * Voting + */ +.vote .votebox { + width: 2ex; + text-align: center; +} + +/* * Login page */ .loginform { Modified: user/des/fbce/root/vote/index.tt ============================================================================== --- user/des/fbce/root/vote/index.tt Fri Jun 8 08:23:55 2012 (r236739) +++ user/des/fbce/root/vote/index.tt Fri Jun 8 08:26:52 2012 (r236740) @@ -1,28 +1,36 @@ [% WRAPPER lib/html_top %] @@ -39,40 +47,35 @@

There are no candidates to vote for.

[% ELSE %]

You may vote for up to [% max_votes %] candidates from the list below. You can modify your vote at any time until voting closes (see the schedule on the front page).

+ [% IF vote_ok.defined %] +
+

Your vote was registered. You may change it at any time until voting closes.

+
+ [% END %] + [% IF error.defined %] +
+

[% error | html %]

+
+ [% END %]
- [% IF vote_ok.defined %] - - - - [% END %] - [% IF error.defined %] - - - - [% END %] [% WHILE (candidate = candidates.next) %] [% login = candidate.login %] - + [% END %] - +
-

Your vote was registered. You may change it at any time until voting closes.

-
-

[% error | html %]

-
[% candidate.statement.short | html %]
XX votes cast

- - +