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:
Javi Martín
2019-10-02 23:27:48 +02:00
parent 42dbbf5507
commit 3ea9f3cecf
31 changed files with 109 additions and 141 deletions

View File

@@ -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 %>