Commit 88c5d8663194525cdb17c9fa1d8d9c28d7b8a2e2

Authored by Larissa Reis
1 parent 99f5d74c

custom_forms: Remove obsolete partials

plugins/custom_forms/views/custom_forms_plugin_myprofile/_edit_select.html.erb
... ... @@ -1,32 +0,0 @@
1   -<div class='edit-information edit-select'>
2   - <h2><%= c_('Options') %></h2>
3   - <table class='action-table' style='width: 420px'>
4   - <tr>
5   - <th style='width: 40%'><%= _('Name') %></th>
6   - <th style='width: 40%'><%= _('Value') %></th>
7   - <th style='width: 20%'><%= c_('Delete') %></th>
8   - </tr>
9   - <% option_counter = 1 %>
10   - <% (field.choices || {}).each do |name, value| %>
11   - <%= render :partial => 'option', :locals => {:name => name, :value => value, :counter => counter, :option_counter => option_counter} %>
12   - <% option_counter += 1 %>
13   - <% end %>
14   - <%= render :partial => 'empty_option', :locals => {:counter => counter, :option_counter => option_counter} %>
15   - <tr class='new-item'>
16   - <td colspan='3'>
17   - <%= button(:add, _('Add a new option'), '#', :class => 'new-option', :field_id => counter)%>
18   - </td>
19   - </tr>
20   - </table>
21   -
22   - <h3><%= c_('Type') %></h3>
23   - <%= labelled_radio_button 'Radio', "fields[#{counter}][kind]", 'radio', !field.multiple && !field.list %><br />
24   - <%= labelled_radio_button 'Checkbox', "fields[#{counter}][kind]", 'check_box', field.multiple && !field.list %><br />
25   - <%= labelled_radio_button 'Select', "fields[#{counter}][kind]", 'select', !field.multiple && field.list %><br />
26   - <%= labelled_radio_button 'Multiple Select', "fields[#{counter}][kind]", 'multiple_select', field.multiple && field.list %><br />
27   -
28   - <% button_bar do %>
29   - <%= button :ok, _('Ok'), '#', :div_id => elem_id %>
30   - <% end %>
31   -</div>
32   -
plugins/custom_forms/views/custom_forms_plugin_myprofile/_empty_field.html.erb
... ... @@ -1,10 +0,0 @@
1   -<tr id="empty-field" style='display: none' last_id=<%= counter %>>
2   - <td style="text-align: left"><%= text_field "fields[#{counter}]", :name, :size => 25 %></td>
3   - <td><%= select "fields[#{counter}]", :type, type_options, :selected => type_for_options(field.class) %></td>
4   - <td><%= check_box "fields[#{counter}]", :mandatory %></td>
5   - <%= hidden_field "fields[#{counter}]", :form_id, :value => @form.id %>
6   - <td class='actions'>
7   - <%= button_without_text :edit, c_('Edit'), '', :field_id => counter %>
8   - <%= button_without_text :remove, c_('Remove'), '#', class: 'remove-field', field_id: counter, data: {confirm: _('Are you sure you want to remove this field?')} %>
9   - </td>
10   -</tr>
plugins/custom_forms/views/custom_forms_plugin_myprofile/_empty_option.html.erb
... ... @@ -1,8 +0,0 @@
1   -<tr id=<%= "empty-option-#{counter}" %> option_id=<%= option_counter %> style="display: none;">
2   - <td><%= text_field_tag("fields[#{counter}][choices][#{option_counter}][name]") %></td>
3   - <td><%= text_field_tag("fields[#{counter}][choices][#{option_counter}][value]") %></td>
4   - <td class='actions'>
5   - <%= button_without_text :remove, c_('Remove'), '#', class: 'remove-option', field_id: counter, option_id: option_counter, data: {confirm: _('Are you sure you want to remove this option?')} %>
6   - </td>
7   -</tr>
8   -