<%= form_for(section, url: url, namespace: section.id.present? ? section.id : 'new_section', html: { method: method }) do |f| %> <div class="form-group col-md-10"> <%= f.label(:title, _('Title') ,class: "control-label") %> <%= f.text_field(:title, { class: "form-control", 'aria-required': false, placeholder: _('Enter a title for the section'), 'data-toggle': 'tooltip', title: _('Enter a title for the section'), 'aria-required': true} ) %> </div> <div class="form-group"> <div class="col-md-10"> <%= f.label(:number, _('Order of display'), class: "control-label") %> </div> <div class="col-md-4"> <%= f.number_field(:number, in: 1..15, class: "form-control", 'aria-required': true, 'data-toggle': 'tooltip', title: _('This allows you to order sections.')) %> </div> </div> <div class="form-group col-md-10" data-toggle="tooltip" title="<%= _("Enter a basic description. This could be a summary of what is covered in the section or instructions on how to answer. This text will be displayed in the coloured banner once a section is opened to edit.") %>"> <%= f.label(:description, _('Description'), class: "control-label") %> <%= f.text_area(:description, class: "section") %> </div> <div class="form-group col-md-10"> <div class="pull-right"> <%= f.button(_('Save'), class: 'btn btn-default', type: "submit") %> <% if section.id.present? %> <%= link_to _('Delete'), org_admin_template_phase_section_path(template_id: template.id, phase_id: section.phase.id, id: section), 'data-method': 'delete', rel: 'nofollow', 'data-confirm': _("You are about to delete '%{section_title}'. This will affect questions linked to this section. Are you sure?") % { :section_title => section.title }, class: 'btn btn-default', role:'button' %> <% end %> </div> </div> <% end %>