Simplify generating fields with hints

We were already using this code in translatable forms. Using it on every
form means we can reduce the code we need to generate a field with a
hint.
This commit is contained in:
Javi Martín
2019-10-03 02:25:14 +02:00
parent ae6fab9f5e
commit 4a19bb6b77
8 changed files with 39 additions and 70 deletions

View File

@@ -32,9 +32,8 @@
</div>
<div class="small-12 medium-6 column">
<%= f.label :slug %>
<p class="help-text"><%= t("admin.site_customization.pages.new.slug_help_html") %>
<%= f.text_field :slug, label: false, size: 80, maxlength: 80 %>
<%= f.text_field :slug, size: 80, maxlength: 80,
hint: t("admin.site_customization.pages.new.slug_help_html") %>
</div>
</div>