diff --git a/app/views/phases/_admin_add.html.erb b/app/views/phases/_admin_add.html.erb index d4150b5..2adfc78 100644 --- a/app/views/phases/_admin_add.html.erb +++ b/app/views/phases/_admin_add.html.erb @@ -1,29 +1,30 @@

<%= _('Phase details') %>

<%= _('When you create a new phase for your template, a version will automatically be created. Once you complete the form below you will be provided with options to create sections and questions.') %>

<%= form_for :phase, { url: admin_create_phase_path } do |f| %> - <%= f.hidden_field :template_id, value: @template.id%> - -
- <%= f.label(:title, _('Title') ,class: 'control-label') %> +
+ <%= f.label(:title, _('Title') ,class: "control-label") %> <%= f.text_field(:title, class: "form-control", 'aria-required': false, 'data-toggle': 'tooltip', title: _('Enter a title for the phase e.g. intial DMP, full DMP... This is what users will see in the tabs when completing a plan. If you only have one phase, call it something generic e.g. Glasgow DMP')) %>
-
- <%= f.label(:number, _('Order of display'), class: 'control-label') %> - <%= f.number_field(:number, in: 1..5, class: "form-control", 'aria-required': false, 'data-toggle': 'tooltip', title: _('This allows you to order the phases of your template.')) %> -
- -
- <%= f.label(:description, _('Description'), class: 'control-label') %> -
"> - <%= text_area_tag('phase-desc', '', class: 'tinymce form-control', rows: "3") %> +
+
+ <%= f.label(:number, _('Order of display'), class: "control-label") %> +
+
+ <%= f.number_field(:number, in: 1..5, class: "form-control", 'aria-required': false, 'data-toggle': 'tooltip', title: _('This allows you to order the phases of your template.')) %>
-
+
+ <%= f.label(:description, _('Description'), class: "control-label") %> +
"> + <%= text_area_tag('phase-desc', '', class: "tinymce form-control") %> +
+
+ +
<%= f.button(_('Save'), class: 'btn btn-default', type: "submit") %> <%= link_to(_('Cancel'), admin_template_template_path(@template), { class: 'btn btn-default', role: "button" }) %>
- <% end %> \ No newline at end of file diff --git a/app/views/phases/_edit_phase.html.erb b/app/views/phases/_edit_phase.html.erb index 8c989de..0423a90 100644 --- a/app/views/phases/_edit_phase.html.erb +++ b/app/views/phases/_edit_phase.html.erb @@ -1,22 +1,28 @@ <%= form_for :phase, { url: admin_update_phase_path(phase.id), html: { method: :put }} do |f| %> -
- <%= f.label(:title, _('Title') ,class: 'control-label') %> +
+ <%= f.label(:title, _('Title') ,class: "control-label") %> <%= f.text_field(:title, class: "form-control", 'aria-required': false, 'data-toggle': 'tooltip', title: _('Enter a title for the phase e.g. intial DMP, full DMP... This is what users will see in the tabs when completing a plan. If you only have one phase, call it something generic e.g. Glasgow DMP')) %>
-
- <%= f.label(:number, _('Order of display'), class: 'control-label') %> - <%= f.number_field(:number, in: 1..5, class: "form-control", 'aria-required': false, 'data-toggle': 'tooltip', title: _('This allows you to order the phases of your template.')) %> +
+
+ <%= f.label(:number, _('Order of display'), class: "control-label") %> +
+
+ <%= f.number_field(:number, in: 1..5, class: "form-control", 'aria-required': false, 'data-toggle': 'tooltip', title: _('This allows you to order the phases of your template.')) %> +
-
- <%= f.label(:description, _('Description'), class: 'control-label') %> +
+ <%= f.label(:description, _('Description'), class: "control-label") %>
"> - <%= text_area_tag('phase-desc', phase.description, class: 'phase form-control') %> + <%= text_area_tag('phase-desc', phase.description, class: 'phase tinymce form-control') %>
-
- <%= f.button(_('Save'), class: 'btn btn-default', type: "submit") %> - <%= link_to _('Cancel'), '#', class: 'btn btn-default phase_show_link', role: 'button' %> +
+
+ <%= f.button(_('Save'), class: 'btn btn-default', type: "submit") %> + <%= link_to _('Cancel'), '#', class: 'btn btn-default phase_show_link', role: 'button' %> +
<% end %> \ No newline at end of file diff --git a/app/views/questions/_add_question.html.erb b/app/views/questions/_add_question.html.erb index 006baed..e817622 100644 --- a/app/views/questions/_add_question.html.erb +++ b/app/views/questions/_add_question.html.erb @@ -7,43 +7,41 @@ --> <% @new_question = Question.new %> <% @new_question.number = section.questions.count + 1 %> -<%= form_for @new_question, url: admin_create_question_path , html: {id: "new_question_#{section.id}", class: 'form-horizontal question_form'} do |f| %> +<%= form_for @new_question, url: admin_create_question_path , html: {id: "new_question_#{section.id}", class: 'question_form'} do |f| %> <%= f.hidden_field :section_id, value: section.id %> <%= hidden_field_tag :section_id, section.id, class: "section_id_new" %> + -
- <%= f.label(:number, _('Question Number'), class: 'col-md-2 control-label') %> -
- <%= f.number_field(:number, in: 1..50, class: "form-control", "aria-required": true, 'aria-required': true) %> -
+
+ <%= f.label(:number, _('Question Number'), class: "control-label") %> + <%= f.number_field(:number, in: 1..50, class: "form-control", "aria-required": true, 'aria-required': true) %>
+ -
- <%= f.label(:text, _('Question text'), class: 'col-md-2 control-label') %> -
- <%= f.text_area(:text, class: "question") %> -
+
+ <%= f.label(:text, _('Question text'), class: "control-label") %> + <%= f.text_area(:text, class: "question") %>
+ -
- <%= f.label(:question_format_id, _('Answer format'), class: 'col-md-2 control-label') %> -
- <%= f.select :question_format_id, - options_from_collection_for_select(QuestionFormat.all.order("title"), - :id, - :title, - QuestionFormat.id_for(QuestionFormat.formattypes[:textarea])), - {}, - class: "form-control", - 'data-toggle': 'tooltip', - 'data-html': true, - title: _("You can choose from:
  • - text area (large box for paragraphs);
  • - text field (for a short answer);
  • - checkboxes where options are presented in a list and multiple values can be selected;
  • - radio buttons where options are presented in a list but only one can be selected;
  • - dropdown like this box - only one option can be selected;
  • - multiple select box allows users to select several options from a scrollable list, using the CTRL key;
") - %> -
+
+ <%= f.label(:question_format_id, _('Answer format'), class: "control-label") %> + <%= f.select :question_format_id, + options_from_collection_for_select(QuestionFormat.all.order("title"), + :id, + :title, + QuestionFormat.id_for(QuestionFormat.formattypes[:textarea])), + {}, + class: "form-control", + 'data-toggle': 'tooltip', + 'data-html': true, + title: _("You can choose from:
  • - text area (large box for paragraphs);
  • - text field (for a short answer);
  • - checkboxes where options are presented in a list and multiple values can be selected;
  • - radio buttons where options are presented in a list but only one can be selected;
  • - dropdown like this box - only one option can be selected;
  • - multiple select box allows users to select several options from a scrollable list, using the CTRL key;
") + %>
+ -