# HG changeset patch # User jbe # Date 1352404554 -3600 # Node ID e616d8f16f1477a9f33f957d0932539c0506d958 # Parent bb8b21241dab0816a3aa333b6ba228f9203e3e16 Force JavaScript test before voting; Removed unneccessary "preview2" mechanism in voting script diff -r bb8b21241dab -r e616d8f16f14 app/main/vote/_action/update.lua --- a/app/main/vote/_action/update.lua Thu Nov 08 15:32:57 2012 +0100 +++ b/app/main/vote/_action/update.lua Thu Nov 08 20:55:54 2012 +0100 @@ -3,7 +3,7 @@ local issue = Issue:new_selector():add_where{ "id = ?", param.get("issue_id", atom.integer) }:for_share():single_object_mode():exec() -local preview = param.get("preview") or param.get("preview2") == "1" and true or false +local preview = param.get("preview") and true or false if not app.session.member:has_voting_right_for_unit_id(issue.area.unit_id) then error("access denied") diff -r bb8b21241dab -r e616d8f16f14 static/js/voting.js --- a/static/js/voting.js Thu Nov 08 15:32:57 2012 +0100 +++ b/static/js/voting.js Thu Nov 08 20:55:54 2012 +0100 @@ -338,18 +338,7 @@ window.addEventListener("load", function(event) { jsProtect(function() { voting_setCategoryHeadings(); - // TODO: replace the following code by non-JavaScript HTML attributes - var elements = document.getElementsByTagName("input"); - for (var i=0; i