Simplify generating form fields with labels
Instead of generating the label and then a field without a label, we can directly generate a field with a label.
This commit is contained in:
@@ -33,18 +33,15 @@ module DocumentsHelper
|
||||
|
||||
def render_attachment(builder, document)
|
||||
klass = document.persisted? || document.cached_attachment.present? ? " hide" : ""
|
||||
html = builder.label :attachment,
|
||||
t("documents.form.attachment_label"),
|
||||
class: "button hollow #{klass}"
|
||||
html += builder.file_field :attachment,
|
||||
label: false,
|
||||
accept: accepted_content_types_extensions(document.documentable_type.constantize),
|
||||
class: "js-document-attachment",
|
||||
data: {
|
||||
url: document_direct_upload_url(document),
|
||||
nested_document: true
|
||||
}
|
||||
html
|
||||
builder.file_field :attachment,
|
||||
label: t("documents.form.attachment_label"),
|
||||
label_options: { class: "button hollow #{klass}" },
|
||||
accept: accepted_content_types_extensions(document.documentable_type.constantize),
|
||||
class: "js-document-attachment",
|
||||
data: {
|
||||
url: document_direct_upload_url(document),
|
||||
nested_document: true
|
||||
}
|
||||
end
|
||||
|
||||
def document_direct_upload_url(document)
|
||||
|
||||
@@ -47,19 +47,15 @@ module ImagesHelper
|
||||
|
||||
def render_image_attachment(builder, imageable, image)
|
||||
klass = image.persisted? || image.cached_attachment.present? ? " hide" : ""
|
||||
html = builder.label :attachment,
|
||||
t("images.form.attachment_label"),
|
||||
class: "button hollow #{klass}"
|
||||
html += builder.file_field :attachment,
|
||||
label: false,
|
||||
accept: imageable_accepted_content_types_extensions,
|
||||
class: "js-image-attachment",
|
||||
data: {
|
||||
url: image_direct_upload_url(imageable),
|
||||
nested_image: true
|
||||
}
|
||||
|
||||
html
|
||||
builder.file_field :attachment,
|
||||
label: t("images.form.attachment_label"),
|
||||
label_options: { class: "button hollow #{klass}" },
|
||||
accept: imageable_accepted_content_types_extensions,
|
||||
class: "js-image-attachment",
|
||||
data: {
|
||||
url: image_direct_upload_url(imageable),
|
||||
nested_image: true
|
||||
}
|
||||
end
|
||||
|
||||
def render_image(image, version, show_caption = true)
|
||||
|
||||
@@ -7,9 +7,8 @@
|
||||
<div class="row">
|
||||
<% date_started_at = @banner.post_started_at.present? ? I18n.localize(@banner.post_started_at) : "" %>
|
||||
<div class="small-12 medium-3 column">
|
||||
<%= f.label :post_started_at, t("admin.banners.banner.post_started_at") %>
|
||||
<%= f.text_field :post_started_at,
|
||||
label: false,
|
||||
label: t("admin.banners.banner.post_started_at"),
|
||||
placeholder: t("admin.banners.banner.post_started_at"),
|
||||
value: date_started_at,
|
||||
class: "js-calendar-full",
|
||||
@@ -17,9 +16,8 @@
|
||||
</div>
|
||||
<% date_ended_at = @banner.post_ended_at.present? ? I18n.localize(@banner.post_ended_at) : "" %>
|
||||
<div class="small-12 medium-3 column end">
|
||||
<%= f.label :post_ended_at, t("admin.banners.banner.post_ended_at") %>
|
||||
<%= f.text_field :post_ended_at,
|
||||
label: false,
|
||||
label: t("admin.banners.banner.post_ended_at"),
|
||||
placeholder: t("admin.banners.banner.post_ended_at"),
|
||||
value: date_ended_at,
|
||||
class: "js-calendar-full",
|
||||
@@ -47,9 +45,8 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 medium-6 column">
|
||||
<%= f.label :target_url, t("admin.banners.banner.target_url") %>
|
||||
<%= f.text_field :target_url,
|
||||
label: false,
|
||||
label: t("admin.banners.banner.target_url"),
|
||||
placeholder: t("admin.banners.banner.target_url") %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -29,10 +29,9 @@
|
||||
<% end %>
|
||||
|
||||
<div class="small-12 column">
|
||||
<%= f.label :tag_list, t("admin.budget_investments.edit.user_tags") %>
|
||||
<%= f.text_field :tag_list,
|
||||
value: @investment.tag_list.sort.join(","),
|
||||
label: false %>
|
||||
label: t("admin.budget_investments.edit.user_tags") %>
|
||||
</div>
|
||||
|
||||
<div class="small-12 column">
|
||||
|
||||
@@ -6,20 +6,18 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 medium-6 column">
|
||||
<%= f.label :starts_at, t("admin.budget_phases.edit.start_date") %>
|
||||
<%= f.text_field :starts_at,
|
||||
value: format_date_for_calendar_form(@phase.starts_at),
|
||||
class: "js-calendar-full",
|
||||
id: "start_date",
|
||||
label: false %>
|
||||
label: t("admin.budget_phases.edit.start_date") %>
|
||||
</div>
|
||||
<div class="small-12 medium-6 column">
|
||||
<%= f.label :ends_at, t("admin.budget_phases.edit.end_date") %>
|
||||
<%= f.text_field :ends_at,
|
||||
value: format_date_for_calendar_form(@phase.ends_at),
|
||||
class: "js-calendar-full",
|
||||
id: "end_date",
|
||||
label: false %>
|
||||
label: t("admin.budget_phases.edit.end_date") %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
<%= f.label :action_type %>
|
||||
<% ::Dashboard::Action.action_types.keys.each do |action_type_value| %>
|
||||
<span class="margin-right">
|
||||
<%= f.radio_button :action_type, action_type_value, label: false,
|
||||
data: { toggle: "request_to_administrators short_description" } %>
|
||||
<%= f.label "action_type_#{action_type_value}", t("admin.dashboard.actions.action_type.#{action_type_value}") %>
|
||||
<%= 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 %>
|
||||
</div>
|
||||
@@ -26,12 +26,10 @@
|
||||
|
||||
<div class="row expanded">
|
||||
<div class="small-12 column">
|
||||
<%= f.label :title %>
|
||||
<%= f.text_field :title, label: false %>
|
||||
<%= f.text_field :title %>
|
||||
|
||||
<div id="short_description" class="hide">
|
||||
<%= f.label :short_description %>
|
||||
<%= f.text_field :short_description, label: false %>
|
||||
<%= f.text_field :short_description %>
|
||||
</div>
|
||||
|
||||
<div class="ckeditor">
|
||||
|
||||
@@ -71,16 +71,14 @@
|
||||
<div class="small-12 medium-9 column">
|
||||
<%= f.label :status %>
|
||||
<% ::Legislation::DraftVersion::VALID_STATUSES.each do |status| %>
|
||||
<%= f.radio_button :status, status, label: false %>
|
||||
<%= f.label "status_#{status}", t("admin.legislation.draft_versions.statuses.#{status}") %>
|
||||
<%= f.radio_button :status, status, label: t("admin.legislation.draft_versions.statuses.#{status}") %>
|
||||
<span class="help-text"><%= t("admin.legislation.draft_versions.form.hints.status.#{status}") %></span>
|
||||
<br>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="small-12 medium-9 column">
|
||||
<%= f.label :final_version %>
|
||||
<%= f.check_box :final_version, label: false %>
|
||||
<%= f.check_box :final_version %>
|
||||
<span class="help-text"><%= t("admin.legislation.draft_versions.form.hints.final_version") %></span>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -15,17 +15,14 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="date-of-birth small-12">
|
||||
<%= f.label :date_of_birth, t("admin.local_census_records.form.date_of_birth") %>
|
||||
<div class="clear">
|
||||
<%= f.date_select :date_of_birth,
|
||||
prompt: true,
|
||||
start_year: 1900, end_year: minimum_required_age.years.ago.year,
|
||||
label: false %>
|
||||
</div>
|
||||
<%= 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") %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="clear row">
|
||||
<div class="small-12">
|
||||
<%= f.text_field :postal_code %>
|
||||
</div>
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
<%= f.select :segment_recipient, options_for_select(user_segments_options,
|
||||
@newsletter[:segment_recipient]) %>
|
||||
<%= f.text_field :subject %>
|
||||
<%= f.label :from, t("admin.newsletters.new.from") %>
|
||||
<%= f.text_field :from, label: false %>
|
||||
<%= f.text_field :from, label: t("admin.newsletters.new.from") %>
|
||||
<%= f.cktext_area :body, ckeditor: { language: I18n.locale } %>
|
||||
|
||||
<div class="margin-top">
|
||||
|
||||
@@ -13,11 +13,9 @@
|
||||
</div>
|
||||
|
||||
<div class="small-12 medium-3 column">
|
||||
<label><%= t("admin.poll_shifts.new.task") %></label>
|
||||
<%= f.select :task,
|
||||
Poll::Shift.tasks.map { |k, v| [t("admin.poll_shifts.#{k}"), k] },
|
||||
{ prompt: t("admin.poll_shifts.new.select_task"),
|
||||
label: false },
|
||||
{ prompt: t("admin.poll_shifts.new.select_task"), label: t("admin.poll_shifts.new.task") },
|
||||
class: "js-poll-shifts" %>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -16,17 +16,14 @@
|
||||
<% end %>
|
||||
|
||||
<div class="small-12 medium-6 column">
|
||||
<%= f.label :name %>
|
||||
<%= f.select :name, options_for_select(valid_blocks, @selected_content_block), label: false %>
|
||||
<%= f.select :name, options_for_select(valid_blocks, @selected_content_block) %>
|
||||
</div>
|
||||
<div class="small-12 medium-6 column">
|
||||
<%= f.label :locale %>
|
||||
<%= f.select :locale, I18n.available_locales, label: false %>
|
||||
<%= f.select :locale, I18n.available_locales %>
|
||||
</div>
|
||||
|
||||
<div class="small-12 column">
|
||||
<%= f.label :body %>
|
||||
<%= f.text_area :body, label: false, rows: 10 %>
|
||||
<%= f.text_area :body, rows: 10 %>
|
||||
<div class="small-12 medium-6 large-3">
|
||||
<%= f.submit class: "button success expanded" %>
|
||||
</div>
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
<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: false %>
|
||||
<%= f.label "status_#{status}", t("admin.site_customization.pages.page.status_#{status}") %>
|
||||
<%= f.radio_button :status, status,
|
||||
label: t("admin.site_customization.pages.page.status_#{status}") %>
|
||||
<br>
|
||||
<% end %>
|
||||
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
|
||||
<%= form_for(@tag, url: admin_tags_path, as: :tag) do |f| %>
|
||||
<div class="small-12 medium-6">
|
||||
<%= f.label :name, t("admin.tags.name.placeholder") %>
|
||||
<%= f.text_field :name, placeholder: t("admin.tags.name.placeholder"), label: false %>
|
||||
<%= f.text_field :name, placeholder: t("admin.tags.name.placeholder"), label: t("admin.tags.name.placeholder") %>
|
||||
</div>
|
||||
|
||||
<%= f.submit(t("admin.tags.create"), class: "button success") %>
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
|
||||
<div class="small-12 medium-6 margin-top">
|
||||
<%= form_for [:admin, @group] do |f| %>
|
||||
<%= f.label :name, t("admin.valuator_groups.form.name") %>
|
||||
<%= f.text_field :name, label: false %>
|
||||
<%= f.text_field :name, label: t("admin.valuator_groups.form.name") %>
|
||||
<%= f.submit t("admin.valuator_groups.form.edit"), class: "button success" %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
|
||||
<div class="small-12 medium-6 margin-top">
|
||||
<%= form_for [:admin, @group] do |f| %>
|
||||
<%= f.label :name, t("admin.valuator_groups.form.name") %>
|
||||
<%= f.text_field :name, label: false %>
|
||||
<%= f.text_field :name, label: t("admin.valuator_groups.form.name") %>
|
||||
<%= f.submit t("admin.valuator_groups.form.new"), class: "button success" %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
@@ -59,8 +59,7 @@
|
||||
<% end %>
|
||||
|
||||
<div class="small-12 column">
|
||||
<%= f.label :location, t("budgets.investments.form.location") %>
|
||||
<%= f.text_field :location, label: false %>
|
||||
<%= f.text_field :location, label: t("budgets.investments.form.location") %>
|
||||
</div>
|
||||
|
||||
<div class="small-12 column">
|
||||
|
||||
@@ -3,8 +3,12 @@
|
||||
<% css_id = parent_or_commentable_dom_id(parent_id, commentable) %>
|
||||
<div id="js-comment-form-<%= css_id %>" <%= "style='display:none'".html_safe if toggeable %> class="comment-form">
|
||||
<%= form_for Comment.new, remote: true do |f| %>
|
||||
<%= label_tag "comment-body-#{css_id}", leave_comment_text(commentable) %>
|
||||
<%= f.text_area :body, id: "comment-body-#{css_id}", maxlength: Comment.body_max_length, label: false %>
|
||||
<%= f.text_area :body,
|
||||
id: "comment-body-#{css_id}",
|
||||
maxlength: Comment.body_max_length,
|
||||
label: leave_comment_text(commentable),
|
||||
label_options: { for: "comment-body-#{css_id}" } %>
|
||||
|
||||
<%= f.hidden_field :commentable_type, value: commentable.class.name %>
|
||||
<%= f.hidden_field :commentable_id, value: commentable.id %>
|
||||
<%= f.hidden_field :parent_id, value: parent_id %>
|
||||
|
||||
@@ -3,10 +3,7 @@
|
||||
<%= form_for(resource, :as => resource_name, :url => [resource_name, :password_expired], :html => { :method => :put }) do |f| %>
|
||||
|
||||
<%= f.password_field :current_password %></p>
|
||||
|
||||
<%= f.label t("devise.password_expired.new_password") %>
|
||||
<%= f.password_field :password, label: false %></p>
|
||||
|
||||
<%= f.password_field :password, label: t("devise.password_expired.new_password") %></p>
|
||||
<%= f.password_field :password_confirmation %></p>
|
||||
|
||||
<p><%= f.submit t("devise.password_expired.change_password") %></p>
|
||||
|
||||
@@ -23,11 +23,8 @@
|
||||
<%= form_for [@receiver, @direct_message] do |f| %>
|
||||
<%= render "shared/errors", resource: @direct_message %>
|
||||
|
||||
<%= f.label :title, t("users.direct_messages.new.title_label") %>
|
||||
<%= f.text_field :title, label: false %>
|
||||
|
||||
<%= f.label :body, t("users.direct_messages.new.body_label") %>
|
||||
<%= f.text_area :body, label: false, rows: "3" %>
|
||||
<%= 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" %>
|
||||
|
||||
<div class="small-12 medium-4">
|
||||
<%= f.submit t("users.direct_messages.new.submit_button"), class: "button expanded" %>
|
||||
|
||||
@@ -5,8 +5,10 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 column">
|
||||
<%= f.label :title, t("proposals.form.proposal_title") %>
|
||||
<%= f.text_field :title, maxlength: Legislation::Proposal.title_max_length, placeholder: t("proposals.form.proposal_title"), label: false %>
|
||||
<%= f.text_field :title,
|
||||
maxlength: Legislation::Proposal.title_max_length,
|
||||
placeholder: t("proposals.form.proposal_title"),
|
||||
label: t("proposals.form.proposal_title") %>
|
||||
</div>
|
||||
|
||||
<%= f.invisible_captcha :subtitle %>
|
||||
@@ -20,8 +22,10 @@
|
||||
</div>
|
||||
|
||||
<div class="ckeditor small-12 column">
|
||||
<%= f.label :description, t("proposals.form.proposal_text") %>
|
||||
<%= f.cktext_area :description, maxlength: Legislation::Proposal.description_max_length, ckeditor: { language: I18n.locale }, label: false %>
|
||||
<%= f.cktext_area :description,
|
||||
maxlength: Legislation::Proposal.description_max_length,
|
||||
ckeditor: { language: I18n.locale },
|
||||
label: t("proposals.form.proposal_text") %>
|
||||
</div>
|
||||
|
||||
<div class="small-12 column">
|
||||
@@ -42,8 +46,8 @@
|
||||
</div>
|
||||
|
||||
<div class="small-12 medium-6 column">
|
||||
<%= f.label :geozone_id, t("proposals.form.geozone") %>
|
||||
<%= f.select :geozone_id, geozone_select_options, { include_blank: t("geozones.none"), label: false } %>
|
||||
<%= f.select :geozone_id, geozone_select_options,
|
||||
include_blank: t("geozones.none"), label: t("proposals.form.geozone") %>
|
||||
</div>
|
||||
|
||||
<div class="small-12 column">
|
||||
|
||||
@@ -13,11 +13,10 @@
|
||||
label: t("management.users.email_optional_label"),
|
||||
placeholder: t("management.email_label") %>
|
||||
<div class="date-of-birth">
|
||||
<%= f.label t("management.date_of_birth") %>
|
||||
<%= f.date_select :date_of_birth,
|
||||
prompt: true,
|
||||
start_year: 1900, end_year: 16.years.ago.year,
|
||||
label: false %>
|
||||
label: t("management.date_of_birth") %>
|
||||
</div>
|
||||
<%= f.submit t("management.users.create_user_submit"), class: "button success" %>
|
||||
<% end %>
|
||||
|
||||
@@ -20,12 +20,8 @@
|
||||
<%= form_for @notification do |f| %>
|
||||
<%= render "shared/errors", resource: @notification %>
|
||||
|
||||
<%= f.label :title, t("proposal_notifications.new.title_label") %>
|
||||
<%= f.text_field :title, label: false %>
|
||||
|
||||
<%= f.label :body, t("proposal_notifications.new.body_label") %>
|
||||
<%= f.text_area :body, label: false, rows: "3" %>
|
||||
|
||||
<%= 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.hidden_field :proposal_id, value: @proposal.id %>
|
||||
|
||||
<div class="small-12 medium-4">
|
||||
|
||||
@@ -58,8 +58,8 @@
|
||||
<% end %>
|
||||
|
||||
<div class="small-12 medium-6 column">
|
||||
<%= f.label :geozone_id, t("proposals.form.geozone") %>
|
||||
<%= f.select :geozone_id, geozone_select_options, { include_blank: t("geozones.none"), label: false } %>
|
||||
<%= f.select :geozone_id, geozone_select_options,
|
||||
include_blank: t("geozones.none"), label: t("proposals.form.geozone") %>
|
||||
</div>
|
||||
|
||||
<% if feature?(:map) %>
|
||||
|
||||
@@ -16,8 +16,9 @@
|
||||
<%= render "shared/errors", resource: @proposal %>
|
||||
<div class="row">
|
||||
<div class="small-12 medium-6 large-4 column">
|
||||
<%= f.label :retired_reason, t("proposals.retire_form.retired_reason_label") %>
|
||||
<%= f.select :retired_reason, retire_proposals_options, { include_blank: t("proposals.retire_form.retired_reason_blank"), label: false } %>
|
||||
<%= f.select :retired_reason, retire_proposals_options,
|
||||
include_blank: t("proposals.retire_form.retired_reason_blank"),
|
||||
label: t("proposals.retire_form.retired_reason_label") %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -31,9 +31,8 @@
|
||||
|
||||
<%= form_for(@resource, url: new_url_path, method: :get) do |f| %>
|
||||
<div class="small-12 medium-4">
|
||||
<%= f.label :geozone_id, t("map.select_district") %>
|
||||
<%= f.select :geozone_id, geozone_select_options,
|
||||
{ include_blank: t("geozones.none"), label: false } %>
|
||||
include_blank: t("geozones.none"), label: t("map.select_district") %>
|
||||
</div>
|
||||
|
||||
<div class="actions small-12">
|
||||
|
||||
@@ -4,11 +4,8 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 column">
|
||||
<%= f.label :title, t("community.topic.form.topic_title") %>
|
||||
<%= f.text_field :title, label: false %>
|
||||
|
||||
<%= f.label :description, t("community.topic.form.topic_text") %>
|
||||
<%= f.text_area :description, label: false, rows: "5" %>
|
||||
<%= 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.submit(class: "button", value: t("community.topic.form.#{action_name}.submit_button")) %>
|
||||
</div>
|
||||
|
||||
@@ -27,10 +27,9 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="column">
|
||||
<%= f.label :publication_date, t("tracking.milestones.new.date") %>
|
||||
<%= f.text_field :publication_date,
|
||||
value: @milestone.publication_date.present? ? l(@milestone.publication_date.to_date) : nil,
|
||||
label: false,
|
||||
label: t("tracking.milestones.new.date"),
|
||||
class: "js-calendar-full" %>
|
||||
|
||||
<%= render "images/admin_image", imageable: @milestone, f: f %>
|
||||
|
||||
@@ -6,8 +6,10 @@
|
||||
<%= render "shared/errors", resource: resource %>
|
||||
<div class="row">
|
||||
<div class="small-12 column">
|
||||
<%= f.label :email, t("devise_views.users.registrations.edit.email_label") %>
|
||||
<%= f.email_field :email, label: false, autofocus: true, placeholder: t("devise_views.users.registrations.edit.email_label") %>
|
||||
<%= f.email_field :email,
|
||||
label: t("devise_views.users.registrations.edit.email_label"),
|
||||
autofocus: true,
|
||||
placeholder: t("devise_views.users.registrations.edit.email_label") %>
|
||||
</div>
|
||||
|
||||
<div class="small-12 column">
|
||||
@@ -25,8 +27,10 @@
|
||||
</div>
|
||||
|
||||
<div class="small-12 column">
|
||||
<%= f.label :password_confirmation, t("devise_views.users.registrations.edit.password_confirmation_label") %>
|
||||
<%= f.password_field :password_confirmation, label: false, autocomplete: "off", placeholder: t("devise_views.users.registrations.edit.password_confirmation_label") %>
|
||||
<%= f.password_field :password_confirmation,
|
||||
label: t("devise_views.users.registrations.edit.password_confirmation_label"),
|
||||
autocomplete: "off",
|
||||
placeholder: t("devise_views.users.registrations.edit.password_confirmation_label") %>
|
||||
</div>
|
||||
|
||||
<div class="small-12 column">
|
||||
|
||||
@@ -7,22 +7,22 @@
|
||||
<legend><%= t("valuation.budget_investments.edit.feasibility") %></legend>
|
||||
<div class="small-4 column">
|
||||
<span class="radio">
|
||||
<%= f.radio_button :feasibility, "undecided", label: false %>
|
||||
<%= f.label :feasibility_undecided, t("valuation.budget_investments.edit.undefined_feasible") %>
|
||||
<%= f.radio_button :feasibility, "undecided",
|
||||
label: t("valuation.budget_investments.edit.undefined_feasible") %>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="small-4 column">
|
||||
<span class="radio">
|
||||
<%= f.radio_button :feasibility, "feasible", label: false %>
|
||||
<%= f.label :feasibility_feasible, t("valuation.budget_investments.edit.feasible") %>
|
||||
<%= f.radio_button :feasibility, "feasible",
|
||||
label: t("valuation.budget_investments.edit.feasible") %>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="small-4 column">
|
||||
<span class="radio">
|
||||
<%= f.radio_button :feasibility, "unfeasible", label: false %>
|
||||
<%= f.label :feasibility_unfeasible, t("valuation.budget_investments.edit.unfeasible") %>
|
||||
<%= f.radio_button :feasibility, "unfeasible",
|
||||
label: t("valuation.budget_investments.edit.unfeasible") %>
|
||||
</span>
|
||||
</div>
|
||||
</fieldset>
|
||||
@@ -33,8 +33,9 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 column">
|
||||
<%= f.label :unfeasibility_explanation, t("valuation.budget_investments.edit.feasible_explanation_html") %>
|
||||
<%= f.text_area :unfeasibility_explanation, label: false, rows: 3 %>
|
||||
<%= f.text_area :unfeasibility_explanation,
|
||||
label: t("valuation.budget_investments.edit.feasible_explanation_html"),
|
||||
rows: 3 %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -44,27 +45,29 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 medium-6 column">
|
||||
<%= f.label :price, "#{t("valuation.budget_investments.edit.price_html", currency: budget.currency_symbol)}" %>
|
||||
<%= f.number_field :price, label: false, max: 1000000000000000 %>
|
||||
<%= f.number_field :price,
|
||||
label: t("valuation.budget_investments.edit.price_html", currency: budget.currency_symbol),
|
||||
max: 1000000000000000 %>
|
||||
</div>
|
||||
|
||||
<div class="small-12 medium-6 column end">
|
||||
<%= f.label :price_first_year, "#{t("valuation.budget_investments.edit.price_first_year_html", currency: budget.currency_symbol)}" %>
|
||||
<%= f.number_field :price_first_year, label: false, max: 1000000000000000 %>
|
||||
<%= f.number_field :price_first_year,
|
||||
label: t("valuation.budget_investments.edit.price_first_year_html", currency: budget.currency_symbol),
|
||||
max: 1000000000000000 %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 column">
|
||||
<%= f.label :price_explanation, t("valuation.budget_investments.edit.price_explanation_html") %>
|
||||
<%= f.text_area :price_explanation, label: false, rows: 3 %>
|
||||
<%= f.text_area :price_explanation,
|
||||
label: t("valuation.budget_investments.edit.price_explanation_html"),
|
||||
rows: 3 %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 medium-6 column">
|
||||
<%= f.label :duration, t("valuation.budget_investments.edit.duration_html") %>
|
||||
<%= f.text_field :duration, label: false %>
|
||||
<%= f.text_field :duration, label: t("valuation.budget_investments.edit.duration_html") %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -39,8 +39,8 @@
|
||||
<div class="row">
|
||||
<div class="small-12 medium-8">
|
||||
<div class="small-12 medium-3 column">
|
||||
<%= f.label t("verification.residence.new.document_type_label") %>
|
||||
<%= f.select :document_type, document_types, prompt: "", label: false %>
|
||||
<%= f.select :document_type, document_types, prompt: "",
|
||||
label: t("verification.residence.new.document_type_label") %>
|
||||
</div>
|
||||
<div class="small-12 medium-5 column end">
|
||||
|
||||
@@ -64,11 +64,10 @@
|
||||
</div>
|
||||
|
||||
<div class="date-of-birth small-12 medium-6 clear">
|
||||
<%= f.label t("verification.residence.new.date_of_birth") %>
|
||||
<%= f.date_select :date_of_birth,
|
||||
prompt: true,
|
||||
start_year: 1900, end_year: minimum_required_age.years.ago.year,
|
||||
label: false %>
|
||||
label: t("verification.residence.new.date_of_birth") %>
|
||||
</div>
|
||||
|
||||
<div class="small-12 medium-5 clear">
|
||||
|
||||
@@ -33,8 +33,7 @@
|
||||
<% end %>
|
||||
|
||||
<div class="small-12 medium-6">
|
||||
<%= f.label t("verification.sms.edit.confirmation_code") %>
|
||||
<%= f.text_field :confirmation_code, label: false %>
|
||||
<%= f.text_field :confirmation_code, label: t("verification.sms.edit.confirmation_code") %>
|
||||
</div>
|
||||
|
||||
<%= f.submit t("verification.sms.edit.submit_button"), class: "button success" %>
|
||||
|
||||
Reference in New Issue
Block a user