|
1 | 1 | <% if @issue and User.current.allowed_to?(:view_gtt_print, @issue.project) and (layouts = RedmineGttPrint.layouts_for_tracker(@issue.tracker)).present? %>
|
2 | 2 | <h3><%= l :label_gtt_print_title %></h3>
|
3 |
| - <%= form_tag gtt_print_jobs_path, remote: true do |f| %> |
| 3 | + <%= form_for :gtt_print_job, url: gtt_print_jobs_path, remote: true do |f| %> |
4 | 4 | <%= hidden_field_tag :issue_id, @issue.id %>
|
5 |
| - <%= text_area_tag :gtt_print_custom_text %><br> |
6 |
| - <%= select_tag :gtt_print_layout, options_from_collection_for_select(layouts, :to_s, :to_s) %> |
| 5 | + <%= f.text_area :custom_text %><br> |
| 6 | + <%= f.select :layout, options_from_collection_for_select(layouts, :to_s, :to_s) %> |
7 | 7 | <button type="submit"><%= l :button_gtt_print_submit %></button>
|
8 | 8 | <% end %>
|
9 | 9 | <% end %>
|
|
15 | 15 | %>
|
16 | 16 |
|
17 | 17 | <h3><%= l :label_gtt_print_title %></h3>
|
18 |
| - <%= form_tag gtt_print_jobs_path, remote: true do |f| %> |
| 18 | + <%= form_for :gtt_print_job, url: gtt_print_jobs_path, remote: true do |f| %> |
19 | 19 | <%= hidden_field_tag :issue_ids, @issues.map(&:id).join(',') %>
|
20 |
| - <%= text_area_tag :gtt_print_custom_text %><br> |
21 |
| - <%= select_tag :gtt_print_layout, options_from_collection_for_select(layouts, :to_s, :to_s) %> |
| 20 | + <%= f.text_area :custom_text %><br> |
| 21 | + <%= f.select :layout, options_from_collection_for_select(layouts, :to_s, :to_s) %> |
22 | 22 | <button type="submit"><%= l :button_gtt_print_submit %></button>
|
23 | 23 | <% end %>
|
24 | 24 |
|
|
0 commit comments