2022-03-26 07:52:56 +00:00
|
|
|
<div>
|
|
|
|
<form>
|
|
|
|
<h4><%= t(:category) %></h4>
|
|
|
|
<select name="category" id="submit_when_change">
|
|
|
|
<% @cats_relations.each do |id, title| %>
|
|
|
|
<option value="<%=id%>" <%= @category_id == id ? 'selected' : '' %>><%= title %></option>
|
|
|
|
<% end %>
|
|
|
|
</select>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
<%= form_for @set, as: :ask_print_setting ,method: 'post',url: @url,html: { class: 'form-horizontal main-forms previewable' } do |f| %>
|
|
|
|
<%= hidden_field_tag "#{f.object_name}[category_id]", @category_id %>
|
2020-07-04 13:36:32 +00:00
|
|
|
<fieldset>
|
|
|
|
<table>
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th></th>
|
|
|
|
<th></th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<%= label_tag t('ask.save_name') %>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<%= f.text_field :save_name %>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<%= label_tag t('ask.print_format') %>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<%= f.text_area :print_format,class: 'ckeditor' %>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td colspan="2" style="text-align: center;">
|
|
|
|
<input class="btn btn-primary" type="submit" value="<%= t('submit')%>">
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</fieldset>
|
|
|
|
<% end %>
|
2022-03-26 07:52:56 +00:00
|
|
|
<%= render partial: 'print_format_explain' %>
|
|
|
|
<script>
|
|
|
|
$(document).ready(function(){
|
|
|
|
$("#submit_when_change").on("change",function(){
|
|
|
|
$(this)[0].form.submit();
|
|
|
|
})
|
|
|
|
})
|
|
|
|
</script>
|