Use active record translations for labels
This way we can simplify the way we generate form fields. In some cases, we also use the human attribute in table headers, which IMHO makes sense. I haven't moved all of them: for example, sometimes a label is different depending on whether it's shown to administrators, valuators, or users. And I haven't touched the ones related to devise, since I wasn't sure about possible side effects. Note I've also removed placeholders when they had the same text as their labels, since they weren't helpful. On the contrary, the added redundant text to the form, potentially distracting users.
This commit is contained in:
@@ -32,40 +32,40 @@
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<%= f.check_box :public_activity, label: t("account.show.public_activity_label") %>
|
||||
<%= f.check_box :public_activity %>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<%= f.check_box :public_interests, label: t("account.show.public_interests_label") %>
|
||||
<%= f.check_box :public_interests %>
|
||||
</div>
|
||||
|
||||
<% if @account.email.present? %>
|
||||
<h2><%= t("account.show.notifications") %></h2>
|
||||
|
||||
<div>
|
||||
<%= f.check_box :email_on_comment, label: t("account.show.email_on_comment_label") %>
|
||||
<%= f.check_box :email_on_comment %>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<%= f.check_box :email_on_comment_reply, label: t("account.show.email_on_comment_reply_label") %>
|
||||
<%= f.check_box :email_on_comment_reply %>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<%= f.check_box :newsletter, label: t("account.show.subscription_to_website_newsletter_label") %>
|
||||
<%= f.check_box :newsletter %>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<%= f.check_box :email_digest, label: t("account.show.email_digest_label") %>
|
||||
<%= f.check_box :email_digest %>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<%= f.check_box :email_on_direct_message, label: t("account.show.email_on_direct_message_label") %>
|
||||
<%= f.check_box :email_on_direct_message %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% if @account.official_level == 1 %>
|
||||
<div>
|
||||
<%= f.check_box :official_position_badge, label: t("account.show.official_position_badge_label") %>
|
||||
<%= f.check_box :official_position_badge %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
@@ -74,13 +74,13 @@
|
||||
|
||||
<% if feature?("user.recommendations_on_debates") %>
|
||||
<div>
|
||||
<%= f.check_box :recommended_debates, label: t("account.show.show_debates_recommendations") %>
|
||||
<%= f.check_box :recommended_debates %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% if feature?("user.recommendations_on_proposals") %>
|
||||
<div>
|
||||
<%= f.check_box :recommended_proposals, label: t("account.show.show_proposals_recommendations") %>
|
||||
<%= f.check_box :recommended_proposals %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
<% date_started_at = @banner.post_started_at.present? ? I18n.localize(@banner.post_started_at) : "" %>
|
||||
<div class="small-12 medium-3 column">
|
||||
<%= f.text_field :post_started_at,
|
||||
label: t("admin.banners.banner.post_started_at"),
|
||||
placeholder: t("admin.banners.banner.post_started_at"),
|
||||
value: date_started_at,
|
||||
class: "js-calendar-full",
|
||||
id: "post_started_at" %>
|
||||
@@ -17,8 +15,6 @@
|
||||
<% date_ended_at = @banner.post_ended_at.present? ? I18n.localize(@banner.post_ended_at) : "" %>
|
||||
<div class="small-12 medium-3 column end">
|
||||
<%= f.text_field :post_ended_at,
|
||||
label: t("admin.banners.banner.post_ended_at"),
|
||||
placeholder: t("admin.banners.banner.post_ended_at"),
|
||||
value: date_ended_at,
|
||||
class: "js-calendar-full",
|
||||
id: "post_ended_at" %>
|
||||
@@ -29,25 +25,19 @@
|
||||
<%= f.translatable_fields do |translations_form| %>
|
||||
<div class="small-12 medium-6 column">
|
||||
<%= translations_form.text_field :title,
|
||||
placeholder: t("admin.banners.banner.title"),
|
||||
data: { js_banner_title: "js_banner_title" },
|
||||
label: t("admin.banners.banner.title") %>
|
||||
data: { js_banner_title: "js_banner_title" } %>
|
||||
</div>
|
||||
|
||||
<div class="small-12 column">
|
||||
<%= translations_form.text_field :description,
|
||||
placeholder: t("admin.banners.banner.description"),
|
||||
data: { js_banner_description: "js_banner_description" },
|
||||
label: t("admin.banners.banner.description") %>
|
||||
data: { js_banner_description: "js_banner_description" } %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 medium-6 column">
|
||||
<%= f.text_field :target_url,
|
||||
label: t("admin.banners.banner.target_url"),
|
||||
placeholder: t("admin.banners.banner.target_url") %>
|
||||
<%= f.text_field :target_url %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
<table>
|
||||
<thead>
|
||||
<tr id="<%= dom_id(banner) %>">
|
||||
<th scope="col"><%= t("admin.banners.banner.post_started_at") %></th>
|
||||
<th scope="col"><%= t("admin.banners.banner.post_ended_at") %></th>
|
||||
<th scope="col"><%= Banner.human_attribute_name(:post_started_at) %></th>
|
||||
<th scope="col"><%= Banner.human_attribute_name(:post_ended_at) %></th>
|
||||
<th scope="col" class="small-4"><%= t("admin.actions.actions") %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
@@ -7,10 +7,7 @@
|
||||
<div class="row">
|
||||
<%= f.translatable_fields do |translations_form| %>
|
||||
<div class="small-12 medium-6 column end">
|
||||
<%= translations_form.text_field :name,
|
||||
label: t("admin.budget_groups.form.name"),
|
||||
maxlength: 50,
|
||||
placeholder: t("admin.budget_groups.form.name") %>
|
||||
<%= translations_form.text_field :name, maxlength: 50 %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
@@ -18,10 +15,7 @@
|
||||
<% if @group.persisted? %>
|
||||
<div class="row">
|
||||
<div class="small-12 medium-6 column">
|
||||
<%= f.select :max_votable_headings,
|
||||
(1..@group.headings.count),
|
||||
label: t("admin.budget_groups.max_votable_headings"),
|
||||
placeholder: t("admin.budget_groups.max_votable_headings") %>
|
||||
<%= f.select :max_votable_headings, (1..@group.headings.count) %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<thead>
|
||||
<tr id="<%= dom_id(@budget) %>">
|
||||
<th><%= t("admin.budget_groups.name") %></th>
|
||||
<th><%= t("admin.budget_groups.max_votable_headings") %></th>
|
||||
<th><%= Budget::Group.human_attribute_name(:max_votable_headings) %></th>
|
||||
<th><%= t("admin.budget_groups.headings_name") %></th>
|
||||
<th><%= t("admin.budget_groups.headings_edit") %></th>
|
||||
<th><%= t("admin.actions.actions") %></th>
|
||||
|
||||
@@ -7,42 +7,27 @@
|
||||
<div class="row">
|
||||
<%= f.translatable_fields do |translations_form| %>
|
||||
<div class="small-12 medium-6 column end">
|
||||
<%= translations_form.text_field :name,
|
||||
label: t("admin.budget_headings.form.name"),
|
||||
maxlength: 50,
|
||||
placeholder: t("admin.budget_headings.form.name") %>
|
||||
<%= translations_form.text_field :name, maxlength: 50 %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 medium-6 column">
|
||||
<%= f.text_field :price,
|
||||
label: t("admin.budget_headings.form.amount"),
|
||||
maxlength: 8,
|
||||
placeholder: t("admin.budget_headings.form.amount") %>
|
||||
<%= f.text_field :price, maxlength: 8 %>
|
||||
|
||||
<%= f.text_field :population,
|
||||
label: t("admin.budget_headings.form.population"),
|
||||
maxlength: 8,
|
||||
placeholder: t("admin.budget_headings.form.population"),
|
||||
data: { toggle_focus: "population-info" },
|
||||
hint: t("admin.budget_headings.form.population_info") %>
|
||||
|
||||
<%= f.text_field :latitude,
|
||||
label: t("admin.budget_headings.form.latitude"),
|
||||
maxlength: 22,
|
||||
placeholder: "latitude" %>
|
||||
|
||||
<%= f.text_field :longitude,
|
||||
label: t("admin.budget_headings.form.longitude"),
|
||||
maxlength: 22,
|
||||
placeholder: "longitude" %>
|
||||
<%= f.text_field :latitude, maxlength: 22 %>
|
||||
<%= f.text_field :longitude, maxlength: 22 %>
|
||||
<p class="help-text" id="budgets-coordinates-help-text">
|
||||
<%= t("admin.budget_headings.form.coordinates_info") %>
|
||||
</p>
|
||||
|
||||
<%= f.check_box :allow_custom_content, label: t("admin.budget_headings.form.allow_content_block") %>
|
||||
<%= f.check_box :allow_custom_content %>
|
||||
<p class="help-text" id="budgets-content-blocks-help-text">
|
||||
<%= t("admin.budget_headings.form.content_blocks_info") %>
|
||||
</p>
|
||||
|
||||
@@ -11,10 +11,10 @@
|
||||
<table>
|
||||
<thead>
|
||||
<tr id="<%= dom_id(@group) %>">
|
||||
<th><%= t("admin.budget_headings.name") %></th>
|
||||
<th><%= t("admin.budget_headings.form.amount") %></th>
|
||||
<th><%= t("admin.budget_headings.form.population") %></th>
|
||||
<th><%= t("admin.budget_headings.form.allow_content_block") %></th>
|
||||
<th><%= Budget::Heading.human_attribute_name(:name) %></th>
|
||||
<th><%= Budget::Heading.human_attribute_name(:price) %></th>
|
||||
<th><%= Budget::Heading.human_attribute_name(:population) %></th>
|
||||
<th><%= Budget::Heading.human_attribute_name(:allow_custom_content) %></th>
|
||||
<th><%= t("admin.actions.actions") %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
</div>
|
||||
|
||||
<div class="small-12 column">
|
||||
<%= f.label :valuation_tag_list, t("admin.budget_investments.edit.tags") %>
|
||||
<%= f.label :valuation_tag_list %>
|
||||
<div class="tags">
|
||||
<% @tags.each do |tag| %>
|
||||
<a class="js-add-tag-link"><%= tag.name %></a>
|
||||
@@ -72,7 +72,7 @@
|
||||
</div>
|
||||
|
||||
<div class="small-12 column margin-top">
|
||||
<%= f.label :valuator_ids, t("admin.budget_investments.edit.user_groups") %>
|
||||
<%= f.label :valuator_ids %>
|
||||
<ul>
|
||||
<%= f.collection_check_boxes :valuator_group_ids, @valuator_groups, :id, :name do |group| %>
|
||||
<li><%= group.label(title: group.object.name) { group.check_box + truncate(group.object.name, length: 60) } %></li>
|
||||
@@ -106,22 +106,19 @@
|
||||
<div class="small-12 medium-3 column">
|
||||
<h2 id="incompatible"><%= t("admin.budget_investments.edit.compatibility") %></h2>
|
||||
<%= f.check_box :incompatible,
|
||||
title: t("admin.budget_investments.edit.compatibility"),
|
||||
label: t("admin.budget_investments.edit.mark_as_incompatible") %>
|
||||
title: t("admin.budget_investments.edit.compatibility") %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="small-12 medium-3 column float-left">
|
||||
<h2 id="selected"><%= t("admin.budget_investments.edit.selection") %></h2>
|
||||
<%= f.check_box :selected,
|
||||
title: t("admin.budget_investments.edit.selection"),
|
||||
label: t("admin.budget_investments.edit.mark_as_selected") %>
|
||||
title: t("admin.budget_investments.edit.selection") %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="small-12 column">
|
||||
<%= f.text_field :milestone_tag_list,
|
||||
value: @investment.milestone_tag_list.sort.join(", "),
|
||||
label: t("admin.budget_investments.edit.milestone_tags") %>
|
||||
value: @investment.milestone_tag_list.sort.join(", ") %>
|
||||
</div>
|
||||
|
||||
<div class="small-12 column margin-top">
|
||||
|
||||
@@ -9,15 +9,13 @@
|
||||
<%= f.text_field :starts_at,
|
||||
value: format_date_for_calendar_form(@phase.starts_at),
|
||||
class: "js-calendar-full",
|
||||
id: "start_date",
|
||||
label: t("admin.budget_phases.edit.start_date") %>
|
||||
id: "start_date" %>
|
||||
</div>
|
||||
<div class="small-12 medium-6 column">
|
||||
<%= f.text_field :ends_at,
|
||||
value: format_date_for_calendar_form(@phase.ends_at),
|
||||
class: "js-calendar-full",
|
||||
id: "end_date",
|
||||
label: t("admin.budget_phases.edit.end_date") %>
|
||||
id: "end_date" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -27,7 +25,6 @@
|
||||
<div class="ckeditor">
|
||||
<%= translations_form.cktext_area :description,
|
||||
maxlength: Budget::Phase::DESCRIPTION_MAX_LENGTH,
|
||||
label: t("admin.budget_phases.edit.description"),
|
||||
hint: t("admin.budget_phases.edit.description_help_text") %>
|
||||
</div>
|
||||
</div>
|
||||
@@ -36,7 +33,6 @@
|
||||
<div class="ckeditor">
|
||||
<%= translations_form.cktext_area :summary,
|
||||
maxlength: Budget::Phase::SUMMARY_MAX_LENGTH,
|
||||
label: t("admin.budget_phases.edit.summary"),
|
||||
hint: t("admin.budget_phases.edit.summary_help_text") %>
|
||||
</div>
|
||||
</div>
|
||||
@@ -45,7 +41,7 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 column margin-top">
|
||||
<%= f.check_box :enabled, label: t("admin.budget_phases.edit.enabled") %>
|
||||
<%= f.check_box :enabled %>
|
||||
|
||||
<span class="help-text" id="phase-summary-help-text">
|
||||
<%= t("admin.budget_phases.edit.enabled_help_text") %>
|
||||
|
||||
@@ -9,10 +9,7 @@
|
||||
<div class="row">
|
||||
<%= f.translatable_fields do |translations_form| %>
|
||||
<div class="small-12 medium-9 column end">
|
||||
<%= translations_form.text_field :name,
|
||||
label: t("activerecord.attributes.budget.name"),
|
||||
maxlength: Budget.title_max_length,
|
||||
placeholder: t("activerecord.attributes.budget.name") %>
|
||||
<%= translations_form.text_field :name, maxlength: Budget.title_max_length %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<% default_actions.each do |action| %>
|
||||
<tr>
|
||||
<td><%= t("admin.dashboard.actions.index.default.#{action}") %></td>
|
||||
<td><%= t("admin.dashboard.actions.action_type.resource") %></td>
|
||||
<td><%= Dashboard::Action.human_attribute_name("action_type_resource") %></td>
|
||||
<td class="text-center"><%= t("admin.dashboard.actions.index.active") %></td>
|
||||
<td colspan="4"> </td>
|
||||
<td class="text-right">
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
<% ::Dashboard::Action.action_types.keys.each do |action_type_value| %>
|
||||
<span class="margin-right">
|
||||
<%= f.radio_button :action_type, action_type_value,
|
||||
label: t("admin.dashboard.actions.action_type.#{action_type_value}"),
|
||||
data: { toggle: "request_to_administrators short_description" } %>
|
||||
</span>
|
||||
<% end %>
|
||||
@@ -40,7 +39,7 @@
|
||||
|
||||
<div class="row expanded margin-top">
|
||||
<div class="small-12 column">
|
||||
<%= f.check_box :published_proposal, label: t("admin.dashboard.actions.form.published_proposal") %>
|
||||
<%= f.check_box :published_proposal %>
|
||||
<p class="help-text"><%= t("admin.dashboard.actions.form.published_proposal_help_text") %></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<% @dashboard_actions.each do |action| %>
|
||||
<tr id="<%= dom_id(action) %>">
|
||||
<td><%= action.title %></td>
|
||||
<td><%= t("admin.dashboard.actions.action_type.#{action.action_type}") %></td>
|
||||
<td><%= Dashboard::Action.human_attribute_name("action_type_#{action.action_type}") %></td>
|
||||
<td class="text-center"><%= active_human_readable(action.active) %></td>
|
||||
<td class="text-center"><%= active_human_readable(action.published_proposal) %></td>
|
||||
<td class="text-center"><%= number_with_delimiter(action.day_offset, delimiter: ".") %></td>
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
<div class="small-12 medium-9 column">
|
||||
<%= f.label :status %>
|
||||
<% ::Legislation::DraftVersion::VALID_STATUSES.each do |status| %>
|
||||
<%= f.radio_button :status, status, label: t("admin.legislation.draft_versions.statuses.#{status}") %>
|
||||
<%= f.radio_button :status, status %>
|
||||
<span class="help-text"><%= t("admin.legislation.draft_versions.form.hints.status.#{status}") %></span>
|
||||
<br>
|
||||
<% end %>
|
||||
|
||||
@@ -37,10 +37,10 @@
|
||||
<td><%= draft_version.created_at.to_date %></td>
|
||||
<td>
|
||||
<% if draft_version.status == "draft" %>
|
||||
<%= t("admin.legislation.draft_versions.statuses.draft") %>
|
||||
<%= Legislation::DraftVersion.human_attribute_name(:status_draft) %>
|
||||
<%= link_to "(#{t(".preview")})", legislation_process_draft_version_path(@process, draft_version) %>
|
||||
<% else %>
|
||||
<%= t("admin.legislation.draft_versions.statuses.published") %>
|
||||
<%= Legislation::DraftVersion.human_attribute_name(:status_published) %>
|
||||
<% end %>
|
||||
</td>
|
||||
<td class="text-center"><%= draft_version.total_comments %></td>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<%= render "shared/errors", resource: @process %>
|
||||
<div class="row">
|
||||
<div class="small-12 column margin-top">
|
||||
<%= f.check_box :homepage_enabled, label: t("admin.legislation.processes.form.homepage_enabled") %>
|
||||
<%= f.check_box :homepage_enabled %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
<div class="ckeditor">
|
||||
<%= translations_form.cktext_area :homepage,
|
||||
language: I18n.locale,
|
||||
label: t("admin.legislation.processes.form.homepage"),
|
||||
ckeditor: { height: 500, toolbar: "admin" },
|
||||
hint: t("admin.legislation.processes.form.homepage_description") %>
|
||||
</div>
|
||||
|
||||
@@ -20,10 +20,8 @@
|
||||
<div class="row">
|
||||
<%= f.translatable_fields do |translations_form| %>
|
||||
<div class="small-12 medium-9 column end">
|
||||
<%= translations_form.text_area :title,
|
||||
rows: 5,
|
||||
placeholder: t("admin.legislation.questions.form.title_placeholder"),
|
||||
label: t("admin.legislation.questions.form.title") %>
|
||||
<%= translations_form.text_area :title, rows: 5,
|
||||
placeholder: t("admin.legislation.questions.form.title_placeholder") %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
@@ -17,8 +17,7 @@
|
||||
<div class="date-of-birth small-12">
|
||||
<%= f.date_select :date_of_birth,
|
||||
prompt: true,
|
||||
start_year: 1900, end_year: minimum_required_age.years.ago.year,
|
||||
label: t("admin.local_census_records.form.date_of_birth") %>
|
||||
start_year: 1900, end_year: minimum_required_age.years.ago.year %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<%= f.select :segment_recipient, options_for_select(user_segments_options,
|
||||
@newsletter[:segment_recipient]) %>
|
||||
<%= f.text_field :subject %>
|
||||
<%= f.text_field :from, label: t("admin.newsletters.new.from") %>
|
||||
<%= f.text_field :from %>
|
||||
<%= f.cktext_area :body, ckeditor: { language: I18n.locale } %>
|
||||
|
||||
<div class="margin-top">
|
||||
|
||||
@@ -9,8 +9,7 @@
|
||||
<div class="ckeditor column">
|
||||
<span class="help-text"><%= t("admin.active_polls.form.description.help_text") %></span>
|
||||
<%= translations_form.cktext_area :description,
|
||||
maxlength: ActivePoll.description_max_length,
|
||||
label: t("admin.active_polls.form.description.text") %>
|
||||
maxlength: ActivePoll.description_max_length %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
@@ -1,13 +1,9 @@
|
||||
<div class="small-12 medium-6 column">
|
||||
<%= f.text_field :name,
|
||||
placeholder: t("admin.booths.new.name"),
|
||||
label: t("admin.booths.new.name") %>
|
||||
<%= f.text_field :name %>
|
||||
</div>
|
||||
|
||||
<div class="small-12 medium-6 column clear">
|
||||
<%= f.text_field :location,
|
||||
placeholder: t("admin.booths.new.location"),
|
||||
label: t("admin.booths.new.location") %>
|
||||
<%= f.text_field :location %>
|
||||
</div>
|
||||
|
||||
<div class="small-12 medium-4 large-3 column clear end">
|
||||
|
||||
@@ -17,8 +17,7 @@
|
||||
<% select_options = Poll.all.map { |p| [p.name, p.id] } %>
|
||||
<%= f.select :poll_id,
|
||||
options_for_select(select_options),
|
||||
prompt: t("admin.questions.index.select_poll"),
|
||||
label: t("admin.questions.new.poll_label") %>
|
||||
prompt: t("admin.questions.index.select_poll") %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
</p>
|
||||
<% if !@question.votation_type.max_votes.nil? %>
|
||||
<p>
|
||||
<strong><%= t("question.max_votes") %></strong>
|
||||
<strong><%= VotationType.human_attribute_name(:max_votes) %></strong>
|
||||
<br>
|
||||
<%= @question.votation_type.max_votes %>
|
||||
</p>
|
||||
@@ -49,7 +49,7 @@
|
||||
<% end %>
|
||||
<% if !@question.votation_type.max_groups_answers.nil? %>
|
||||
<p>
|
||||
<strong><%= t("question.max_group_answers") %></strong>
|
||||
<strong><%= VotationType.human_attribute_name(:max_groups_answers) %></strong>
|
||||
<br>
|
||||
<%= @question.votation_type.max_groups_answers %>
|
||||
</p>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<div class="small-12 medium-3 column">
|
||||
<%= f.select :task,
|
||||
Poll::Shift.tasks.map { |k, v| [t("admin.poll_shifts.#{k}"), k] },
|
||||
{ prompt: t("admin.poll_shifts.new.select_task"), label: t("admin.poll_shifts.new.task") },
|
||||
{ prompt: t("admin.poll_shifts.new.select_task") },
|
||||
class: "js-poll-shifts" %>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<th><%= t("admin.poll_shifts.new.date") %></th>
|
||||
<th><%= t("admin.poll_shifts.new.officer") %></th>
|
||||
<th><%= t("admin.poll_shifts.new.table_email") %></th>
|
||||
<th><%= t("admin.poll_shifts.new.task") %></th>
|
||||
<th><%= Poll::Shift.human_attribute_name(:task) %></th>
|
||||
<th class="small-3"><%= t("admin.poll_shifts.new.shift") %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
@@ -22,8 +22,7 @@
|
||||
<h3><%= t("admin.site_customization.pages.form.options") %></h3>
|
||||
<%= f.label :status %>
|
||||
<% ::SiteCustomization::Page::VALID_STATUSES.each do |status| %>
|
||||
<%= f.radio_button :status, status,
|
||||
label: t("admin.site_customization.pages.page.status_#{status}") %>
|
||||
<%= f.radio_button :status, status %>
|
||||
<br>
|
||||
<% end %>
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
<%= form_for(@tag, url: admin_tags_path, as: :tag) do |f| %>
|
||||
<div class="small-12 medium-6">
|
||||
<%= f.text_field :name, placeholder: t("admin.tags.name.placeholder"), label: t("admin.tags.name.placeholder") %>
|
||||
<%= f.text_field :name %>
|
||||
</div>
|
||||
|
||||
<%= f.submit(t("admin.tags.create"), class: "button success") %>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<div class="small-12 medium-6 margin-top">
|
||||
<%= form_for [:admin, @group] do |f| %>
|
||||
<%= f.text_field :name, label: t("admin.valuator_groups.form.name") %>
|
||||
<%= f.text_field :name %>
|
||||
<%= f.submit t("admin.valuator_groups.form.edit"), class: "button success" %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<div class="small-12 medium-6 margin-top">
|
||||
<%= form_for [:admin, @group] do |f| %>
|
||||
<%= f.text_field :name, label: t("admin.valuator_groups.form.name") %>
|
||||
<%= f.text_field :name %>
|
||||
<%= f.submit t("admin.valuator_groups.form.new"), class: "button success" %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
<% end %>
|
||||
|
||||
<div class="small-12 column">
|
||||
<%= f.text_field :location, label: t("budgets.investments.form.location") %>
|
||||
<%= f.text_field :location %>
|
||||
</div>
|
||||
|
||||
<div class="small-12 column">
|
||||
|
||||
@@ -26,9 +26,7 @@
|
||||
|
||||
<%= form_for poll, remote: true, data: { type: :json },
|
||||
url: proposal_dashboard_poll_path(proposal, poll) do |f| %>
|
||||
<%= f.check_box :results_enabled,
|
||||
label: t("dashboard.polls.poll.show_results"),
|
||||
class: "js-submit-on-change" %>
|
||||
<%= f.check_box :results_enabled, class: "js-submit-on-change" %>
|
||||
<% end %>
|
||||
<p class="help-text"><%= t("dashboard.polls.poll.show_results_help") %></p>
|
||||
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
|
||||
<div class="small-12 column">
|
||||
<%= f.text_field :tag_list, value: @debate.tag_list.to_s,
|
||||
label: t("debates.form.tags_label"),
|
||||
hint: t("debates.form.tags_instructions"),
|
||||
placeholder: t("debates.form.tags_placeholder"),
|
||||
data: { js_url: suggest_tags_path },
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
<%= form_for [@receiver, @direct_message] do |f| %>
|
||||
<%= render "shared/errors", resource: @direct_message %>
|
||||
|
||||
<%= f.text_field :title, label: t("users.direct_messages.new.title_label") %>
|
||||
<%= f.text_area :body, label: t("users.direct_messages.new.body_label"), rows: "3" %>
|
||||
<%= f.text_field :title %>
|
||||
<%= f.text_area :body, rows: "3" %>
|
||||
|
||||
<div class="small-12 medium-4">
|
||||
<%= f.submit t("users.direct_messages.new.submit_button"), class: "button expanded" %>
|
||||
|
||||
@@ -5,32 +5,24 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 column">
|
||||
<%= f.text_field :title,
|
||||
maxlength: Legislation::Proposal.title_max_length,
|
||||
placeholder: t("proposals.form.proposal_title"),
|
||||
label: t("proposals.form.proposal_title") %>
|
||||
<%= f.text_field :title, maxlength: Legislation::Proposal.title_max_length %>
|
||||
</div>
|
||||
|
||||
<%= f.invisible_captcha :subtitle %>
|
||||
|
||||
<div class="small-12 column">
|
||||
<%= f.text_area :summary, rows: 4, maxlength: 200,
|
||||
label: t("proposals.form.proposal_summary"),
|
||||
placeholder: t("proposals.form.proposal_summary"),
|
||||
hint: t("proposals.form.proposal_summary_note") %>
|
||||
</div>
|
||||
|
||||
<div class="ckeditor small-12 column">
|
||||
<%= f.cktext_area :description,
|
||||
maxlength: Legislation::Proposal.description_max_length,
|
||||
ckeditor: { language: I18n.locale },
|
||||
label: t("proposals.form.proposal_text") %>
|
||||
ckeditor: { language: I18n.locale } %>
|
||||
</div>
|
||||
|
||||
<div class="small-12 column">
|
||||
<%= f.text_field :video_url,
|
||||
placeholder: t("proposals.form.proposal_video_url"),
|
||||
label: t("proposals.form.proposal_video_url"),
|
||||
hint: t("proposals.form.proposal_video_url_note") %>
|
||||
</div>
|
||||
|
||||
@@ -45,8 +37,7 @@
|
||||
</div>
|
||||
|
||||
<div class="small-12 medium-6 column">
|
||||
<%= f.select :geozone_id, geozone_select_options,
|
||||
include_blank: t("geozones.none"), label: t("proposals.form.geozone") %>
|
||||
<%= f.select :geozone_id, geozone_select_options, include_blank: t("geozones.none") %>
|
||||
</div>
|
||||
|
||||
<div class="small-12 column">
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
<%= form_for @notification do |f| %>
|
||||
<%= render "shared/errors", resource: @notification %>
|
||||
|
||||
<%= f.text_field :title, label: t("proposal_notifications.new.title_label") %>
|
||||
<%= f.text_area :body, label: t("proposal_notifications.new.body_label"), rows: "3" %>
|
||||
<%= f.text_field :title %>
|
||||
<%= f.text_area :body, rows: "3" %>
|
||||
<%= f.hidden_field :proposal_id, value: @proposal.id %>
|
||||
|
||||
<div class="small-12 medium-4">
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
<div class="small-12 column">
|
||||
<%= translations_form.text_field :title,
|
||||
maxlength: Proposal.title_max_length,
|
||||
placeholder: t("proposals.form.proposal_title"),
|
||||
data: { js_suggest_result: "js_suggest_result",
|
||||
js_suggest: ".js-suggest",
|
||||
js_url: suggest_proposals_path } %>
|
||||
@@ -19,7 +18,6 @@
|
||||
<div class="small-12 column">
|
||||
<%= translations_form.text_area :summary,
|
||||
rows: 4, maxlength: 200,
|
||||
placeholder: t("proposals.form.proposal_summary"),
|
||||
hint: t("proposals.form.proposal_summary_note") %>
|
||||
</div>
|
||||
|
||||
@@ -91,8 +89,6 @@
|
||||
<% if current_user.unverified? %>
|
||||
<div class="small-12 column">
|
||||
<%= f.text_field :responsible_name,
|
||||
placeholder: t("proposals.form.proposal_responsible_name"),
|
||||
label: t("proposals.form.proposal_responsible_name"),
|
||||
hint: t("proposals.form.proposal_responsible_name_note") %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
@@ -17,8 +17,7 @@
|
||||
<div class="row">
|
||||
<div class="small-12 medium-6 large-4 column">
|
||||
<%= f.select :retired_reason, retire_proposals_options,
|
||||
include_blank: t("proposals.retire_form.retired_reason_blank"),
|
||||
label: t("proposals.retire_form.retired_reason_label") %>
|
||||
include_blank: t("proposals.retire_form.retired_reason_blank") %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -31,8 +31,7 @@
|
||||
|
||||
<%= form_for(@resource, url: new_url_path, method: :get) do |f| %>
|
||||
<div class="small-12 medium-4">
|
||||
<%= f.select :geozone_id, geozone_select_options,
|
||||
include_blank: t("geozones.none"), label: t("map.select_district") %>
|
||||
<%= f.select :geozone_id, geozone_select_options, include_blank: t("geozones.none") %>
|
||||
</div>
|
||||
|
||||
<div class="actions small-12">
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 column">
|
||||
<%= f.text_field :title, label: t("community.topic.form.topic_title") %>
|
||||
<%= f.text_area :description, label: t("community.topic.form.topic_text"), rows: "5" %>
|
||||
<%= f.text_field :title %>
|
||||
<%= f.text_area :description, rows: "5" %>
|
||||
|
||||
<%= f.submit(class: "button", value: t("community.topic.form.#{action_name}.submit_button")) %>
|
||||
</div>
|
||||
|
||||
@@ -18,9 +18,7 @@
|
||||
<div class="column">
|
||||
<%= translations_form.hidden_field :title, value: l(Time.current, format: :datetime),
|
||||
maxlength: Milestone.title_max_length %>
|
||||
<%= translations_form.text_area :description,
|
||||
rows: 5,
|
||||
label: t("tracking.milestones.new.description") %>
|
||||
<%= translations_form.text_area :description, rows: 5 %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
<% budget = investment.budget %>
|
||||
<p>
|
||||
<h3><%= t("valuation.budget_investments.edit.valuation_finished") %></h3>
|
||||
<h3><%= Budget::Investment.human_attribute_name(:valuation_finished) %></h3>
|
||||
</p>
|
||||
<p>
|
||||
<strong><%= t("valuation.budget_investments.edit.feasibility") %>:</strong>
|
||||
<%= t("admin.budget_investments.index.feasibility.#{investment.feasibility}") %>
|
||||
</p>
|
||||
<p>
|
||||
<strong><%= t("valuation.budget_investments.edit.feasible_explanation_html") %>:</strong>
|
||||
<strong>
|
||||
<%= sanitize(Budget::Investment.human_attribute_name(:unfeasibility_explanation)) %>:
|
||||
</strong>
|
||||
<%= investment.unfeasibility_explanation.presence || "-" %>
|
||||
</p>
|
||||
<p>
|
||||
@@ -19,10 +21,12 @@
|
||||
<%= investment.price_first_year.presence || "-" %>
|
||||
</p>
|
||||
<p>
|
||||
<strong><%= t("valuation.budget_investments.edit.price_explanation_html") %>:</strong>
|
||||
<strong>
|
||||
<%= sanitize(Budget::Investment.human_attribute_name(:price_explanation)) %>:
|
||||
</strong>
|
||||
<%= investment.price_explanation.presence || "-" %>
|
||||
</p>
|
||||
<p>
|
||||
<strong><%= t("valuation.budget_investments.edit.duration_html") %>:</strong>
|
||||
<strong><%= sanitize(Budget::Investment.human_attribute_name(:duration)) %>:</strong>
|
||||
<%= investment.duration.presence || "-" %>
|
||||
</p>
|
||||
|
||||
@@ -30,9 +30,7 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 column">
|
||||
<%= f.text_area :unfeasibility_explanation,
|
||||
label: t("valuation.budget_investments.edit.feasible_explanation_html"),
|
||||
rows: 3 %>
|
||||
<%= f.text_area :unfeasibility_explanation, rows: 3 %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -56,15 +54,13 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 column">
|
||||
<%= f.text_area :price_explanation,
|
||||
label: t("valuation.budget_investments.edit.price_explanation_html"),
|
||||
rows: 3 %>
|
||||
<%= f.text_area :price_explanation, rows: 3 %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 medium-6 column">
|
||||
<%= f.text_field :duration, label: t("valuation.budget_investments.edit.duration_html") %>
|
||||
<%= f.text_field :duration %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -73,7 +69,6 @@
|
||||
<div class="row">
|
||||
<div class="small-12 medium-8 column">
|
||||
<%= f.check_box :valuation_finished,
|
||||
label: t("valuation.budget_investments.edit.valuation_finished"),
|
||||
id: "js-investment-report-alert",
|
||||
"data-alert": t("valuation.budget_investments.edit.valuation_finished_alert"),
|
||||
"data-not-feasible-alert": t("valuation.budget_investments.edit.not_feasible_alert") %>
|
||||
|
||||
Reference in New Issue
Block a user