Compare commits
1 commit
0b59a74cf6
...
921bfd73cc
| Author | SHA1 | Date | |
|---|---|---|---|
| 921bfd73cc |
7 changed files with 42 additions and 86 deletions
|
|
@ -7,7 +7,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: PACKAGE VERSION\n"
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2025-10-13 20:19+0200\n"
|
"POT-Creation-Date: 2025-06-08 20:44-0600\n"
|
||||||
"PO-Revision-Date: 2025-03-29 20:41-0600\n"
|
"PO-Revision-Date: 2025-03-29 20:41-0600\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
|
|
@ -41,11 +41,11 @@ msgstr "Bé"
|
||||||
msgid "Very good"
|
msgid "Very good"
|
||||||
msgstr "Molt bé"
|
msgstr "Molt bé"
|
||||||
|
|
||||||
#: ../vedia.rb:127
|
#: ../vedia.rb:119
|
||||||
msgid "Incorrect email or password."
|
msgid "Incorrect email or password."
|
||||||
msgstr "Correu o contrasenya incorrecte."
|
msgstr "Correu o contrasenya incorrecte."
|
||||||
|
|
||||||
#: ../vedia.rb:149
|
#: ../vedia.rb:141
|
||||||
msgid "Reset your password"
|
msgid "Reset your password"
|
||||||
msgstr "Reiniciar contrasenya"
|
msgstr "Reiniciar contrasenya"
|
||||||
|
|
||||||
|
|
@ -133,7 +133,7 @@ msgid "Description: %{description}"
|
||||||
msgstr "Descripció: %{description}"
|
msgstr "Descripció: %{description}"
|
||||||
|
|
||||||
#: ../views/admin_votes.erb:15 ../views/votes_open.erb:3
|
#: ../views/admin_votes.erb:15 ../views/votes_open.erb:3
|
||||||
#: ../views/votes_show_closed.erb:4 ../views/votes_show_open.erb:12
|
#: ../views/votes_show_closed.erb:4 ../views/votes_show_open.erb:4
|
||||||
msgid "Closing date: %{date}"
|
msgid "Closing date: %{date}"
|
||||||
msgstr "Data de tancament: %{date}"
|
msgstr "Data de tancament: %{date}"
|
||||||
|
|
||||||
|
|
@ -147,7 +147,7 @@ msgstr "Estat: %{state}"
|
||||||
|
|
||||||
#: ../views/admin_votes.erb:19 ../views/votes_edit.erb:39
|
#: ../views/admin_votes.erb:19 ../views/votes_edit.erb:39
|
||||||
#: ../views/votes_show_closed.erb:79 ../views/votes_show_draft.erb:5
|
#: ../views/votes_show_closed.erb:79 ../views/votes_show_draft.erb:5
|
||||||
#: ../views/votes_show_open.erb:54
|
#: ../views/votes_show_open.erb:40
|
||||||
msgid "Organizers"
|
msgid "Organizers"
|
||||||
msgstr "Organitzadores"
|
msgstr "Organitzadores"
|
||||||
|
|
||||||
|
|
@ -193,7 +193,7 @@ msgstr "Connexió"
|
||||||
|
|
||||||
#: ../views/login.erb:9 ../views/reset.erb:5 ../views/reset_change.erb:13
|
#: ../views/login.erb:9 ../views/reset.erb:5 ../views/reset_change.erb:13
|
||||||
#: ../views/signup.erb:24 ../views/votes_edit.erb:51
|
#: ../views/signup.erb:24 ../views/votes_edit.erb:51
|
||||||
#: ../views/votes_show_closed.erb:99 ../views/votes_show_open.erb:80
|
#: ../views/votes_show_closed.erb:99 ../views/votes_show_open.erb:66
|
||||||
msgid "Email"
|
msgid "Email"
|
||||||
msgstr "Correu"
|
msgstr "Correu"
|
||||||
|
|
||||||
|
|
@ -268,7 +268,7 @@ msgstr "Títol"
|
||||||
msgid "Description"
|
msgid "Description"
|
||||||
msgstr "Descripció"
|
msgstr "Descripció"
|
||||||
|
|
||||||
#: ../views/votes_edit.erb:12 ../views/votes_show_open.erb:41
|
#: ../views/votes_edit.erb:12 ../views/votes_show_open.erb:27
|
||||||
msgid "Save"
|
msgid "Save"
|
||||||
msgstr "Guardar"
|
msgstr "Guardar"
|
||||||
|
|
||||||
|
|
@ -287,12 +287,12 @@ msgstr "Nom"
|
||||||
|
|
||||||
#: ../views/votes_edit.erb:47 ../views/votes_edit.erb:54
|
#: ../views/votes_edit.erb:47 ../views/votes_edit.erb:54
|
||||||
#: ../views/votes_show_closed.erb:95 ../views/votes_show_closed.erb:102
|
#: ../views/votes_show_closed.erb:95 ../views/votes_show_closed.erb:102
|
||||||
#: ../views/votes_show_open.erb:76 ../views/votes_show_open.erb:83
|
#: ../views/votes_show_open.erb:62 ../views/votes_show_open.erb:69
|
||||||
msgid "Add organizer"
|
msgid "Add organizer"
|
||||||
msgstr "Afegeix organitzadora"
|
msgstr "Afegeix organitzadora"
|
||||||
|
|
||||||
#: ../views/votes_edit.erb:57 ../views/votes_show_closed.erb:89
|
#: ../views/votes_edit.erb:57 ../views/votes_show_closed.erb:89
|
||||||
#: ../views/votes_show_open.erb:66
|
#: ../views/votes_show_open.erb:52
|
||||||
msgid "Actions for organizers"
|
msgid "Actions for organizers"
|
||||||
msgstr "Accions per les organitzadores"
|
msgstr "Accions per les organitzadores"
|
||||||
|
|
||||||
|
|
@ -371,22 +371,18 @@ msgstr "No hi ha cap resultat perquè ningú va votar en aquesta votació."
|
||||||
msgid "Reopen voting period"
|
msgid "Reopen voting period"
|
||||||
msgstr "Reobrir el període de votació"
|
msgstr "Reobrir el període de votació"
|
||||||
|
|
||||||
#: ../views/votes_show_open.erb:6
|
#: ../views/votes_show_open.erb:9
|
||||||
msgid "Missing rating for candidate <i>%{name}</i>."
|
|
||||||
msgstr "Falta una valoració per l'opció <i>%{name}</i>."
|
|
||||||
|
|
||||||
#: ../views/votes_show_open.erb:17
|
|
||||||
msgid "Your ratings"
|
msgid "Your ratings"
|
||||||
msgstr "Les teves valoracions"
|
msgstr "Les teves valoracions"
|
||||||
|
|
||||||
#: ../views/votes_show_open.erb:44
|
#: ../views/votes_show_open.erb:30
|
||||||
msgid "Participants"
|
msgid "Participants"
|
||||||
msgstr "Votants"
|
msgstr "Votants"
|
||||||
|
|
||||||
#: ../views/votes_show_open.erb:69
|
#: ../views/votes_show_open.erb:55
|
||||||
msgid "Change back to draft vote"
|
msgid "Change back to draft vote"
|
||||||
msgstr "Tornar a l'esborrany de votació"
|
msgstr "Tornar a l'esborrany de votació"
|
||||||
|
|
||||||
#: ../views/votes_show_open.erb:73
|
#: ../views/votes_show_open.erb:59
|
||||||
msgid "Close votes and show results"
|
msgid "Close votes and show results"
|
||||||
msgstr "Tancar la votació i veure els resultats"
|
msgstr "Tancar la votació i veure els resultats"
|
||||||
|
|
|
||||||
32
po/vedia.pot
32
po/vedia.pot
|
|
@ -8,8 +8,8 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: PACKAGE VERSION\n"
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2025-10-13 20:19+0200\n"
|
"POT-Creation-Date: 2025-06-08 20:44-0600\n"
|
||||||
"PO-Revision-Date: 2025-10-13 20:19+0200\n"
|
"PO-Revision-Date: 2025-06-08 20:44-0600\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
"Language: \n"
|
"Language: \n"
|
||||||
|
|
@ -42,11 +42,11 @@ msgstr ""
|
||||||
msgid "Very good"
|
msgid "Very good"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../vedia.rb:127
|
#: ../vedia.rb:119
|
||||||
msgid "Incorrect email or password."
|
msgid "Incorrect email or password."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../vedia.rb:149
|
#: ../vedia.rb:141
|
||||||
msgid "Reset your password"
|
msgid "Reset your password"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
|
@ -134,7 +134,7 @@ msgid "Description: %{description}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../views/admin_votes.erb:15 ../views/votes_open.erb:3
|
#: ../views/admin_votes.erb:15 ../views/votes_open.erb:3
|
||||||
#: ../views/votes_show_closed.erb:4 ../views/votes_show_open.erb:12
|
#: ../views/votes_show_closed.erb:4 ../views/votes_show_open.erb:4
|
||||||
msgid "Closing date: %{date}"
|
msgid "Closing date: %{date}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
|
@ -148,7 +148,7 @@ msgstr ""
|
||||||
|
|
||||||
#: ../views/admin_votes.erb:19 ../views/votes_edit.erb:39
|
#: ../views/admin_votes.erb:19 ../views/votes_edit.erb:39
|
||||||
#: ../views/votes_show_closed.erb:79 ../views/votes_show_draft.erb:5
|
#: ../views/votes_show_closed.erb:79 ../views/votes_show_draft.erb:5
|
||||||
#: ../views/votes_show_open.erb:54
|
#: ../views/votes_show_open.erb:40
|
||||||
msgid "Organizers"
|
msgid "Organizers"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
|
@ -194,7 +194,7 @@ msgstr ""
|
||||||
|
|
||||||
#: ../views/login.erb:9 ../views/reset.erb:5 ../views/reset_change.erb:13
|
#: ../views/login.erb:9 ../views/reset.erb:5 ../views/reset_change.erb:13
|
||||||
#: ../views/signup.erb:24 ../views/votes_edit.erb:51
|
#: ../views/signup.erb:24 ../views/votes_edit.erb:51
|
||||||
#: ../views/votes_show_closed.erb:99 ../views/votes_show_open.erb:80
|
#: ../views/votes_show_closed.erb:99 ../views/votes_show_open.erb:66
|
||||||
msgid "Email"
|
msgid "Email"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
|
@ -267,7 +267,7 @@ msgstr ""
|
||||||
msgid "Description"
|
msgid "Description"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../views/votes_edit.erb:12 ../views/votes_show_open.erb:41
|
#: ../views/votes_edit.erb:12 ../views/votes_show_open.erb:27
|
||||||
msgid "Save"
|
msgid "Save"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
|
@ -286,12 +286,12 @@ msgstr ""
|
||||||
|
|
||||||
#: ../views/votes_edit.erb:47 ../views/votes_edit.erb:54
|
#: ../views/votes_edit.erb:47 ../views/votes_edit.erb:54
|
||||||
#: ../views/votes_show_closed.erb:95 ../views/votes_show_closed.erb:102
|
#: ../views/votes_show_closed.erb:95 ../views/votes_show_closed.erb:102
|
||||||
#: ../views/votes_show_open.erb:76 ../views/votes_show_open.erb:83
|
#: ../views/votes_show_open.erb:62 ../views/votes_show_open.erb:69
|
||||||
msgid "Add organizer"
|
msgid "Add organizer"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../views/votes_edit.erb:57 ../views/votes_show_closed.erb:89
|
#: ../views/votes_edit.erb:57 ../views/votes_show_closed.erb:89
|
||||||
#: ../views/votes_show_open.erb:66
|
#: ../views/votes_show_open.erb:52
|
||||||
msgid "Actions for organizers"
|
msgid "Actions for organizers"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
|
@ -368,22 +368,18 @@ msgstr ""
|
||||||
msgid "Reopen voting period"
|
msgid "Reopen voting period"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../views/votes_show_open.erb:6
|
#: ../views/votes_show_open.erb:9
|
||||||
msgid "Missing rating for candidate <i>%{name}</i>."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: ../views/votes_show_open.erb:17
|
|
||||||
msgid "Your ratings"
|
msgid "Your ratings"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../views/votes_show_open.erb:44
|
#: ../views/votes_show_open.erb:30
|
||||||
msgid "Participants"
|
msgid "Participants"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../views/votes_show_open.erb:69
|
#: ../views/votes_show_open.erb:55
|
||||||
msgid "Change back to draft vote"
|
msgid "Change back to draft vote"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../views/votes_show_open.erb:73
|
#: ../views/votes_show_open.erb:59
|
||||||
msgid "Close votes and show results"
|
msgid "Close votes and show results"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
|
||||||
26
vedia.rb
26
vedia.rb
|
|
@ -1,22 +1,19 @@
|
||||||
require 'sinatra'
|
require 'sinatra'
|
||||||
|
|
||||||
# Set environment before requiring 'sinatra/activerecord' to make `whenever` uses the database.
|
|
||||||
if ENV['RAILS_ENV']
|
|
||||||
set :environment, ENV['RAILS_ENV']
|
|
||||||
end
|
|
||||||
|
|
||||||
require 'sinatra/activerecord'
|
require 'sinatra/activerecord'
|
||||||
require 'bcrypt'
|
require 'bcrypt'
|
||||||
require 'gettext'
|
require 'gettext'
|
||||||
require 'securerandom'
|
require 'securerandom'
|
||||||
require 'chartkick'
|
require 'chartkick'
|
||||||
require 'mail'
|
require 'mail'
|
||||||
require 'ostruct'
|
|
||||||
require 'tzinfo'
|
require 'tzinfo'
|
||||||
require 'redcarpet'
|
require 'redcarpet'
|
||||||
|
|
||||||
include GetText
|
include GetText
|
||||||
|
|
||||||
|
if ENV['RAILS_ENV']
|
||||||
|
set :environment, ENV['RAILS_ENV']
|
||||||
|
end
|
||||||
|
|
||||||
require_relative 'mj'
|
require_relative 'mj'
|
||||||
require_relative 'config/environments/defaults.rb'
|
require_relative 'config/environments/defaults.rb'
|
||||||
require_relative "config/environments/#{settings.environment}"
|
require_relative "config/environments/#{settings.environment}"
|
||||||
|
|
@ -387,31 +384,16 @@ post '/votes/:id/reopen' do
|
||||||
redirect '/votes/' + @vote.secure_id
|
redirect '/votes/' + @vote.secure_id
|
||||||
end
|
end
|
||||||
|
|
||||||
get '/votes/:id/ratings' do
|
|
||||||
redirect '/votes/' + params[:id]
|
|
||||||
end
|
|
||||||
|
|
||||||
post '/votes/:id/ratings' do
|
post '/votes/:id/ratings' do
|
||||||
require_login
|
require_login
|
||||||
find_vote
|
find_vote
|
||||||
require_open_vote
|
require_open_vote
|
||||||
@errors = []
|
|
||||||
@vote.candidates.each do |candidate|
|
|
||||||
if not params[candidate.id.to_s]
|
|
||||||
@errors << OpenStruct.new(:attribute => :rating, :type => :blank, :candidate => candidate)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
if not @errors.empty?
|
|
||||||
@params = params
|
|
||||||
erb :votes_show_open
|
|
||||||
else
|
|
||||||
@vote.candidates.each do |candidate|
|
@vote.candidates.each do |candidate|
|
||||||
rating = Rating.find_or_initialize_by(vote: @vote, user: current_user, candidate: candidate)
|
rating = Rating.find_or_initialize_by(vote: @vote, user: current_user, candidate: candidate)
|
||||||
rating.value = params[candidate.id.to_s]
|
rating.value = params[candidate.id.to_s]
|
||||||
rating.save
|
rating.save
|
||||||
end
|
end
|
||||||
redirect '/votes/' + @vote.secure_id
|
redirect '/votes/' + @vote.secure_id
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
post '/votes/:id/organizers' do
|
post '/votes/:id/organizers' do
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,6 @@
|
||||||
color: red;
|
color: red;
|
||||||
}
|
}
|
||||||
|
|
||||||
p, li {
|
|
||||||
max-width: 50em;
|
|
||||||
}
|
|
||||||
|
|
||||||
textarea {
|
textarea {
|
||||||
width: 80em;
|
width: 80em;
|
||||||
height: 20em;
|
height: 20em;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<h1><%= _("Open vote") %></h1>
|
<h1><%= _("Open vote") %></h1>
|
||||||
|
|
||||||
<p><%= _("Closing date: %{date}") % { date: format_date_and_time(@expire_on) } %></p>
|
<p><%= _("Closing date: %{date}" % { date: format_date_and_time(@expire_on) }) %></p>
|
||||||
|
|
||||||
<p><%= _("The vote will automatically close on that date and the results will
|
<p><%= _("The vote will automatically close on that date and the results will
|
||||||
be sent to all users by email.") %></p>
|
be sent to all users by email.") %></p>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<h1><%= @vote.title %></h1>
|
<h1><%= @vote.title %></h1>
|
||||||
|
|
||||||
<% if @vote.expire_on %>
|
<% if @vote.expire_on %>
|
||||||
<p><%= _("Closing date: %{date}") % { date: format_date_and_time(@vote.expire_on) } %></p>
|
<p><%= _("Closing date: %{date}" % { date: format_date_and_time(@vote.expire_on) }) %></p>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<%= markdown(@vote.description) %>
|
<%= markdown(@vote.description) %>
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
<% @vote.candidates.each do |candidate| %>
|
<% @vote.candidates.each do |candidate| %>
|
||||||
<% if rating = @vote.ratings.find { |rating| rating.user == user and rating.candidate == candidate } %>
|
<% if rating = @vote.ratings.find { |rating| rating.user == user and rating.candidate == candidate } %>
|
||||||
<% value = settings.values.select { |e| e[:id] == rating.value }.first %>
|
<% value = settings.values.select { |e| e[:id] == rating.value }.first %>
|
||||||
<td class="value-<%= value[:id] %>"><%= _(value[:label]) %></td>
|
<td class="value-<%= value[:id] %>"><%= value[:label] %></td>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
@ -47,7 +47,7 @@
|
||||||
<td><%= i %></td>
|
<td><%= i %></td>
|
||||||
<td><%= candidate.name %></td>
|
<td><%= candidate.name %></td>
|
||||||
<% value = settings.values.select { |e| e[:id] == candidate.mj.mj }.first %>
|
<% value = settings.values.select { |e| e[:id] == candidate.mj.mj }.first %>
|
||||||
<td class="value-<%= value[:id] %>"><%= _(value[:label]) %></td>
|
<td class="value-<%= value[:id] %>"><%= value[:label] %></td>
|
||||||
<td><%= candidate.mj.proponents %></td>
|
<td><%= candidate.mj.proponents %></td>
|
||||||
<td><%= candidate.mj.opponents %></td>
|
<td><%= candidate.mj.opponents %></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,7 @@
|
||||||
<h1><%= @vote.title %></h1>
|
<h1><%= @vote.title %></h1>
|
||||||
|
|
||||||
<% if @errors %>
|
|
||||||
<% @errors.each do |error| %>
|
|
||||||
<% if error.attribute == :rating and error.type == :blank %>
|
|
||||||
<p class="error"><%= _("Missing rating for candidate <i>%{name}</i>.") % { name: error.candidate.name } %></p>
|
|
||||||
<% end %>
|
|
||||||
<% end %>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<% if @vote.expire_on %>
|
<% if @vote.expire_on %>
|
||||||
<p><%= _("Closing date: %{date}") % { date: format_date_and_time(@vote.expire_on) } %></p>
|
<p><%= _("Closing date: %{date}" % { date: format_date_and_time(@vote.expire_on) }) %></p>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<%= markdown(@vote.description) %>
|
<%= markdown(@vote.description) %>
|
||||||
|
|
@ -20,19 +12,13 @@
|
||||||
<ul>
|
<ul>
|
||||||
<% @vote.candidates.each do |candidate| %>
|
<% @vote.candidates.each do |candidate| %>
|
||||||
<% rating = @vote.ratings.find { |rating| rating.user == current_user and rating.candidate == candidate } %>
|
<% rating = @vote.ratings.find { |rating| rating.user == current_user and rating.candidate == candidate } %>
|
||||||
<% if rating
|
<% value = rating ? rating.value : 0 %>
|
||||||
value = rating.value
|
|
||||||
elsif @params[candidate.id.to_s]
|
|
||||||
value = params[candidate.id.to_s].to_i
|
|
||||||
else
|
|
||||||
value = 0
|
|
||||||
end %>
|
|
||||||
<li>
|
<li>
|
||||||
<p><b><%= candidate.name %></b></p>
|
<p><b><%= candidate.name %></b></p>
|
||||||
<%= markdown(candidate.description) %>
|
<%= markdown(candidate.description) %>
|
||||||
<ul>
|
<ul>
|
||||||
<% settings.values.reverse.each do |v| %>
|
<% settings.values.reverse.each do |v| %>
|
||||||
<li><input type="radio" name="<%= candidate.id %>" id="<%= candidate.id %>-<%= v[:id] %>" value="<%= v[:id] %>" <% if value == v[:id] %>checked<% end %>><label for="<%= candidate.id %>-<%= v[:id] %>" class="value-<%= v[:id] %>"><%= _(v[:label]) %></label></li>
|
<li><input type="radio" name="<%= candidate.id %>" id="<%= candidate.id %>-<%= v[:id] %>" value="<%= v[:id] %>" <% if value == v[:id] %>checked<% end %>><label for="<%= candidate.id %>-<%= v[:id] %>" class="value-<%= v[:id] %>"><%= v[:label] %></label></li>
|
||||||
<% end %>
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue