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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4b12e98399976961d3acf5e7e105d372abd91462a8997c7bcf82ad09a63cf8b9
4
- data.tar.gz: 3802985995be02cb96f88eea26fe0d3d07eb25a5eb9d9390a7c4c246b1b8f404
3
+ metadata.gz: b622f410014ec6bf6d17eeda0d69ebe4b160259609d144f4bb7e1f15608e11bd
4
+ data.tar.gz: '03934b9fd863a79ba518b9abd80588d6352eea8ded27d4d970164f63dd362077'
5
5
  SHA512:
6
- metadata.gz: 91df50c054ef6ee745ea227a74fd6adec0015f06beb3a35760e4b486db51a4cce19006ed6a1fb2c0f8f77780c831f5d2457698bd9fda685dbadaa8cf50f1dc4c
7
- data.tar.gz: e71bbbba09f9bd94ffa1bef5208c38b40ab056ebee98b7cdd66e96f7ef62fe4a7af685d84b542e221ac29617e1686dc882d6c865c2e000262d6999bd98224799
6
+ metadata.gz: 2c8f742b32c84cfe426c8f0a619a32108b48bd2624fcc9c8a4281419b1b5cc599bc3268d6ad628f97fd995589ada74e98398b03107a245b8f4136192b778e7b1
7
+ data.tar.gz: c97b059b6fbfd740513a9bee4943581c96eb6f1833d8ab6d0b6b242fe27e38f4029e4cd502e8f169f002d2af7b5f315fa1185f5f7b889a351c88a06686c30604
@@ -13,7 +13,7 @@
13
13
  %>
14
14
  <div class="field"><label for="element_style" class="desc">Style</label>
15
15
  <%= select_tag "element[style]", option_groups_from_collection_for_select(options, "group", "label", "key", "value", @element.style),
16
- onchange: %|if(["acceptance", "yes-no"].include($F("element[style]"))) $("choices_section").hide(); else $("choices_section").show();| %></div>
16
+ onchange: %|$choices = $(this).closest("form").find(".choices_section"); if(["acceptance", "yes-no"].includes($(this).val())) $choices.hide(); else $choices.show();| %></div>
17
17
 
18
18
  <%= render "fe/admin/panels/common_fields", f: f %>
19
19
 
data/lib/fe/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Fe
2
- VERSION = "2.0.4"
2
+ VERSION = "2.0.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fe
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.4
4
+ version: 2.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - CruGlobal
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-10-17 00:00:00.000000000 Z
11
+ date: 2023-11-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -361,124 +361,6 @@ files:
361
361
  - app/models/fe/user.rb
362
362
  - app/models/staff.rb
363
363
  - app/validators/email_validator.rb
