Simplify hiding/showing progress bar type field
With a parent element for just input and label, there aren't conflicts with the globalize tabs code anymore.
This commit is contained in:
@@ -34,9 +34,9 @@ App.Forms =
|
||||
title_field = $("[name^='progress_bar'][name$='[title]']").parent()
|
||||
|
||||
if this.value == "primary"
|
||||
title_field.addClass("hide")
|
||||
title_field.hide()
|
||||
else
|
||||
title_field.removeClass("hide")
|
||||
title_field.show()
|
||||
|
||||
$("[name='progress_bar[kind]']").change()
|
||||
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
<%= f.enum_select :kind %>
|
||||
</div>
|
||||
|
||||
<div class="small-12 medium-6">
|
||||
<%= f.translatable_fields do |translations_form| %>
|
||||
<%= f.translatable_fields do |translations_form| %>
|
||||
<div class="small-12 medium-6">
|
||||
<%= translations_form.text_field :title %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% progress_options = { min: ProgressBar::RANGE.min, max: ProgressBar::RANGE.max, step: 1 } %>
|
||||
<div class="small-12 medium-6 large-2">
|
||||
|
||||
Reference in New Issue
Block a user