fe 2.0.4 → 2.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (122) hide show
  1. checksums.yaml +4 -4
  2. data/app/views/fe/admin/panels/_prop_choice_field.html.erb +1 -1
  3. data/lib/fe/version.rb +1 -1
  4. metadata +2 -120
  5. data/app/views.current/fe/admin/elements/_errors.html.erb +0 -11
  6. data/app/views.current/fe/admin/elements/create.js.erb +0 -12
  7. data/app/views.current/fe/admin/elements/destroy.js.erb +0 -4
  8. data/app/views.current/fe/admin/elements/drop.js.erb +0 -3
  9. data/app/views.current/fe/admin/elements/duplicate.js.erb +0 -3
  10. data/app/views.current/fe/admin/elements/edit.js.erb +0 -4
  11. data/app/views.current/fe/admin/elements/error.js.erb +0 -4
  12. data/app/views.current/fe/admin/elements/new.js.erb +0 -17
  13. data/app/views.current/fe/admin/elements/reorder.js.erb +0 -0
  14. data/app/views.current/fe/admin/elements/update.js.erb +0 -9
  15. data/app/views.current/fe/admin/email_templates/_form.html.erb +0 -8
  16. data/app/views.current/fe/admin/email_templates/edit.html.erb +0 -13
  17. data/app/views.current/fe/admin/email_templates/index.html.erb +0 -20
  18. data/app/views.current/fe/admin/email_templates/new.html.erb +0 -11
  19. data/app/views.current/fe/admin/panels/_advanced_options.html.erb +0 -49
  20. data/app/views.current/fe/admin/panels/_common_boolean_fields.html.erb +0 -1
  21. data/app/views.current/fe/admin/panels/_common_boolean_fields_default.html.erb +0 -11
  22. data/app/views.current/fe/admin/panels/_common_fields.html.erb +0 -23
  23. data/app/views.current/fe/admin/panels/_condition.html.erb +0 -6
  24. data/app/views.current/fe/admin/panels/_insert.html.erb +0 -39
  25. data/app/views.current/fe/admin/panels/_nav_controls.html.erb +0 -6
  26. data/app/views.current/fe/admin/panels/_page.html.erb +0 -3
  27. data/app/views.current/fe/admin/panels/_pages_list.html.erb +0 -16
  28. data/app/views.current/fe/admin/panels/_prop_attachment_field.html.erb +0 -2
  29. data/app/views.current/fe/admin/panels/_prop_choice_field.html.erb +0 -74
  30. data/app/views.current/fe/admin/panels/_prop_date_field.html.erb +0 -7
  31. data/app/views.current/fe/admin/panels/_prop_element.html.erb +0 -23
  32. data/app/views.current/fe/admin/panels/_prop_page.html.erb +0 -26
  33. data/app/views.current/fe/admin/panels/_prop_paragraph.html.erb +0 -46
  34. data/app/views.current/fe/admin/panels/_prop_question_grid.html.erb +0 -28
  35. data/app/views.current/fe/admin/panels/_prop_question_grid_with_total.html.erb +0 -14
  36. data/app/views.current/fe/admin/panels/_prop_reference_question.html.erb +0 -12
  37. data/app/views.current/fe/admin/panels/_prop_section.html.erb +0 -8
  38. data/app/views.current/fe/admin/panels/_prop_sheet.html.erb +0 -20
  39. data/app/views.current/fe/admin/panels/_prop_text_field.html.erb +0 -20
  40. data/app/views.current/fe/admin/question_pages/_element.html.erb +0 -28
  41. data/app/views.current/fe/admin/question_pages/_element_show.html.erb +0 -10
  42. data/app/views.current/fe/admin/question_pages/_errors.html.erb +0 -10
  43. data/app/views.current/fe/admin/question_pages/_question_page.html.erb +0 -13
  44. data/app/views.current/fe/admin/question_pages/create.js.erb +0 -11
  45. data/app/views.current/fe/admin/question_pages/destroy.js.erb +0 -5
  46. data/app/views.current/fe/admin/question_pages/edit.js.erb +0 -3
  47. data/app/views.current/fe/admin/question_pages/error.js.erb +0 -4
  48. data/app/views.current/fe/admin/question_pages/show.js.erb +0 -9
  49. data/app/views.current/fe/admin/question_pages/show_panel.js.erb +0 -3
  50. data/app/views.current/fe/admin/question_pages/update.js.erb +0 -2
  51. data/app/views.current/fe/admin/question_sheets/_errors.html.erb +0 -11
  52. data/app/views.current/fe/admin/question_sheets/edit.js.erb +0 -3
  53. data/app/views.current/fe/admin/question_sheets/error.js.erb +0 -5
  54. data/app/views.current/fe/admin/question_sheets/index.html.erb +0 -41
  55. data/app/views.current/fe/admin/question_sheets/new.html.erb +0 -15
  56. data/app/views.current/fe/admin/question_sheets/show.html.erb +0 -27
  57. data/app/views.current/fe/admin/question_sheets/update.js.erb +0 -2
  58. data/app/views.current/fe/answer_pages/_answer_page.html.erb +0 -53
  59. data/app/views.current/fe/answer_pages/_element.html.erb +0 -32
  60. data/app/views.current/fe/answer_pages/_page_name.html.erb +0 -1
  61. data/app/views.current/fe/answer_pages/show.html.erb +0 -39
  62. data/app/views.current/fe/answer_pages/update.js.erb +0 -13
  63. data/app/views.current/fe/answer_sheets/_answer_sheet.html.erb +0 -26
  64. data/app/views.current/fe/answer_sheets/_element.html.erb +0 -74
  65. data/app/views.current/fe/answer_sheets/_incomplete.html.erb +0 -10
  66. data/app/views.current/fe/answer_sheets/_page_link.html.erb +0 -9
  67. data/app/views.current/fe/answer_sheets/_pages_list.html.erb +0 -11
  68. data/app/views.current/fe/answer_sheets/_submit_to.html.erb +0 -1
  69. data/app/views.current/fe/answer_sheets/_title.html.erb +0 -1
  70. data/app/views.current/fe/answer_sheets/edit.html.erb +0 -66
  71. data/app/views.current/fe/answer_sheets/incomplete.js.erb +0 -11
  72. data/app/views.current/fe/answer_sheets/index.html.erb +0 -18
  73. data/app/views.current/fe/answer_sheets/send_reference_invite.js.erb +0 -8
  74. data/app/views.current/fe/answer_sheets/show.html.erb +0 -13
  75. data/app/views.current/fe/applications/_logout.html.erb +0 -1
  76. data/app/views.current/fe/applications/show.html.erb +0 -1
  77. data/app/views.current/fe/help/builder.html +0 -33
  78. data/app/views.current/fe/help/question_grid.html +0 -18
  79. data/app/views.current/fe/questions/fe/_acceptance.html.erb +0 -14
  80. data/app/views.current/fe/questions/fe/_attachment_field.html.erb +0 -165
  81. data/app/views.current/fe/questions/fe/_checkbox_field.html.erb +0 -53
  82. data/app/views.current/fe/questions/fe/_country.html.erb +0 -7
  83. data/app/views.current/fe/questions/fe/_date_field.html.erb +0 -7
  84. data/app/views.current/fe/questions/fe/_date_field_mmyy.html.erb +0 -9
  85. data/app/views.current/fe/questions/fe/_drop_down_field.html.erb +0 -8
  86. data/app/views.current/fe/questions/fe/_paragraph.html.erb +0 -1
  87. data/app/views.current/fe/questions/fe/_question_grid.html.erb +0 -70
  88. data/app/views.current/fe/questions/fe/_question_grid_with_total.html.erb +0 -64
  89. data/app/views.current/fe/questions/fe/_questions.html.erb +0 -15
  90. data/app/views.current/fe/questions/fe/_radio_button_field.html.erb +0 -60
  91. data/app/views.current/fe/questions/fe/_rating.html.erb +0 -64
  92. data/app/views.current/fe/questions/fe/_reference_discipler.html.erb +0 -1
  93. data/app/views.current/fe/questions/fe/_reference_friend.html.erb +0 -1
  94. data/app/views.current/fe/questions/fe/_reference_parent.html.erb +0 -1
  95. data/app/views.current/fe/questions/fe/_reference_peer.html.erb +0 -1
  96. data/app/views.current/fe/questions/fe/_reference_question.html.erb +0 -61
  97. data/app/views.current/fe/questions/fe/_reference_roommate.html.erb +0 -1
  98. data/app/views.current/fe/questions/fe/_reference_spiritual.html.erb +0 -1
  99. data/app/views.current/fe/questions/fe/_reference_staff.html.erb +0 -1
  100. data/app/views.current/fe/questions/fe/_section.html.erb +0 -1
  101. data/app/views.current/fe/questions/fe/_state_chooser.html.erb +0 -7
  102. data/app/views.current/fe/questions/fe/_text_area_field.html.erb +0 -17
  103. data/app/views.current/fe/questions/fe/_text_field.html.erb +0 -9
  104. data/app/views.current/fe/questions/fe/_yes_no.html.erb +0 -17
  105. data/app/views.current/fe/questions/fe/_yes_no_field.erb +0 -20
  106. data/app/views.current/fe/reference_pages/_reference.html.erb +0 -31
  107. data/app/views.current/fe/reference_pages/edit.html.erb +0 -24
  108. data/app/views.current/fe/reference_sheets/done.html.erb +0 -2
  109. data/app/views.current/fe/reference_sheets/not_found.html.erb +0 -5
  110. data/app/views.current/fe/reference_sheets/submitted.js.erb +0 -1
  111. data/app/views.current/fe/references/edit.html.erb +0 -8
  112. data/app/views.current/fe/references/send_invite.js.erb +0 -7
  113. data/app/views.current/fe/references/show.html.erb +0 -18
  114. data/app/views.current/fe/references/submit.js.erb +0 -3
  115. data/app/views.current/fe/submit_pages/_errors.html.erb +0 -1
  116. data/app/views.current/fe/submit_pages/_thankyou.html.erb +0 -2
  117. data/app/views.current/fe/submit_pages/edit.html.erb +0 -36
  118. data/app/views.current/fe/submit_pages/error.js.erb +0 -1
  119. data/app/views.current/fe/submit_pages/submit.js.erb +0 -3
  120. data/app/views.current/layouts/fe/_error_messages_for.html.erb +0 -7
  121. data/app/views.current/layouts/fe/application.html.erb +0 -47
  122. data/app/views.current/layouts/fe/fe_admin.html.erb +0 -30