364
- - app/views.current/fe/admin/elements/_errors.html.erb
365
- - app/views.current/fe/admin/elements/create.js.erb
366
- - app/views.current/fe/admin/elements/destroy.js.erb
367
- - app/views.current/fe/admin/elements/drop.js.erb
368
- - app/views.current/fe/admin/elements/duplicate.js.erb
369
- - app/views.current/fe/admin/elements/edit.js.erb
370
- - app/views.current/fe/admin/elements/error.js.erb
371
- - app/views.current/fe/admin/elements/new.js.erb
372
- - app/views.current/fe/admin/elements/reorder.js.erb
373
- - app/views.current/fe/admin/elements/update.js.erb
374
- - app/views.current/fe/admin/email_templates/_form.html.erb
375
- - app/views.current/fe/admin/email_templates/edit.html.erb
376
- - app/views.current/fe/admin/email_templates/index.html.erb
377
- - app/views.current/fe/admin/email_templates/new.html.erb
378
- - app/views.current/fe/admin/panels/_advanced_options.html.erb
379
- - app/views.current/fe/admin/panels/_common_boolean_fields.html.erb
380
- - app/views.current/fe/admin/panels/_common_boolean_fields_default.html.erb
381
- - app/views.current/fe/admin/panels/_common_fields.html.erb
382
- - app/views.current/fe/admin/panels/_condition.html.erb
383
- - app/views.current/fe/admin/panels/_insert.html.erb
384
- - app/views.current/fe/admin/panels/_nav_controls.html.erb
385
- - app/views.current/fe/admin/panels/_page.html.erb
386
- - app/views.current/fe/admin/panels/_pages_list.html.erb
387
- - app/views.current/fe/admin/panels/_prop_attachment_field.html.erb
388
- - app/views.current/fe/admin/panels/_prop_choice_field.html.erb
389
- - app/views.current/fe/admin/panels/_prop_date_field.html.erb
390
- - app/views.current/fe/admin/panels/_prop_element.html.erb
391
- - app/views.current/fe/admin/panels/_prop_page.html.erb
392
- - app/views.current/fe/admin/panels/_prop_paragraph.html.erb
393
- - app/views.current/fe/admin/panels/_prop_question_grid.html.erb
394
- - app/views.current/fe/admin/panels/_prop_question_grid_with_total.html.erb
395
- - app/views.current/fe/admin/panels/_prop_reference_question.html.erb
396
- - app/views.current/fe/admin/panels/_prop_section.html.erb
397
- - app/views.current/fe/admin/panels/_prop_sheet.html.erb
398
- - app/views.current/fe/admin/panels/_prop_text_field.html.erb
399
- - app/views.current/fe/admin/question_pages/_element.html.erb
400
- - app/views.current/fe/admin/question_pages/_element_show.html.erb
401
- - app/views.current/fe/admin/question_pages/_errors.html.erb
402
- - app/views.current/fe/admin/question_pages/_question_page.html.erb
403
- - app/views.current/fe/admin/question_pages/create.js.erb
404
- - app/views.current/fe/admin/question_pages/destroy.js.erb
405
- - app/views.current/fe/admin/question_pages/edit.js.erb
406
- - app/views.current/fe/admin/question_pages/error.js.erb
407
- - app/views.current/fe/admin/question_pages/show.js.erb
408
- - app/views.current/fe/admin/question_pages/show_panel.js.erb
409
- - app/views.current/fe/admin/question_pages/update.js.erb
410
- - app/views.current/fe/admin/question_sheets/_errors.html.erb
411
- - app/views.current/fe/admin/question_sheets/edit.js.erb
412
- - app/views.current/fe/admin/question_sheets/error.js.erb
413
- - app/views.current/fe/admin/question_sheets/index.html.erb
414
- - app/views.current/fe/admin/question_sheets/new.html.erb
415
- - app/views.current/fe/admin/question_sheets/show.html.erb
416
- - app/views.current/fe/admin/question_sheets/update.js.erb
417
- - app/views.current/fe/answer_pages/_answer_page.html.erb
418
- - app/views.current/fe/answer_pages/_element.html.erb
419
- - app/views.current/fe/answer_pages/_page_name.html.erb
420
- - app/views.current/fe/answer_pages/show.html.erb
421
- - app/views.current/fe/answer_pages/update.js.erb
422
- - app/views.current/fe/answer_sheets/_answer_sheet.html.erb
423
- - app/views.current/fe/answer_sheets/_element.html.erb
424
- - app/views.current/fe/answer_sheets/_incomplete.html.erb
425
- - app/views.current/fe/answer_sheets/_page_link.html.erb
426
- - app/views.current/fe/answer_sheets/_pages_list.html.erb
427
- - app/views.current/fe/answer_sheets/_submit_to.html.erb
428
- - app/views.current/fe/answer_sheets/_title.html.erb
429
- - app/views.current/fe/answer_sheets/edit.html.erb
430
- - app/views.current/fe/answer_sheets/incomplete.js.erb
431
- - app/views.current/fe/answer_sheets/index.html.erb
432
- - app/views.current/fe/answer_sheets/send_reference_invite.js.erb
433
- - app/views.current/fe/answer_sheets/show.html.erb
434
- - app/views.current/fe/applications/_logout.html.erb
435
- - app/views.current/fe/applications/show.html.erb
436
- - app/views.current/fe/help/builder.html
437
- - app/views.current/fe/help/question_grid.html
438
- - app/views.current/fe/questions/fe/_acceptance.html.erb
439
- - app/views.current/fe/questions/fe/_attachment_field.html.erb
440
- - app/views.current/fe/questions/fe/_checkbox_field.html.erb
441
- - app/views.current/fe/questions/fe/_country.html.erb
442
- - app/views.current/fe/questions/fe/_date_field.html.erb
443
- - app/views.current/fe/questions/fe/_date_field_mmyy.html.erb
444
- - app/views.current/fe/questions/fe/_drop_down_field.html.erb
445
- - app/views.current/fe/questions/fe/_paragraph.html.erb
446
- - app/views.current/fe/questions/fe/_question_grid.html.erb
447
- - app/views.current/fe/questions/fe/_question_grid_with_total.html.erb
448
- - app/views.current/fe/questions/fe/_questions.html.erb
449
- - app/views.current/fe/questions/fe/_radio_button_field.html.erb
450
- - app/views.current/fe/questions/fe/_rating.html.erb
451
- - app/views.current/fe/questions/fe/_reference_discipler.html.erb
452
- - app/views.current/fe/questions/fe/_reference_friend.html.erb
453
- - app/views.current/fe/questions/fe/_reference_parent.html.erb
454
- - app/views.current/fe/questions/fe/_reference_peer.html.erb
455
- - app/views.current/fe/questions/fe/_reference_question.html.erb
456
- - app/views.current/fe/questions/fe/_reference_roommate.html.erb
457
- - app/views.current/fe/questions/fe/_reference_spiritual.html.erb
458
- - app/views.current/fe/questions/fe/_reference_staff.html.erb
459
- - app/views.current/fe/questions/fe/_section.html.erb
460
- - app/views.current/fe/questions/fe/_state_chooser.html.erb
461
- - app/views.current/fe/questions/fe/_text_area_field.html.erb
462
- - app/views.current/fe/questions/fe/_text_field.html.erb
463
- - app/views.current/fe/questions/fe/_yes_no.html.erb
464
- - app/views.current/fe/questions/fe/_yes_no_field.erb
465
- - app/views.current/fe/reference_pages/_reference.html.erb
466
- - app/views.current/fe/reference_pages/edit.html.erb
467
- - app/views.current/fe/reference_sheets/done.html.erb
468
- - app/views.current/fe/reference_sheets/not_found.html.erb
469
- - app/views.current/fe/reference_sheets/submitted.js.erb
470
- - app/views.current/fe/references/edit.html.erb
471
- - app/views.current/fe/references/send_invite.js.erb
472
- - app/views.current/fe/references/show.html.erb
473
- - app/views.current/fe/references/submit.js.erb
474
- - app/views.current/fe/submit_pages/_errors.html.erb
475
- - app/views.current/fe/submit_pages/_thankyou.html.erb
476
- - app/views.current/fe/submit_pages/edit.html.erb
477
- - app/views.current/fe/submit_pages/error.js.erb
478
- - app/views.current/fe/submit_pages/submit.js.erb
479
- - app/views.current/layouts/fe/_error_messages_for.html.erb
480
- - app/views.current/layouts/fe/application.html.erb
481
- - app/views.current/layouts/fe/fe_admin.html.erb
482
364
  - app/views/fe/admin/elements/_errors.html.erb
