54 lines
1.4 KiB
Plaintext
54 lines
1.4 KiB
Plaintext
<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 %>
|
|
<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 %>
|
|
<%= render partial: 'print_format_explain' %>
|
|
<script>
|
|
$(document).ready(function(){
|
|
$("#submit_when_change").on("change",function(){
|
|
$(this)[0].form.submit();
|
|
})
|
|
})
|
|
</script> |