ask/app/views/admin/asks/_default_ask_setting.html.erb

18 lines
963 B
Plaintext
Raw Normal View History

<div id="default_ask_setting" class="<%= 'hide' if @is_hidden %>">
<div class="show_default_ask_setting">
<%= render :partial => 'show_default_ask_setting' %>
</div>
<div class="default_ask_setting hide">
<%= form_for @default_ask_setting, method: 'post',url: @url,html: { class: 'form-horizontal main-forms previewable fix_diabled_form' } do |f| %>
<% f.object_name = 'ask_category_setting' %>
<%= hidden_field_tag "not_clone_attrs", true , :class=> 'not_clone_attrs' %>
<%= hidden_field_tag "category_id", @first_category_id , :class=> 'hidden_category_id' %>
<%= render partial: 'ask_setting',locals:{ask_setting: @default_ask_setting,f: f,submit_text: t('submit'), :@has_email_regex => false, :@has_switch_button => true, :@default_custom_fields => true } %>
<% end %>
<script>
$('.fix_diabled_form').on('submit', function(){
$(this).find('input[disabled]').removeAttr('disabled');
})
</script>
</div>
</div>