@@ -1,26 +0,0 @@
1
- <div id="panel-properties-page" class="panel" style="display:block;">
2
- <p>Update the settings for this page.</p>
3
-
4
- <div id="errors">
5
- <%= render partial: "errors", locals: { page: page }%>
6
- </div>
7
-
8
- <%= form_for(page, url: fe_admin_question_sheet_page_path(page.question_sheet_id, page.id), remote: true, html: {method: :put}) do |f| %>
9
- <p><label for="" class="desc">Label (English) <span class="required">required</span></label>
10
- <%= f.text_field :label, maxlength: 100, size: 40 %></p>
11
- <% page.question_sheet.languages.select(&:present?).each do |language| %>
12
- <p>
13
- <label for="fe_page_label_translations_<%= language %>" class="desc">Label (<%= Fe::LANGUAGES[language] %>) <span class="required">required</span></label>
14
- <%= text_field_tag "fe_page[label_translations][#{language}]", page.label_translations[language] %>
15
- </p>
16
- <% end %>
17
- <p><label for="" class="desc">Hidden</label>
18
- <%= f.check_box :hidden %></p>
19
-
20
- <p class="buttons">
21
- <%= submit_tag "Update &raquo;".html_safe, data: { disable_with: "Please wait..." } %>
22
- </p>
23
- <p class="buttons"><%= link_to "Delete", fe_admin_question_sheet_page_path(page.question_sheet_id, page.id), remote: true, method: :delete, data: {confirm: "Are you sure you want to delete this page?"} %></p>
24
- <% end %>
25
-
26
- </div>
@@ -1,46 +0,0 @@
1
- <p>
2
- <label for="element_content" class="desc">Paragraph Content (English)</label>
3
- <%= f.text_area :content, rows: 6, cols: 80, id: "element_content_#{element.id}" %>
4
- </p>
5
- <% @page.question_sheet.languages.select(&:present?).each do |language| %>
6
- <p>
7
- <label for="element_content_translations_<%= language %>" class="desc">Paragraph Content (<%= Fe::LANGUAGES[language] %>)</label>
8
- <%= text_area_tag "element[content_translations][#{language}]", @element.content_translations[language], rows: 6, cols: 80 %>
9
- </p>
10
- <% end %>
11
-
12
- <p>
13
- <label for="element_css_class" class="desc">Css Class</label>
14
- <%= f.text_field :css_class %>
15
- </p>
16
-
17
- <script type="text/javascript" charset="utf-8">
18
- $(function() {
19
- if (typeof(CKEDITOR) !== "undefined") {
20
- if (CKEDITOR.instances["element_content_<%= element.id %>"]) {
21
- CKEDITOR.instances["element_content_<%= element.id %>"].destroy();
22
- }
23
- editor = CKEDITOR.replace( "element_content_<%= element.id %>", {
24
- toolbar : [["Bold", "Italic", "-", "NumberedList", "BulletedList", "-", "Link"]],
25
- on :
26
- {
27
- instanceReady : function( ev )
28
- {
29
- // Output paragraphs as <p>Text</p>.
30
- this.dataProcessor.writer.setRules( "p",
31
- {
32
- indent : false,
33
- breakBeforeOpen : true,
34
- breakAfterOpen : false,
35
- breakBeforeClose : false,
36
- breakAfterClose : true
37
- });
38
- }
39
- }
40
-
41
- }
42
- );
43
- }
44
- });
45
- </script>
46
-
@@ -1,28 +0,0 @@
1
- <p><%= link_to "Question Grid Help", "/fe/help/question_grid.html", { class:"lbOn", id: "link-question-grid-help" } %></p>
2
-
3
- <%= render "fe/admin/panels/common_fields", f: f %>
4
-
5
- <p>
6
- <%= f.check_box :share, class: "inlinecheck" %>
7
- <label for="element_share" class="inline">Make this group available to be copied to other forms</label>
8
- </p>
9
-
10
- <p>
11
- <label for="element_style" class="desc">Style</label>
12
- <%= f.select :style, [["Standard", "standard"], ["Radio Grid", "radio"]] %>
13
- </p>
14
-
15
- <div class="field">
16
- <label for="element_slug" class="desc">Column Headings <span class="required">required</span></label>
17
- <%= f.text_field :cols %><br/>
18
- <span class="help">Separate column headings by a semi-colon. This determines how many columns the grid will contain and what the column headings will be. </span>
19
- </div>
20
-
21
- <div class="field">
22
- <label for="css_id" class="desc">Css ID</label>
23
- <%= f.text_field :css_id %>
24
- </div>
25
- <div class="field">
26
- <label for="css_class" class="desc">Css Class</label>
27
- <%= f.text_field :css_class %>
28
- </div>
@@ -1,14 +0,0 @@
1
- <p><%= link_to "Question Grid Help", "/fe/help/question_grid.html", { class:"lbOn", id: "link-question-grid-help" } %></p>
2
-
3
- <div class="field">
4
- <label for="element_slug" class="desc">Column Headings <span class="required">required</span></label>
5
- <%= f.text_field :cols %><br/>
6
- <span class="help">Separate column headings by a semi-colon. This determines how many columns the grid will contain and what the column headings will be. </span>
7
- </div>
8
- <div class="field">
9
- <label for="element_slug" class="desc">Total Columns <span class="required">required</span></label>
10
- <%= f.text_field :total_cols %><br/>
11
- <span class="help">Which columns should be totaled? e.g. 2 OR 2,3</span>
12
- </div>
13
-
14
- <%= render "fe/admin/panels/common_fields", f: f %>
@@ -1,12 +0,0 @@
1
- <div class="field">
2
- <label for="element_style" class="desc">Related Question Sheet
3
- <%= image_tag("fe/icons/question-balloon.png", title: "This list includes any template with "Reference" in the name.") %></label>
4
- <%= f.select :related_question_sheet_id, (Fe::QuestionSheet.active.where("label like "REFERENCE%"").order(:label).all - [@page.question_sheet]).collect {|qs| [qs.label, qs.id]} %>
5
- </div>
6
-
7
- <div class="field">
8
- <label for="element_style" class="desc">Style</label>
9
- <%= f.select :style, [["Peer", "peer"], ["Spiritual", "spiritual"], ["Parent", "parent"]] %>
10
- </div>
11
-
12
- <%= render "fe/admin/panels/common_fields", f: f %>
@@ -1,8 +0,0 @@
1
- <p><label for="element_label" class="desc">Heading Label <span class="required">required</span></label>
2
- <%= f.text_field :label, maxlength: Fe::Element.max_label_length %></p>
3
- <% @page.question_sheet.languages.select(&:present?).each do |language| %>
4
- <p>
5
- <label for="element_label_translations_<%= language %>" class="desc">Label (<%= Fe::LANGUAGES[language] %>) <span class="required">required</span></label>
6
- <%= text_field_tag "element[label_translations][#{language}]", @element.label_translations[language] %>
7
- </p>
8
- <% end %>
@@ -1,20 +0,0 @@
1
- <div id="panel-properties-sheet" class="panel" style="display:block;">
2
- <p class="instruction">Update the settings for this form.</p>
3
-
4
- <div id="errors">
5
- <%= render partial: "errors", locals: { question_sheet: @question_sheet }%>
6
- </div>
7
-
8
- <%= form_for @question_sheet, url: fe_admin_question_sheet_path(@question_sheet, format: "js"), remote: true, method: :put do |f| %>
9
-
10
- <p><label for="" class="desc">Label <span class="required">required</span></label>
11
- <%= f.text_field :label, maxlength: 50 %></p>
12
-
13
- <p><label for="" class="desc">Languages (in addition to english)</label>
14
- <%= f.select :languages, Fe::LANGUAGES.collect {|k, v| [v, k]}, {}, { size: 3, multiple: true } %></p>
15
-
16
- <p class="buttons">
17
- <%= submit_tag "Update &raquo;".html_safe, data: { disable_with: "Please wait..." } %></p>
18
-
19
- <% end %>
20
- </div>
@@ -1,20 +0,0 @@
1
- <%- options = [ Fe::OptionGroup.new("Short Answer", [
2
- Fe::Option.new("short", "Simple"),
3
- Fe::Option.new("number", "Number"),
4
- Fe::Option.new("currency-dollar", "Currency"),
5
- Fe::Option.new("email", "E-mail address"),
6
- Fe::Option.new("url", "Web address"),
7
- Fe::Option.new("phone", "Telephone number")
8
- ]),
9
- Fe::OptionGroup.new("Long Answer", [
10
- Fe::Option.new("essay", "Essay")
11
- ])
12
- ]
13
- %>
14
- <div class="field">
15
- <label for="element_style" class="desc">Style</label>
16
- <%= select_tag "element[style]",
17
- option_groups_from_collection_for_select(options, "group", "label", "key", "value", @element.style) %>
18
- </div>
19
-
20
- <%= render "fe/admin/panels/common_fields", f: f %>
@@ -1,28 +0,0 @@
1
- <% container_element = element.is_a?(Fe::QuestionGrid) || (element.is_a?(Fe::ChoiceField) && element.style == "yes-no") %>
2
- <% if container_element %>
3
- <!-- add a droppable block before and after each container element (question_grid / choice_field) so that the admin can move elements out of a container element -->
4
- <li class="droppable around-container before-container" data-element_id="<%= element.id %>" data-url="<%= drop_fe_admin_question_sheet_page_element_path(@page.question_sheet_id, @page.id, element.id, before: true) %>"></li>
5
- <% end %>
6
-
7
- <li class="element sortable <%= "container" if container_element %>" id="element_<%= element.id %>" data-element_id="<%= element.id %>">
8
- <div class="controls">
9
- <ul>
10
- <li><%= link_to "edit", edit_fe_admin_question_sheet_page_element_path(@page.question_sheet.id, @page.id, element.id), remote: true, method: :get, class: "edit", title: "Edit this element" %></li>
11
- <% if in_grid -%>
12
- <li><%= link_to("remove", remove_from_grid_fe_admin_question_sheet_page_element_path(@page.question_sheet.id, @page.id, element.id), remote: true, class: "remove", title: "remove" )%></li>
13
- <% end -%>
14
- <li><%= link_to "duplicate", duplicate_fe_admin_question_sheet_page_element_path(@page.question_sheet.id, @page.id, element.id), remote: true, method: :post, class: "duplicate", title: "Duplicate this element" %></li>
15
- <li><%= link_to("Delete", fe_admin_question_sheet_page_element_path( @page.question_sheet_id, @page.id, element.id), remote: true, method: :delete, class: "delete", data: {confirm: "Are you sure you want to remove this element from this form?"}, title: "Permanently delete this item") %></li>
16
- <li><a href="#" class="handle" title="Reorder this element">drag</a></li>
17
- </ul>
18
- </div>
19
- <div class="q" id="element_<%= dom_id(element) %>">
20
- <%= render "fe/admin/question_pages/element_show", element: element %>
21
- </div>
22
- <div class="q q_form" id="element_form_<%= dom_id(element) %>">
23
- </div>
24
- </li>
25
-
26
- <% if container_element %>
27
- <li class="droppable around-container after-container" data-element_id="<%= element.id %>" data-url="<%= drop_fe_admin_question_sheet_page_element_path(@page.question_sheet_id, @page.id, element.id, after: true) %>"></li>
28
- <% end %>
@@ -1,10 +0,0 @@
1
- <%# encoding: utf-8 %>
2
- <% if element.question? && element.label.present? && !element.hide_label? -%>
3
- <label for="<%= dom_id(element) %>" class="desc">
4
- <%= raw element.label %>
5
- <% if element.required? -%><span class="required">required</span><% end -%>
6
- <%= image_tag("fe/icons/question-balloon.png", class: "tip", title: element.tooltip) if element.tooltip.present? %>
7
- </label>
8
- <% end -%>
9
-
10
- <%= render partial: "fe/questions/" + element.ptemplate, object: element, locals: {col: nil} %>
@@ -1,10 +0,0 @@
1
- <% if @page.errors.any? %>
2
- <div class="errors">
3
- <h2>There was a problem saving this page</h2>
4
- <ul>
5
- <% @page.errors.full_messages.each do |msg| %>
6
- <li><%= msg %></li>
7
- <% end %>
8
- </ul>
9
- </div>
10
- <% end %>
@@ -1,13 +0,0 @@
1
- <div class="page">
2
- <h3 id="page-name">
3
- <%= link_to @page.label, edit_fe_admin_question_sheet_page_path(@page.question_sheet_id, @page.id), remote: true, method: :get , class: "ctl", id: "link-page-name" -%>
4
- </h3>
5
- <% if @page.elements.length > 0 %>
6
- <ul>
7
- <ul class="questions" id="questions_list" data-sortable="true" data-sortable-url="<%= reorder_fe_admin_question_sheet_page_elements_path(@page.question_sheet_id, @page.id) %>" data-sortable-handle=".handle">
8
- <%= render partial: "fe/admin/question_pages/element", collection: @page.elements, locals: {in_grid: false} %>
9
- </ul>
10
- <% else %>
11
- <div style="background: #ffc;"><p>You don"t have any questions on this page yet.</p></div>
12
- <% end %>
13
- </div>
@@ -1,11 +0,0 @@
1
- $('#page-preview').html('<%= escape_javascript(render("fe/admin/question_pages/question_page")) %>')
2
- $('#panel').html('<%= escape_javascript(render("fe/admin/panels/prop_page", page: @page)) %>')
3
- $('#nav-controls').html('<%= escape_javascript(render("fe/admin/panels/nav_controls")) %>')
4
- switchTab('properties');
5
- selectPage();
6
- $('#list-pages li').removeClass('active')
7
- $('#link-<%= dom_id(@page) %>').addClass('active')
8
- clearCurrentElement()
9
- activeElement = ''
10
- $(".tip[title]").tooltip();
11
-
@@ -1,5 +0,0 @@
1
- $('#panel').html('<%= escape_javascript(render("fe/admin/panels/pages_list")) %>')
2
- $('#page-preview').html('<%= escape_javascript(render("fe/admin/question_pages/question_page")) %>')
3
- $('#nav-controls').html('<%= escape_javascript(render("fe/admin/panels/nav_controls")) %>')
4
- switchTab("pages_list")
5
-
@@ -1,3 +0,0 @@
1
- $('#panel').html('<%= escape_javascript(render("fe/admin/panels/prop_page", page: @page)) %>');
2
- switchTab('properties');
3
- selectPage();
@@ -1,4 +0,0 @@
1
- $('#errors').html('<%= escape_javascript(render("errors", element: @page)) %>')
2
- <% @page.errors.each do |attr_name, message| %>
3
- addError("page_<%= attr_name %>")
4
- <% end %>
@@ -1,9 +0,0 @@
1
- $('#page-preview').html('<%= escape_javascript(render("fe/admin/question_pages/question_page")) %>')
2
- $('#nav-controls').html('<%= escape_javascript(render("fe/admin/panels/nav_controls")) %>')
3
- switchTab("pages_list")
4
- $('#list-pages li').removeClass('active')
5
- $('#link-<%= dom_id(@page) %>').addClass('active')
6
- clearCurrentElement()
7
- activeElement = ''
8
- $(".tip[title]").tooltip();
9
- setUpSortables();
@@ -1,3 +0,0 @@
1
- $('#panel').html('<%= escape_javascript(render("fe/admin/panels/#{@panel_name}")) %>')
2
- switchTab('<%= @tab_name %>')
3
- clearCurrentElement()
@@ -1,2 +0,0 @@
1
- $("#page-name").html('<%= escape_javascript(@page.label) %>')
2
- $('#panel').html('<%= escape_javascript(render("admin/panels/pages_list")) %>')
@@ -1,11 +0,0 @@
1
- <% if @question_sheet.errors.any? %>
2
- <div class="errors">
3
- <h2>There was a problem saving this sheet</h2>
4
- <ul>
5
- <% @question_sheet.errors.full_messages.each do |msg| %>
6
- <li><%= msg %></li>
7
- <% end %>
8
- </ul>
9
- </div>
10
- <% end %>
11
-
@@ -1,3 +0,0 @@
1
- $('#panel').html('<%= escape_javascript(render("fe/admin/panels/prop_sheet", question_sheet: @question_sheet)) %>');
2
- clearPageName()
3
- clearCurrentElement()
@@ -1,5 +0,0 @@
1
- $('#errors').html('<%= escape_javascript(render("errors", page: @question_sheet)) %>');
2
-
3
- <% @question_sheet.errors.each do |attr_name, message| %>
4
- addError('question_sheet_<%= attr_name %>')
5
- <% end %>
@@ -1,41 +0,0 @@
1
- <div id="content">
2
- <h1>Questionnaires</h1>
3
-
4
- <% if flash[:error] -%>
5
- <div style="background: #ffe5df; border: solid 1px #efbeb3; padding: 9px; margin: 0 0 18px;"><%= flash[:error] %></div>
6
- <% end -%>
7
-
8
- <%= link_to "New Form", fe_admin_question_sheets_path(), method: :post, class: "add-link" %>
9
- <br/>
10
- <table cellspacing="0" class="list">
11
- <tr>
12
- <th>Active Question Sheets</th>
13
- <th colspan="3">&nbsp;</th>
14
- </tr>
15
- <% for question_sheet in @active_question_sheets %>
16
- <tr class="<%= cycle("","alt") %>">
17
- <td class="title"><%= link_to question_sheet.label, fe_admin_question_sheet_path(question_sheet), class: "questionnaire" %></td>
18
- <td class="actions"><%= link_to "Duplicate", duplicate_fe_admin_question_sheet_path(question_sheet), data: {confirm: "This will take some time depending on the number of questions. Please be patient."}, method: :post, class: "duplicate" %></td>
19
- <td class="actions"><%= link_to "Archive", archive_fe_admin_question_sheet_path(question_sheet), data: {confirm: "Are you sure you want to archive this Question Sheet?"}, method: :post, class: "archive" %></td>
20
- <td class="actions"><%= link_to "Destroy", fe_admin_question_sheet_path(question_sheet), data: {confirm: "Are you sure you want to delete this Question Sheet?"}, method: :delete, class: "destroy delete" %></td>
21
- </tr>
22
- <% end %>
23
- </table>
24
-
25
-
26
- <table cellspacing="0" class="list">
27
- <tr>
28
- <th>Archived Question Sheets</th>
29
- <th>&nbsp;</th>
30
- <th>&nbsp;</th>
31
- </tr>
32
- <% for question_sheet in @archived_question_sheets %>
33
- <tr class="<%= cycle("","alt") %>">
34
- <td class="title"><%= link_to question_sheet.label, fe_admin_question_sheet_path(question_sheet), class: "questionnaire" %></td>
35
- <td class="actions"><%= link_to "Duplicate", duplicate_fe_admin_question_sheet_path(question_sheet), data: {confirm: "This will take some time depending on the number of questions. Please be patient."}, method: :post, class: "duplicate" %></td>
36
- <td class="actions"><%= link_to "Un-Archive", unarchive_fe_admin_question_sheet_path(question_sheet), method: :post, class: "unarchive" %></td>
37
- </tr>
38
- <% end %>
39
- </table>
40
- </div>
41
-
@@ -1,15 +0,0 @@
1
- <h1>New Form</h1>
2
-
3
- <%= error_messages_for :question_sheet %>
4
-
5
- <%= form_for(:question_sheet, url: fe_admin_question_sheets_path) do |f| %>
6
- <p>
7
- <label for="question_sheet_label">Label</label>
8
- <%= f.text_field :label, maxlength: 60 %>
9
- </p>
10
- <p>
11
- <%= submit_tag "Create" %>
12
- </p>
13
- <% end %>
14
-
15
- <%= link_to "Back", fe_admin_question_sheets_path %>
@@ -1,27 +0,0 @@
1
- <script language="javascript">
2
- var activeElement = "";
3
- </script>
4
-
5
- <div id="content">
6
- <div id="controls">
7
- <ul id="nav-controls">
8
- <%= render "fe/admin/panels/nav_controls" %>
9
- </ul>
10
-
11
- <div id="panel">
12
- <%= render "fe/admin/panels/pages_list" %>
13
- </div>
14
- </div>
15
-
16
-
17
- <div id="preview">
18
- <h2 id="sheet-name">
19
- <%= link_to @question_sheet.label, edit_fe_admin_question_sheet_path(@question_sheet), remote: true, method: :get , class: "ctl" -%>
20
- </h2>
21
- <div id="page-preview">
22
- <%= render "fe/admin/question_pages/question_page" %>
23
- </div>
24
- </div>
25
-
26
- <div style="clear:both;">&nbsp;</div>
27
- </div>
@@ -1,2 +0,0 @@
1
- $('#sheet-name').html('<%= escape_javascript(@question_sheet.label) %>');
2
- $('#panel').html('<%= escape_javascript(render("fe/admin/panels/prop_sheet", question_sheet: @question_sheet)) %>');
@@ -1,53 +0,0 @@
1
- <% if @presenter.active_page %>
2
- <% page_dom = @presenter.active_page_link.dom_id %>
3
-
4
- <div id="<%= page_dom %>" class="answer-page" style="<% if show_first.nil? -%>display: none;<% end -%>"> <!-- this id is parsed by fe.public.js -->
5
-
6
- <div class="page">
7
- <%= render "fe/answer_pages/page_name" %>
8
-
9
- <% if @elements.length > 0 -%>
10
- <%= form_tag @presenter.active_page_link.save_path, id: "#{page_dom}-form", autocomplete: "off", onsubmit: "fe.pageHandler.savePage($('#sp_application_55716-page_331')); return false;", multipart: true do -%>
11
- <%= hidden_field_tag "a", params[:a] %>
12
- <ul class="questions" id="questions_list">
13
- <% previous_element = nil %>
14
- <% @elements.each do |element| %>
15
- <li style="<%= "display:none" if element.hidden?(@answer_sheet, @presenter.active_page) %>" class="<%= element.class.to_s.downcase.gsub("::","_") %> <%= element.style.to_s.downcase %> <%= "conditional" if element.conditional %>" id="element_<%= element.id %>" <% if element.conditional %>data-conditional_id="<%= element.conditional_id %>" data-conditional_type="<%= element.conditional_type %>" data-conditional_answer="<%= element.conditional_answer %>" data-application_id="<%= @answer_sheet.id %>" data-answer_sheet_id_prefix="<%= @answer_sheet.class.name.underscore.gsub("/","_") %>"<% end %><% if element.slug %> data-slug="<%= element.slug %>"<% end %>>
16
- <%= render "fe/answer_pages/element", element: element %>
17
- </li>
18
- <% previous_element = element %>
19
- <% end %>
20
- </ul>
21
-
22
- <% unless @presenter.next_page -%>
23
- <div id="submit_message" class="validation-advice" style="display: none;"></div>
24
- <div>
25
- <button type="button" class="<%= "btn btn-default" if Fe.bootstrap %> button save_button"><%= _("Save Now") %></button>
26
- <button type="submit" class="<%= "btn btn-default" if Fe.bootstrap %> button cru-gold no-left-margin" onclick="page_handler.completeAll(); return false;" id="submit_button"><%= _("Submit") %></button>
27
- </div>
28
- <% else -%>
29
- <div class="savestatus">
30
- <%= _("Last Saved:") %> <span class="last-saved"><%= l(@answer_sheet.updated_at, format: :datetime) %></span><%= spinner(page_dom) %>
31
- </div>
32
- <div>
33
- <button type="button" class="button no-left-margin save_button"><%= _("Save Now") %></button>
34
- <button type="button" class="button cru-gold" onclick="fe.pageHandler.next(); return false;"><%= _("Next >>") %></button>
35
- </div>
36
- <% end -%>
37
- <% end -%>
38
- <% else -%>
39
- <div style="background: #ffc;">
40
- <p><%= _("There are no questions on this page.") %></p>
41
- </div>
42
- <% end -%>
43
- </div>
44
- </div>
45
-
46
- <% if session[:attempted_submit] %>
47
- <script type="text/javascript" charset="utf-8">
48
- $(function() {
49
- fe.pageHandler.validatePage("<%= page_dom %>")
50
- });
51
- </script>
52
- <% end %>
53
- <% end %>
@@ -1,32 +0,0 @@
1
- <% if Fe.bootstrap %>
2
-
3
- <div class="form-group">
4
- <% if element.question? && element.default_label? && element.label.present? && !element.hide_label? -%>
5
- <label for="<%= dom_id(element) %>" class="desc">
6
- <%= raw element.label(session[:locale]) %>
7
- <% if element.required?(@answer_sheet, @page) -%><span class="required">required</span><% end -%>
8
- <%= tip(element.tooltip) if element.tooltip.present? %>
9
-
10
- <% col ||= nil %>
11
- <%= render partial: "fe/questions/" + element.ptemplate, object: element, locals: {col: col} %>
12
- </label>
13
- <% else %>
14
- <% col ||= nil %>
15
- <%= render partial: "fe/questions/" + element.ptemplate, object: element, locals: {col: col} %>
16
- <% end -%>
17
- </div>
18
-
19
- <% else %>
20
-
21
- <% if element.question? && element.default_label? && element.label.present? && !element.hide_label? -%>
22
- <label for="<%= dom_id(element) %>" class="desc">
23
- <%= raw element.label(session[:locale]) %>
24
- <% if element.required?(@answer_sheet, @page) -%><span class="required"><%= _("required") %></span><% end -%>
25
- <%= tip(element.tooltip) if element.tooltip.present? %>
26
- </label>
27
- <% end -%>
28
-
29
- <% col ||= nil %>
30
- <%= render partial: "fe/questions/" + element.ptemplate, object: element, locals: {col: col} %>
31
-
32
- <% end %>
@@ -1 +0,0 @@
1
- <h4 id="page-name"><%= @presenter.active_page.label(session[:locale]) %></h4>
@@ -1,39 +0,0 @@
1
- <% if @presenter.active_page %>
2
- <% page_dom = @presenter.active_page_link.dom_id
3
- next_js = load_page_js(@presenter.next_page) -%>
4
-
5
- <div id="<%= page_dom %>" class="answer-page"> <!-- this id is parsed by fe.public.js -->
6
-
7
- <div class="page">
8
- <%= render "fe/answer_pages/page_name" %>
9
-
10
- <% if @elements.length > 0 -%>
11
- <%= form_tag @presenter.active_page_link.save_path, id: "#{page_dom}-form", autocomplete: "off", onsubmit: "fe.pageHandler.savePage($("#sp_application_55716-page_331")); return false;", multipart: true do -%>
12
- <%= hidden_field_tag "a", params[:a] %>
13
- <ul class="questions" id="questions_list">
14
- <% previous_element = nil %>
15
- <% @elements.each do |element| %>
16
- <li class="<%= element.class.to_s.downcase.gsub("::","_") %> <%= element.style.to_s.downcase %> <%= "conditional" if element.conditional %>" id="element_<%= element.id %>" <% if element.conditional %>data-conditional_id="<%= element.conditional_id %>" data-conditional_type="<%= element.conditional_type %>" data-conditional_answer="<%= element.conditional_answer %>" data-application_id="<%= @answer_sheet.id %>" data-answer_sheet_id_prefix="<%= @answer_sheet.class.name.underscore.gsub("/","_") %>"<% end %><% if element.slug %> data-slug="<%= element.slug %>"<% end %>>
17
- <%= render "fe/answer_pages/element", element: element %>
18
- </li>
19
- <% previous_element = element %>
20
- <% end %>
21
- </ul>
22
-
23
- <% end -%>
24
- <% else -%>
25
- <div style="background: #ffc;">
26
- <p><%= _("There are no questions on this page.") %></p>
27
- </div>
28
- <% end -%>
29
- </div>
30
- </div>
31
-
32
- <% if session[:attempted_submit] %>
33
- <script type="text/javascript" charset="utf-8">
34
- $(function() {
35
- fe.pageHandler.validatePage("<%= page_dom %>")
36
- });
37
- </script>
38
- <% end %>
39
- <% end %>
@@ -1,13 +0,0 @@
1
- <% if @saved_at_timestamp.is_a?(Time) || @saved_at_timestamp.is_a?(Date) %>
2
- $('.last-saved').html('<%= escape_javascript(l(@saved_at_timestamp, format: :datetime)) %>')
3
- <% end %>
4
- <% if @answer && @answer.attachment_file_name %>
5
- $('#<%= dom_id(@answer.question) %>_filename').html('Current File: ' +
6
- '<%= link_to(@answer.attachment_file_name, @answer.attachment.expiring_url) %>' +
7
- '<%= link_to(image_tag("fe/icons/minus-button.png"),
8
- delete_file_fe_answer_sheet_page_path(@presenter.active_answer_sheet, @page, question_id: @answer.question.id),
9
- method: :delete, remote: true) %>')
10
- $('#<%= dom_id(@answer.question) %>_filename').effect('highlight')
11
- <% elsif @answer %>
12
- $('#<%= dom_id(@answer.question) %>_filename').html('')
13
- <% end %>
@@ -1,26 +0,0 @@
1
- <h3 id="sheet-name"><%= answer_sheet.question_sheet.label %></h3>
2
-
3
- <% if elements.length > 0 -%>
4
-
5
- <% elements.each do |page, page_elements| -%>
6
- <% next unless page.has_questions? %>
7
- <a name="<%= dom_id(page) %>" class="anchor"></a>
8
-
9
- <div class="page" data-page-id="<%= page.id %>">
10
- <h3><%= page.label %></h3>
11
- <ul class="questions readonly" start="<%= @question_number %>">
12
- <%= render partial: "fe/answer_sheets/element", collection: page_elements, locals: {elements: page_elements} %>
13
- </ul>
14
- </div>
15
-
16
- <br />
17
-
18
- <% end -%>
19
-
20
- <% else -%>
21
-
22
- <div style="background: #ffc;">
23
- <p>That"s odd. There are no answers to review.</p>
24
- </div>
25
-
26
- <% end -%>