483
365
  - app/views/fe/admin/elements/create.js.erb
484
366
  - app/views/fe/admin/elements/destroy.js.erb
@@ -1,11 +0,0 @@
1
- <% if @element.errors.any? %>
2
- <div class="errors">
3
- <h2>There was a problem saving this element</h2>
4
- <ul>
5
- <% @element.errors.full_messages.each do |msg| %>
6
- <li><%= msg %></li>
7
- <% end %>
8
- </ul>
9
- </div>
10
- <% end %>
11
-
@@ -1,12 +0,0 @@
1
- <% if @page_element %>
2
- $('#question_modal').dialog('close');
3
- $('#page-preview').html('<%= escape_javascript(render("fe/admin/question_pages/question_page")) %>');
4
- $('#element_<%= dom_id(@element) %>').hide();
5
- $('#element_form_<%= dom_id(@element) %>').html('<%= escape_javascript(render("fe/admin/panels/prop_element", element: @element)) %>');
6
- $('#element_form_<%= dom_id(@element) %>').show();
7
- selectElement("#element_<%= @element.id %>");
8
- scrollTo("#element_<%= @element.id %>");
9
- setUpSortables();
10
- <% else %>
11
- alert('That question already exists on this question sheet')
12
- <% end %>
@@ -1,4 +0,0 @@
1
- $('#element_<%= @element.id %>').remove()
2
- $('#panel').html('<%= escape_javascript(render("fe/admin/panels/insert")) %>')
3
- activeElement = ''
4
- switchTab('insert')
@@ -1,3 +0,0 @@
1
- $('#page-preview').html('<%= escape_javascript(render("fe/admin/question_pages/question_page", page: @page)) %>')
2
- $('#list-pages li').removeClass('active')
3
- setUpJsHelpers();
@@ -1,3 +0,0 @@
1
- $('#page-preview').html('<%= escape_javascript(render("fe/admin/question_pages/question_page")) %>')
2
- selectElement("#element_<%= @element.id %>")
3
- setUpSortables();
@@ -1,4 +0,0 @@
1
- $('#element_<%= dom_id(@element) %>').hide()
2
- $('#element_form_<%= dom_id(@element) %>').html('<%= escape_javascript(render("fe/admin/panels/prop_element", element: @element)) %>')
3
- $('#element_form_<%= dom_id(@element) %>').show();
4
- selectElement("#element_<%= @element.id %>")
@@ -1,4 +0,0 @@
1
- $('#errors').html('<%= escape_javascript(render("errors", element: @element)) %>')
2
- <% @element.errors.each do |attr_name, message| %>
3
- addError('element_<%= attr_name %>')
4
- <% end %>
@@ -1,17 +0,0 @@
1
- <% if @questions.any? %>
2
- if ($('#question_modal')[0] == null) {
3
- $('body').append('<div id="question_modal"></div>');
4
- }
5
- $('#question_modal').html('<%= link_to("Add \"#{params[:human_type]}\"", fe_admin_question_sheet_page_elements_path(question_sheet_id: @page.question_sheet_id, page_id: @page.id,
6
- element_type: params[:element_type], "element[style]" => @style, format: :js),
7
- remote: true,
8
- method: :post,
9
- class: "add_type",
10
- data: { disable_with: "Add \"#{params[:human_type]}\"" }) %><p>Or you can also copy an existing <%= params[:human_type] %> element. If you are unsure, just <strong>Add <%= params[:human_type] %>.</strong></p><div id="questions_div" title=""></div>');
11
- $('#questions_div').html("<%= escape_javascript(render("fe/questions/fe/questions", questions: @questions)) %>")
12
- $('#question_modal').dialog({width: 500, height: 400});
13
- <% else %>
14
- $.post('<%= fe_admin_question_sheet_page_elements_path(question_sheet_id: @page.question_sheet_id,
15
- page_id: @page.id,
16
- element_type: params[:element_type], "element[style]" => @style, format: :js) %>');
17
- <% end %>
File without changes
@@ -1,9 +0,0 @@
1
- $('#element_form_<%= dom_id(@element) %>').hide();
2
- $('#element_<%= dom_id(@element) %>').html('<%= escape_javascript(render("fe/admin/question_pages/element_show", element: @element)) %>')
3
- $('#element_<%= dom_id(@element) %>').show()
4
- clearCurrentElement()
5
- $('#questions_list').sortable('refresh');
6
-
7
- <% @page.question_grids.each do |grid| %>
8
- $('#questions_list_<%= grid.id %>').sortable('refresh');
9
- <% end %>
@@ -1,8 +0,0 @@
1
- <p><label for="email_template_name" class="desc">Template Name</label>
2
- <%= f.text_field :name, class: "text", size: 93 %></p>
3
-
4
- <p><label for="email_template_subject" class="desc">Subject</label>
5
- <%= f.text_field :subject, class: "text", size: 93 %></p>
6
-
7
- <p><label for="email_template_content" class="desc">Content</label>
8
- <%= f.text_area :content, rows: 25, cols: 80, class: "text" %>
@@ -1,13 +0,0 @@
1
- <div id="content">
2
- <h1>Edit Email Template</h1>
3
-
4
- <%= error_messages_for :email_template %>
5
-
6
- <%= form_for(:email_template, url: fe_admin_email_template_path(@email_template), html: { method: :put } ) do |f| %>
7
- <%= render "form", f: f %>
8
-
9
- <p><%= submit_tag "Update" %> or <%= link_to "Cancel", fe_admin_email_templates_path, class: "cancel" %></p>
10
- <% end %>
11
-
12
-
13
- </div>
@@ -1,20 +0,0 @@
1
- <div id="content">
2
- <h1>Email Templates</h1>
3
-
4
- <table cellspacing="0" class="list">
5
- <tr>
6
- <th>Template Name</th>
7
- <th>&nbsp;</th>
8
- </tr>
9
- <% for email_template in @email_templates %>
10
- <tr class="<%= cycle("","alt") %>">
11
- <td><%= link_to email_template.name, edit_fe_admin_email_template_path(email_template), class: "email-template" %></td>
12
- <td class="actions"><%= link_to "Destroy", fe_admin_email_template_path(email_template), data: {confirm: "Are you sure?"}, method: :delete, class: "destroy" %></td>
13
- </tr>
14
- <% end %>
15
- </table>
16
-
17
- <br />
18
-
19
- <%= link_to "New Template", new_fe_admin_email_template_path, method: :GET, class: "add-link" %>
20
- </div>
@@ -1,11 +0,0 @@
1
- <div id="content">
2
- <h1>New Email Template</h1>
3
-
4
- <%= error_messages_for :email_template %>
5
-
6
- <%= form_for(:email_template, url: fe_admin_email_templates_path) do |f| %>
7
- <%= render partial: "form", locals: {f: f}%>
8
-
9
- <p><%= submit_tag "Create" %> or <%= link_to "Cancel", fe_admin_email_templates_path, class: "cancel" %></p>
10
- <% end %>
11
- </div>
@@ -1,49 +0,0 @@
1
- <h3 id="<%= dom_id(element) %>-h3-show-advanced-options">Advanced Options<br/>
2
- <a style="font-size: 11px; font-weight: normal; " href="#" onclick="$("#<%= dom_id(element) %>-pnl-advanced").show();$("#<%= dom_id(element) %>-h3-show-advanced-options").hide();return false;">Show Advanced Options</a></h3>
3
-
4
- <div id="<%= dom_id(element) %>-pnl-advanced" style="display: none;">
5
- <h3>Advanced Options<br/>
6
- <a style="font-size: 11px; font-weight: normal; " href="#" onclick="$("#<%= dom_id(element) %>-pnl-advanced").hide();$("#<%= dom_id(element) %>-h3-show-advanced-options").show();return false;">Hide Advanced Options</a></h3>
7
-
8
- <div class="future_affect">
9
- <%= label_tag "Future questions/pages will be shown based on the answer to this question: " %>
10
- <%= radio_button_tag :future_affect, "yes" %>
11
- <%= label_tag :future_affect_yes, "Yes" %>
12
- <%= radio_button_tag :future_affect, "no" %>
13
- <%= label_tag :future_affect_no, "No" %>
14
- <% if @element.conditional.present? %>
15
- <script>$(function() { $("#<%= dom_id(element) %>-pnl-advanced input[name=future_affect][value=yes]").click(); });</script>
16
- <% end %>
17
- <div class="future_answer" style="display:none">
18
- What answer should show the element or page? <%= f.text_field "conditional_answer" %>
19
- <br/>
20
- Enter multiple answers separated by semi-colon to match using an OR condition. Ex: "Option A; Option B" will match either "Option A" or "Option B" answers
21
- </div>
22
- <div class="future_target" style="display:none">
23
- <label>Should it show the next element or a page further down the application?</label>
24
- <%= f.radio_button :conditional_type, "Fe::Element" %>
25
- <%= f.label :conditional_type_feelement, "Next Element" %>
26
- <%= f.radio_button :conditional_type, "Fe::Page" %>
27
- <%= f.label :conditional_type_fepage, "Page" %>
28
- <%= f.radio_button :conditional_type, "", style: "display:none" %>
29
- <script>$(function() { $("#<%= dom_id(element) %>-pnl-advanced .future_target input[checked]").click(); });</script>
30
- </div>
31
- <div class="future_page" style="<%= "display:none" unless @element.conditional.is_a?(Fe::Page) %>">
32
- <label>Which page? </label>
33
- <%= f.collection_select :conditional_id, @page.question_sheet.pages, :id, :label, include_blank: true %>
34
- </div>
35
- </div>
36
- <br/>
37
-
38
- <p><label for="css_class" class="desc">Css Class</label>
39
- <%= f.text_field :css_class %></p>
40
-
41
- <p><label for="element_object" class="desc">Object Name</label>
42
- <%= f.text_field :object_name %></p>
43
-
44
- <p><label for="element_object" class="desc">Attribute Name</label>
45
- <%= f.text_field :attribute_name %></p>
46
-
47
- <p><label for="element_object" class="desc">Max Length</label>
48
- <%= f.text_field :max_length %></p>
49
- </div>
@@ -1 +0,0 @@
1
- <%= render "fe/admin/panels/common_boolean_fields_default", f: f %>
@@ -1,11 +0,0 @@
1
- <p>
2
- <%= f.check_box :required, class: "inlinecheck" %>
3
- <label for="element_required" class="inline">This field is required</label>
4
- </p>
5
-
6
- <p><%= f.check_box :is_confidential, class: "inlinecheck" %> <label for="element_is_confidential" class="inline">This field is confidential</label></p>
7
-
8
- <p>
9
- <%= f.check_box :hide_label, class: "inlinecheck" %>
10
- <label for="element_hide_label" class="inline">Hide Label</label>
11
- </p>
@@ -1,23 +0,0 @@
1
- <p>
2
- <label for="element_label" class="desc">Label (English) <span class="required">required</span></label>
3
- <%= f.text_field :label, maxlength: Fe::Element.max_label_length %>
4
- </p>
5
- <% @page.question_sheet.languages.select(&:present?).each do |language| %>
6
- <p>
7
- <label for="element_label_translations_<%= language %>" class="desc">Label (<%= Fe::LANGUAGES[language] %>) <span class="required">required</span></label>
8
- <%= text_field_tag "element[label_translations][#{language}]", @element.label_translations[language] %>
9
- </p>
10
- <% end %>
11
-
12
- <p>
13
- <label for="element_tooltip" class="desc">Tip (English)</label>
14
- <%= f.text_field :tooltip %>
15
- </p>
16
- <% @page.question_sheet.languages.select(&:present?).each do |language| %>
17
- <p>
18
- <label for="element_tip_translations_<%= language %>" class="desc">Tip (<%= Fe::LANGUAGES[language] %>)</label>
19
- <%= text_field_tag "element[tip_translations][#{language}]", @element.tip_translations[language] %>
20
- </p>
21
- <% end %>
22
-
23
- <%= render "fe/admin/panels/common_boolean_fields", f: f %>
@@ -1,6 +0,0 @@
1
- <% fields_for "element[conditions_attributes][#{i}]", condition do |fields| -%>
2
- <p><%= "and<br/>" if i != 0 %>
3
- <%= fields.collection_select :trigger_id, @questions_before_this, :id, :label %> is
4
- <%= fields.text_field :expression %>
5
- </p>
6
- <% end -%>
@@ -1,39 +0,0 @@
1
- <% route = { question_sheet_id: @page.question_sheet_id, page_id: @page.id } %>
2
-
3
- <div id="panel-elements" class="panel">
4
-
5
- <p class="instruction">Click an element to add it to the end of
6
- your page (you can drag and drop fields to reorder them later). <a href="/fe/help/builder.html" class="lbOn help" id="link-builder-help" >Help</a></p>
7
-
8
- <ul id="list-elements" class="list-elements">
9
- <li id="sp"><%= link_to "Heading", fe_admin_question_sheet_page_elements_path(route.merge(element_type: "Fe::Section")),
10
- remote: true,
11
- method: :post %></li>
12
- <li id="pa"><%= link_to "Paragraph", fe_admin_question_sheet_page_elements_path(route.merge(element_type: "Fe::Paragraph")),
13
- remote: true,
14
- method: :post %></li>
15
- <li id="sl"><%= link_to "Short Answer", new_fe_admin_question_sheet_page_element_path(route.merge(element_type: "Fe::TextField", human_type: "Short Answer")),
16
- remote: true %></li>
17
- <li id="ml"><%= link_to "Long Answer", new_fe_admin_question_sheet_page_element_path(route.merge(element_type: "Fe::TextField", human_type: "Long Answer")),
18
- remote: true %></li>
19
- <li id="co"><%= link_to "Choose One", new_fe_admin_question_sheet_page_element_path(route.merge(element_type: "Fe::ChoiceField", human_type: "Choose One")),
20
- remote: true %></li>
21
- <li id="cm"><%= link_to "Choose Many", new_fe_admin_question_sheet_page_element_path(route.merge(element_type: "Fe::ChoiceField", human_type: "Choose Many")),
22
- remote: true %></li>
23
- <li id="dt"><%= link_to "Date", new_fe_admin_question_sheet_page_element_path(route.merge(element_type: "Fe::DateField", human_type: "Date")),
24
- remote: true %></li>
25
- <li id="qg"><%= link_to "Grid", new_fe_admin_question_sheet_page_element_path(route.merge(element_type: "Fe::QuestionGrid", human_type: "Grid")),
26
- remote: true %></li>
27
- <li id="at"><%= link_to "Attachment", new_fe_admin_question_sheet_page_element_path(route.merge(element_type: "Fe::AttachmentField", human_type: "Attachment")),
28
- remote: true %></li>
29
- <li id="qgt"><%= link_to "Grid w/Total", new_fe_admin_question_sheet_page_element_path(route.merge(element_type: "Fe::QuestionGridWithTotal", human_type: "Grid w/Total")),
30
- remote: true %></li>
31
- <%#- unless Fe::Form.respond_to?(:no_refs) && Fe::Form.no_refs -%>
32
- <li id="ref"><%= link_to "Reference", new_fe_admin_question_sheet_page_element_path(route.merge(element_type: "Fe::ReferenceQuestion", human_type: "Reference")),
33
- remote: true %></li>
34
- <%#- end -%>
35
- </ul>
36
-
37
- <p style="clear: both;">&nbsp;</p>
38
- </div>
39
-
@@ -1,6 +0,0 @@
1
- <% route = { question_sheet_id: @question_sheet.id, id: @page.id } -%>
2
-
3
- <li id="tab-pages_list" class="active"><%= link_to "Pages", show_panel_fe_admin_question_sheet_page_path( route.merge(panel_name: "pages_list")), remote: true, method: :get %></li>
4
- <li id="tab-insert"><%= link_to "Elements", show_panel_fe_admin_question_sheet_page_path(route.merge(panel_name: "insert")), remote: true, method: :get %></li>
5
- <li id="tab-properties"><%= link_to "Properties", show_panel_fe_admin_question_sheet_page_path(route.merge(panel_name: "properties")), remote: true, method: :get %></li>
6
- <div class="clear"></div>
@@ -1,3 +0,0 @@
1
- <li id="link-<%= dom_id(page) %>" class="sortable <% if page == current_page %>active<% end -%>">
2
- <%= link_to page.label, fe_admin_question_sheet_page_path(page.question_sheet_id, page.id), remote: true, method: :get %>
3
- </li>
@@ -1,16 +0,0 @@
1
- <div id="panel-pages" class="panel">
2
- <div>
3
-
4
- <%= link_to "Add a page", fe_admin_question_sheet_pages_path(@page.question_sheet_id), remote: true, method: :post, id: "link-page-add" %>
5
-
6
- <ul id="list-pages" data-sortable="true" data-sortable-url="<%= reorder_fe_admin_question_sheet_pages_path(@page.question_sheet_id) %>">
7
- <%= render partial: "fe/admin/panels/page", collection: @all_pages, locals: { current_page: @page } %>
8
- </ul>
9
-
10
-
11
- </div>
12
-
13
- </div>
14
-
15
- <p class="instruction">Select a page to edit. Click "Add a page"
16
- to add a page to your form. <a href="/fe/help/builder.html" class="help" id="link-builder-help" >Help</a></p>
@@ -1,2 +0,0 @@
1
- <%= hidden_field_tag "element[style]", "file" %>
2
- <%= render "fe/admin/panels/common_fields", f: f %>
@@ -1,74 +0,0 @@
1
- <%- options = [ Fe::OptionGroup.new("Choose One", [
2
- Fe::Option.new("drop-down", "Drop Down"),
3
- Fe::Option.new("radio", "Radio Buttons"),
4
- Fe::Option.new("rating", "Rating"),
5
- Fe::Option.new("acceptance", "Acceptance"),
6
- Fe::Option.new("yes-no", "Yes/No"),
7
- Fe::Option.new("country", "Country")
8
- ]),
9
- Fe::OptionGroup.new("Choose Many", [
10
- Fe::Option.new("checkbox", "Checkboxes")
11
- ])
12
- ]
13
- %>
14
- <div class="field"><label for="element_style" class="desc">Style</label>
15
- <%= select_tag "element[style]", option_groups_from_collection_for_select(options, "group", "label", "key", "value", @element.style),
16
- onchange: "if(["acceptance", "yes-no"].include($F("element[style]"))) $("choices_section").hide(); else $("choices_section").show();" %></div>
17
-
18
- <%= render "fe/admin/panels/common_fields", f: f %>
19
-
20
- <% if @element.style == "rating" %>
21
- <% %w(before after na).each do |prefix| %>
22
- <p>
23
- <% text = prefix == "na" ? "\"Don"t Know\" " : "#{prefix.capitalize} Rating" %>
24
- <% label = "(Optional) #{text} Label" %>
25
- <label for="element_rating_<%= prefix %>_label" class="desc"><%= label %> (English)</label>
26
- <%= f.text_field :"rating_#{prefix}_label", maxlength: Fe::Element.max_label_length %>
27
- </p>
28
-
29
- <% @page.question_sheet.languages.select(&:present?).each do |language| %>
30
- <p>
31
- <label for="element_rating_<%= prefix %>_label_translations_<%= language %>" class="desc"><%= label %> (<%= Fe::LANGUAGES[language] %>)</label>
32
- <% translations_hash = @element.send("rating_#{prefix}_label_translations") || {} %>
33
- <%= text_field_tag "element[rating_#{prefix}_label_translations][#{language}]", translations_hash[language] %>
34
- </p>
35
- <% end %>
36
- <% end %>
37
- <% end %>
38
-
39
- <div class="choices_section" style="display:<%= ["acceptance", "yes-no"].include?(@element.style) ? "none" : "block" %>">
40
- <h3>Choices<br/>
41
- <% showXML = !@element.source.blank? %>
42
- <a class="link-show-xml" style="font-size: 11px; font-weight: normal; display:<% if showXML -%>none<%else-%>block<%end-%>" href="javascript:void(0);">Use External XML Feed</a>
43
- <a class="link-show-csv" style="font-size: 11px; font-weight: normal; display:<% if showXML -%>block<%else-%>none<%end-%>" href="javascript:void(0);">Manually Enter Choices</a></h3>
44
-
45
- <div class="csvChoices" style="display:<% if showXML -%>none<%else-%>block<%end-%>">
46
- <p>
47
- <label for="element_content" class="desc"><%= _("Choices (English) - One choice per line. To specify a value, split the label and value with a semi-colon, ie. "Value;Label". The value is what gets displayed on the read-only view. If no value is specified, the value will default to the choice text.") %></label>
48
- <%= f.text_area :content, rows: 6, cols: 80 %>
49
- </p>
50
- <% @page.question_sheet.languages.select(&:present?).each do |language| %>
51
- <p>
52
- <label for="element_content_translations_<%= language %>" class="desc">Choices (<%= Fe::LANGUAGES[language] %>)</label>
53
- <%= text_area_tag "element[content_translations][#{language}]", @element.content_translations[language], rows: 6, cols: 80 %>
54
- </p>
55
- <% end %>
56
-
57
- </div>
58
-
59
- <p>
60
- <%= f.check_box :hide_option_labels, class: "inlinecheck" %>
61
- <label for="element_hide_option_labels" class="inline">Hide Option Labels</label>
62
- </p>
63
-
64
- <div class="xmlChoices" style="display:<% if showXML -%>block<%else-%>none<%end-%>">
65
- <p><label for="element_source" class="desc">XML Feed for Choices</label>
66
- <%= f.text_field :source %></p>
67
-
68
- <p><label for="element_text_xpath" class="desc">XPath to Choice Text</label>
69
- <%= f.text_field :text_xpath %></p>
70
-
71
- <p><label for="element_value_xpath" class="desc">XPath to Choice Value</label>
72
- <%= f.text_field :value_xpath %></p>
73
- </div>
74
- </div>
@@ -1,7 +0,0 @@
1
-
2
- <p>
3
- <label for="element_style" class="desc">Style</label>
4
- <%= f.select :style, [["Calendar", "date"], ["Month/Year", "mmyy"]] %>
5
- </p>
6
-
7
- <%= render "fe/admin/panels/common_fields", f: f %>
@@ -1,23 +0,0 @@
1
- <div id="panel-properties-element" class="panel" style="display:block;">
2
- <p>Update the settings for this element.</p>
3
-
4
- <div id="errors">
5
- <%= render "errors", element: element %>
6
- </div>
7
-
8
- <%= form_for :element, url: fe_admin_question_sheet_page_element_path( @page.question_sheet_id, @page.id, element.id), remote: true, html: {method: :put} do |f| -%>
9
-
10
- <%= render "fe/admin/panels/prop_" + element.class.to_s.split("::").last.underscore, f: f, element: element %>
11
-
12
- <% if element.question? -%>
13
- <%= render "fe/admin/panels/advanced_options", f: f, element: element %>
14
- <% end-%>
15
-
16
- <p class="buttons">
17
- <button type="submit"><span>Update</span></button>
18
- <%= link_to("Close", "#", "data-dom_id" => dom_id(element), class: "close_prop") %>
19
- </p>
20
-
21
- <% end -%>
22
-
23
- </div>