ref: master
plugins/suppliers/views/suppliers_plugin_myprofile/_edit.html.erb
<% supplier_label = (supplier.new_record? ? "add" : supplier.id) %><% if supplier.new_record? %> <% if supplier.dummy? %> <%= t('views.supplier._edit.add_supplier_managed_') %> <% else %> <%= t('views.supplier._edit.register_new_supplier') %> <% end %> <% else %> <%= t('views.supplier._edit.edit_supplier') %> <% end %><% if supplier.dummy? %><%= t('views.supplier._edit.registry_help') %><% end %> <%= form_for supplier, as: :supplier, url: {action: supplier.new_record? ? :new : :edit, id: supplier.id}, remote: true, html: {data: {loading: "#supplier-#{supplier_label}"}, class: 'full-registration'} do |f| %> <%= error_messages_for :supplier %><%= check_box_tag :full_registration, '1', false, onchange: "jQuery(this).parents('.supplier').find('.data').toggleClass('full-registration', this.checked)" %> <%= label_tag :full_registration, t('views.supplier._edit.full_registration') %><%= f.submit t('views.supplier._edit.save') %> <%= link_to_function t('views.supplier._edit.cancel'), '', 'toggle-edit' => '' %> <% end %><%= t('views.supplier._edit.basic_data') %>
<%= labelled_field f, :name, t('views.supplier._edit.name'), f.text_field(:name) %> <%= labelled_field f, :name_abbreviation, t('views.supplier._edit.abbreviated_name'), f.text_field(:name_abbreviation) %> <%= labelled_field f, :description, t('views.supplier._edit.description'), f.text_area(:description, maxlength: '550') %><%= t('views.supplier._edit.estrategic_informatio') %>
<%= t('views.supplier._edit.registry_form') %>
<%= t('views.supplier._edit.additional_fields') %>