diff --git a/app/views/annotations/_DELETE_add_annotation.html.erb b/app/views/annotations/_DELETE_add_annotation.html.erb deleted file mode 100644 index d9c3ebe..0000000 --- a/app/views/annotations/_DELETE_add_annotation.html.erb +++ /dev/null @@ -1,32 +0,0 @@ - -

<%= _('Add Annotations') %>

-<%= form_tag admin_create_annotation_path , class: 'add_annotation_form' do %> - - - - - - - - - -
<%= _('Example Answer')%> -
    -
  • <%= text_area_tag :example_answer_text, nil, rows: 5 %> -
  • -
-
<%= _('Guidance')%> -
    -
  • <%= text_area_tag :guidance_text, nil, rows: 5 %> -
  • -
-
-
- - -
- <%= submit_tag _('Save'), class: "btn btn-primary", role: 'button' %> - <%= hidden_field_tag :question_id, question.id, class: "question_id" %> - <%= link_to _('Cancel'), '#' , class: "btn btn-primary cancel_edit_annotations", role: 'button' %> -
-<%end%> diff --git a/app/views/annotations/_DELETE_edit_annotation.html.erb b/app/views/annotations/_DELETE_edit_annotation.html.erb deleted file mode 100644 index cb7ac81..0000000 --- a/app/views/annotations/_DELETE_edit_annotation.html.erb +++ /dev/null @@ -1,43 +0,0 @@ - -<%= form_tag admin_update_annotation_path, method: :put do %> - <% example_answer_text = example_answer.present? ? example_answer.text : '' %> - <% guidance_text = guidance.present? ? guidance.text : '' %> - <%= hidden_field_tag :example_answer_id, example_answer.present? ? example_answer.id : nil %> - <%= hidden_field_tag :guidance_id, guidance.present? ? guidance.id : nil %> - - - - - - - - - - -
<%= _('Example Answer')%> -
    -
  • <%= text_area_tag :example_answer_text, example_answer_text, rows: 5 %>
  • -
-
<%= _('Guidance')%> -
    -
  • <%= text_area_tag :guidance_text, guidance_text, rows: 5 %>
  • -
-
-
- - -
- <%= submit_tag _('Save'), class: 'btn btn-primary', role: 'button' %> - <% if example_answer.present? %> - <%= link_to _('Delete Example Answer'), admin_destroy_annotation_path(id: example_answer.id), - confirm: _("You are about to delete an example answer for '%{question_text}'. Are you sure?") % { :question_text => question.text }, method: :delete, class: "btn btn-primary", role: 'button' %> - <% end %> - <% if guidance.present? %> - <%= link_to _('Delete Example Answer'), admin_destroy_annotation_path(id: guidance.id), - confirm: _("You are about to delete a guidance for '%{question_text}'. Are you sure?") % { :question_text => question.text }, method: :delete, class: "btn btn-primary", role: 'button'%> - <% end %> - - <%= hidden_field_tag :question_id, question.id, class: "question_id" %> - <%= link_to _('Cancel'),'#' , class: "btn btn-primary cancel_edit_annotations", role: 'button' %> -
-<% end %> diff --git a/app/views/annotations/_DELETE_show_annotation.html.erb b/app/views/annotations/_DELETE_show_annotation.html.erb deleted file mode 100644 index 9ed4d19..0000000 --- a/app/views/annotations/_DELETE_show_annotation.html.erb +++ /dev/null @@ -1,26 +0,0 @@ - -

<%= _('Annotations') %>

- - <% if example_answer.present? %> - - - - - <% end %> - <% if guidance.present? %> - - - - - <% end %> -
- <%= _('Example Answer')%> - <%= raw example_answer.text %>
- <%= _('Guidance')%> - <%= raw guidance.text %>
-
- -
- <%= hidden_field_tag :question_id, question.id, class: "question_id" %> - <%= link_to _('Edit Annotations'), '# ', class: "btn btn-primary edit_form_for_annotations", role: 'button'%> -
diff --git a/app/views/templates/_DELETE_edit_annotations.html.erb b/app/views/templates/_DELETE_edit_annotations.html.erb deleted file mode 100644 index efc2244..0000000 --- a/app/views/templates/_DELETE_edit_annotations.html.erb +++ /dev/null @@ -1,94 +0,0 @@ - - -<%= form_for(question, url: admin_update_question_path(question), html: { method: :put}) do |f| %> -
- - <%= f.hidden_field :id,{ class: "quest_id" } %> - - - - - - - - - - - - - - - - - - - - - - - -
<%= _('Question number')%><%= question.number %> -
-
<%= _('Question text')%><%= raw question.text %> -
-
- <% q_format = question.question_format %> - <% if q_format.title == _('Check box') || q_format.title == _('Multi select box') || q_format.title == _('Radio buttons') || q_format.title == _('Dropdown') %> -
    - <% if question.question_options.is_a? QuestionOption %> -
  • - <%= question.question_options.text %>
  • - <% else %> - <% if !question.question_options.to_a.nil? %> - <% question.question_options.to_a.sort_by{|op| op['number']}.each do |o| %> -
  • - <%= o.text %>
  • - <% end %> - <% end %> - <% end %> -
- <% end %> -
-
<%= _('example answer')%> -
- <% annotations = question.annotations.where(org_id: current_user.org_id).where(type: Annotation.types[:example_answer]).order(:created_at).first %> - <% if annotations.nil? %> - <% annotations = question.annotations.build %> - <% end %> - <%= f.fields_for :annotations, annotation do |s|%> - <%= s.hidden_field :org_id, value: current_user.org.id %> -
    -
  • <%= s.text_area :text, rows: 5, 'data-toggle': 'tooltip', title: _('You can add an example or suggested answer to help users respond. These will be presented above the answer box and can be copied/ pasted.') %>
  • -
- <% end %> -
-
-
-
<%= _('Guidance')%> -
"> - <%= text_area_tag("question-guidance-#{question.id}", question.guidance , class: "tinymce") %> -
-
-
-
-
- -
- <%= f.submit _('Save'), class: "btn btn-primary", role:"button" %> - <% if !question.section.phase.template.published? %> - <%= link_to _('Delete'), admin_destroy_question_path(question_id: question.id), - confirm: _("You are about to delete '%{question_text}'. Are you sure?") % { :question_text => question.text }, method: :delete, class: "btn btn-primary", role:"button"%> - <% end %> - <%= hidden_field_tag :question_id, question.id, class: "question_id" %> - <%= link_to _('Cancel'), "#", class: "btn cancel cancel_edit_question", role:"button" %> -
-
- - - -<%= render partial: "guidances/guidance_display", locals: {question: question} %> -<% end %>