fe 2.0.4 → 2.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/views/fe/admin/panels/_prop_choice_field.html.erb +1 -1
- data/lib/fe/version.rb +1 -1
- metadata +2 -120
- data/app/views.current/fe/admin/elements/_errors.html.erb +0 -11
- data/app/views.current/fe/admin/elements/create.js.erb +0 -12
- data/app/views.current/fe/admin/elements/destroy.js.erb +0 -4
- data/app/views.current/fe/admin/elements/drop.js.erb +0 -3
- data/app/views.current/fe/admin/elements/duplicate.js.erb +0 -3
- data/app/views.current/fe/admin/elements/edit.js.erb +0 -4
- data/app/views.current/fe/admin/elements/error.js.erb +0 -4
- data/app/views.current/fe/admin/elements/new.js.erb +0 -17
- data/app/views.current/fe/admin/elements/reorder.js.erb +0 -0
- data/app/views.current/fe/admin/elements/update.js.erb +0 -9
- data/app/views.current/fe/admin/email_templates/_form.html.erb +0 -8
- data/app/views.current/fe/admin/email_templates/edit.html.erb +0 -13
- data/app/views.current/fe/admin/email_templates/index.html.erb +0 -20
- data/app/views.current/fe/admin/email_templates/new.html.erb +0 -11
- data/app/views.current/fe/admin/panels/_advanced_options.html.erb +0 -49
- data/app/views.current/fe/admin/panels/_common_boolean_fields.html.erb +0 -1
- data/app/views.current/fe/admin/panels/_common_boolean_fields_default.html.erb +0 -11
- data/app/views.current/fe/admin/panels/_common_fields.html.erb +0 -23
- data/app/views.current/fe/admin/panels/_condition.html.erb +0 -6
- data/app/views.current/fe/admin/panels/_insert.html.erb +0 -39
- data/app/views.current/fe/admin/panels/_nav_controls.html.erb +0 -6
- data/app/views.current/fe/admin/panels/_page.html.erb +0 -3
- data/app/views.current/fe/admin/panels/_pages_list.html.erb +0 -16
- data/app/views.current/fe/admin/panels/_prop_attachment_field.html.erb +0 -2
- data/app/views.current/fe/admin/panels/_prop_choice_field.html.erb +0 -74
- data/app/views.current/fe/admin/panels/_prop_date_field.html.erb +0 -7
- data/app/views.current/fe/admin/panels/_prop_element.html.erb +0 -23
- data/app/views.current/fe/admin/panels/_prop_page.html.erb +0 -26
- data/app/views.current/fe/admin/panels/_prop_paragraph.html.erb +0 -46
- data/app/views.current/fe/admin/panels/_prop_question_grid.html.erb +0 -28
- data/app/views.current/fe/admin/panels/_prop_question_grid_with_total.html.erb +0 -14
- data/app/views.current/fe/admin/panels/_prop_reference_question.html.erb +0 -12
- data/app/views.current/fe/admin/panels/_prop_section.html.erb +0 -8
- data/app/views.current/fe/admin/panels/_prop_sheet.html.erb +0 -20
- data/app/views.current/fe/admin/panels/_prop_text_field.html.erb +0 -20
- data/app/views.current/fe/admin/question_pages/_element.html.erb +0 -28
- data/app/views.current/fe/admin/question_pages/_element_show.html.erb +0 -10
- data/app/views.current/fe/admin/question_pages/_errors.html.erb +0 -10
- data/app/views.current/fe/admin/question_pages/_question_page.html.erb +0 -13
- data/app/views.current/fe/admin/question_pages/create.js.erb +0 -11
- data/app/views.current/fe/admin/question_pages/destroy.js.erb +0 -5
- data/app/views.current/fe/admin/question_pages/edit.js.erb +0 -3
- data/app/views.current/fe/admin/question_pages/error.js.erb +0 -4
- data/app/views.current/fe/admin/question_pages/show.js.erb +0 -9
- data/app/views.current/fe/admin/question_pages/show_panel.js.erb +0 -3
- data/app/views.current/fe/admin/question_pages/update.js.erb +0 -2
- data/app/views.current/fe/admin/question_sheets/_errors.html.erb +0 -11
- data/app/views.current/fe/admin/question_sheets/edit.js.erb +0 -3
- data/app/views.current/fe/admin/question_sheets/error.js.erb +0 -5
- data/app/views.current/fe/admin/question_sheets/index.html.erb +0 -41
- data/app/views.current/fe/admin/question_sheets/new.html.erb +0 -15
- data/app/views.current/fe/admin/question_sheets/show.html.erb +0 -27
- data/app/views.current/fe/admin/question_sheets/update.js.erb +0 -2
- data/app/views.current/fe/answer_pages/_answer_page.html.erb +0 -53
- data/app/views.current/fe/answer_pages/_element.html.erb +0 -32
- data/app/views.current/fe/answer_pages/_page_name.html.erb +0 -1
- data/app/views.current/fe/answer_pages/show.html.erb +0 -39
- data/app/views.current/fe/answer_pages/update.js.erb +0 -13
- data/app/views.current/fe/answer_sheets/_answer_sheet.html.erb +0 -26
- data/app/views.current/fe/answer_sheets/_element.html.erb +0 -74
- data/app/views.current/fe/answer_sheets/_incomplete.html.erb +0 -10
- data/app/views.current/fe/answer_sheets/_page_link.html.erb +0 -9
- data/app/views.current/fe/answer_sheets/_pages_list.html.erb +0 -11
- data/app/views.current/fe/answer_sheets/_submit_to.html.erb +0 -1
- data/app/views.current/fe/answer_sheets/_title.html.erb +0 -1
- data/app/views.current/fe/answer_sheets/edit.html.erb +0 -66
- data/app/views.current/fe/answer_sheets/incomplete.js.erb +0 -11
- data/app/views.current/fe/answer_sheets/index.html.erb +0 -18
- data/app/views.current/fe/answer_sheets/send_reference_invite.js.erb +0 -8
- data/app/views.current/fe/answer_sheets/show.html.erb +0 -13
- data/app/views.current/fe/applications/_logout.html.erb +0 -1
- data/app/views.current/fe/applications/show.html.erb +0 -1
- data/app/views.current/fe/help/builder.html +0 -33
- data/app/views.current/fe/help/question_grid.html +0 -18
- data/app/views.current/fe/questions/fe/_acceptance.html.erb +0 -14
- data/app/views.current/fe/questions/fe/_attachment_field.html.erb +0 -165
- data/app/views.current/fe/questions/fe/_checkbox_field.html.erb +0 -53
- data/app/views.current/fe/questions/fe/_country.html.erb +0 -7
- data/app/views.current/fe/questions/fe/_date_field.html.erb +0 -7
- data/app/views.current/fe/questions/fe/_date_field_mmyy.html.erb +0 -9
- data/app/views.current/fe/questions/fe/_drop_down_field.html.erb +0 -8
- data/app/views.current/fe/questions/fe/_paragraph.html.erb +0 -1
- data/app/views.current/fe/questions/fe/_question_grid.html.erb +0 -70
- data/app/views.current/fe/questions/fe/_question_grid_with_total.html.erb +0 -64
- data/app/views.current/fe/questions/fe/_questions.html.erb +0 -15
- data/app/views.current/fe/questions/fe/_radio_button_field.html.erb +0 -60
- data/app/views.current/fe/questions/fe/_rating.html.erb +0 -64
- data/app/views.current/fe/questions/fe/_reference_discipler.html.erb +0 -1
- data/app/views.current/fe/questions/fe/_reference_friend.html.erb +0 -1
- data/app/views.current/fe/questions/fe/_reference_parent.html.erb +0 -1
- data/app/views.current/fe/questions/fe/_reference_peer.html.erb +0 -1
- data/app/views.current/fe/questions/fe/_reference_question.html.erb +0 -61
- data/app/views.current/fe/questions/fe/_reference_roommate.html.erb +0 -1
- data/app/views.current/fe/questions/fe/_reference_spiritual.html.erb +0 -1
- data/app/views.current/fe/questions/fe/_reference_staff.html.erb +0 -1
- data/app/views.current/fe/questions/fe/_section.html.erb +0 -1
- data/app/views.current/fe/questions/fe/_state_chooser.html.erb +0 -7
- data/app/views.current/fe/questions/fe/_text_area_field.html.erb +0 -17
- data/app/views.current/fe/questions/fe/_text_field.html.erb +0 -9
- data/app/views.current/fe/questions/fe/_yes_no.html.erb +0 -17
- data/app/views.current/fe/questions/fe/_yes_no_field.erb +0 -20
- data/app/views.current/fe/reference_pages/_reference.html.erb +0 -31
- data/app/views.current/fe/reference_pages/edit.html.erb +0 -24
- data/app/views.current/fe/reference_sheets/done.html.erb +0 -2
- data/app/views.current/fe/reference_sheets/not_found.html.erb +0 -5
- data/app/views.current/fe/reference_sheets/submitted.js.erb +0 -1
- data/app/views.current/fe/references/edit.html.erb +0 -8
- data/app/views.current/fe/references/send_invite.js.erb +0 -7
- data/app/views.current/fe/references/show.html.erb +0 -18
- data/app/views.current/fe/references/submit.js.erb +0 -3
- data/app/views.current/fe/submit_pages/_errors.html.erb +0 -1
- data/app/views.current/fe/submit_pages/_thankyou.html.erb +0 -2
- data/app/views.current/fe/submit_pages/edit.html.erb +0 -36
- data/app/views.current/fe/submit_pages/error.js.erb +0 -1
- data/app/views.current/fe/submit_pages/submit.js.erb +0 -3
- data/app/views.current/layouts/fe/_error_messages_for.html.erb +0 -7
- data/app/views.current/layouts/fe/application.html.erb +0 -47
- data/app/views.current/layouts/fe/fe_admin.html.erb +0 -30
@@ -1,74 +0,0 @@
|
|
1
|
-
<% if element.kind == "Fe::QuestionGrid" || element.kind == "Fe::QuestionGridWithTotal"-%>
|
2
|
-
<li>
|
3
|
-
<% unless element.hide_label? %>
|
4
|
-
<label class="desc"><%= raw element.label %></label>
|
5
|
-
<% end %>
|
6
|
-
<table class="grid">
|
7
|
-
<%- if element.cols -%>
|
8
|
-
<tr>
|
9
|
-
<%- element.cols.split(";").each do |header| -%>
|
10
|
-
<th><%= raw header || " " %></th>
|
11
|
-
<%- end -%>
|
12
|
-
</tr>
|
13
|
-
<%- end -%>
|
14
|
-
<tr>
|
15
|
-
<%- col_count = 0
|
16
|
-
element.elements.each do |grid_element| -%>
|
17
|
-
<td id="element_<%= element.id %>">
|
18
|
-
<% if %w(Fe::Paragraph).include?(grid_element.kind) -%>
|
19
|
-
<%= simple_format grid_element.content %>
|
20
|
-
<% else -%>
|
21
|
-
<%# el = elements.detect {|el| el.id == grid_element.id } -%>
|
22
|
-
<% if grid_element.question? -%>
|
23
|
-
<label class="desc"><%= raw grid_element.label %></label>
|
24
|
-
<%- if @collating -%>
|
25
|
-
<%- for answer_sheet in @collated_answer_sheets[@answer_sheet] -%>
|
26
|
-
<div class="answer collate">
|
27
|
-
<span class="reviewer_name"><%= answer_sheet.collat_title %>:</span>
|
28
|
-
<span class="reviewer_answer"><%= simple_format grid_element.display_response(answer_sheet) %></span>
|
29
|
-
</div>
|
30
|
-
<%- end -%>
|
31
|
-
<%- else -%>
|
32
|
-
<span class="answer"><%= simple_format grid_element.display_response(@answer_sheet) %></span>
|
33
|
-
<%- end -%>
|
34
|
-
<% elsif grid_element.is_a?(Fe::QuestionGrid) || grid_element.is_a?(Fe::QuestionGridWithTotal) %>
|
35
|
-
<ul>
|
36
|
-
<%= render partial: "fe/answer_sheets/element", object: grid_element %>
|
37
|
-
</ul>
|
38
|
-
<% else %>
|
39
|
-
<%= render partial: "fe/questions/" + element.ptemplate, object: element %>
|
40
|
-
<% end %>
|
41
|
-
<% end -%>
|
42
|
-
</td>
|
43
|
-
<%- col_count += 1
|
44
|
-
if col_count % element.num_cols == 0 then col_count = 0 -%></tr><tr><%- end -%>
|
45
|
-
<%- end -%>
|
46
|
-
<%- while col_count < element.num_cols do
|
47
|
-
col_count += 1-%>
|
48
|
-
<td> </td>
|
49
|
-
<%- end unless col_count == 0-%>
|
50
|
-
</tr>
|
51
|
-
</table>
|
52
|
-
</li>
|
53
|
-
<% else %>
|
54
|
-
<li>
|
55
|
-
<% if element.question? -%>
|
56
|
-
<label class="desc"><%= raw element.label %></label>
|
57
|
-
<%- if @collating -%>
|
58
|
-
<%- for answer_sheet in @collated_answer_sheets[@answer_sheet] -%>
|
59
|
-
<div class="answer collate">
|
60
|
-
<span class="reviewer_name"><%= answer_sheet.collat_title %>:</span>
|
61
|
-
<span class="reviewer_answer"><%= simple_format element.display_response(answer_sheet) %></span>
|
62
|
-
</div>
|
63
|
-
<%- end -%>
|
64
|
-
<%- else -%>
|
65
|
-
<span class="answer"><%= simple_format element.display_response(@answer_sheet) %></span>
|
66
|
-
<%- end -%>
|
67
|
-
<% else -%>
|
68
|
-
<%= render partial: "fe/questions/" + element.ptemplate, object: element %>
|
69
|
-
<% end -%>
|
70
|
-
</li>
|
71
|
-
<% element.choice_field_children.each do |choice_field_child| %>
|
72
|
-
<%= render "fe/answer_sheets/element", element: choice_field_child %>
|
73
|
-
<% end %>
|
74
|
-
<% end -%>
|
@@ -1,10 +0,0 @@
|
|
1
|
-
<div class="submission_errors">
|
2
|
-
<p><%= _("You still need to answer questions on the following pages:") %></p>
|
3
|
-
<ul>
|
4
|
-
<% @answer_sheet.pages.each do |page| %>
|
5
|
-
<% unless page.complete?(@answer_sheet) %>
|
6
|
-
<li class="incomplete"><%= page.label %></li>
|
7
|
-
<% end %>
|
8
|
-
<% end %>
|
9
|
-
</ul>
|
10
|
-
</div>
|
@@ -1,9 +0,0 @@
|
|
1
|
-
<div class="application_section">
|
2
|
-
<% css_class = "" %>
|
3
|
-
<% if session[:attempted_submit] && page_link.page.has_questions? %>
|
4
|
-
<% css_class = page_link.page.complete?(@answer_sheet) ? "complete" : "incomplete" %>
|
5
|
-
<% end %>
|
6
|
-
<%= li_page_active_if(@presenter.active_page && page_link.page == @presenter.active_page, id: page_link.dom_id + "-li", class: css_class, style: ("display:none" if page_link.page.hidden?(@answer_sheet))) do %>
|
7
|
-
<%= link_to_function(page_link.label(session[:locale]), load_page_js(page_link), id: page_link.dom_id + "-link", "data-page-id" => page_link.dom_id, class: "page_link", href: page_link.load_path) %>
|
8
|
-
<% end -%>
|
9
|
-
</div>
|
@@ -1,11 +0,0 @@
|
|
1
|
-
<div id="panel-pages">
|
2
|
-
<h4><%= _("Application Sections") %></h4>
|
3
|
-
<div id="page_ajax_spinner" style="display:none;">
|
4
|
-
<div>
|
5
|
-
<%= image_tag "fe/ajax-loader.gif" %> <%= _("Loading...") %>
|
6
|
-
</div>
|
7
|
-
</div>
|
8
|
-
<ul id="list-pages" class="navigation-list">
|
9
|
-
<%= render partial: "fe/answer_sheets/page_link", collection: @presenter.page_links %>
|
10
|
-
</ul>
|
11
|
-
</div>
|
@@ -1 +0,0 @@
|
|
1
|
-
<%= hidden_field_tag "submit_to", submit_fe_answer_sheet_path(@answer_sheet), id: "submit_to" %>
|
@@ -1 +0,0 @@
|
|
1
|
-
<h3 id="sheet-name"><%= @presenter.sheet_title %></h3>
|
@@ -1,66 +0,0 @@
|
|
1
|
-
<% if !@presenter.active_page %>
|
2
|
-
<div>
|
3
|
-
The administrator has not set up this questionnaire yet.
|
4
|
-
</div>
|
5
|
-
<% else %>
|
6
|
-
<div id="controls">
|
7
|
-
<div id="panel">
|
8
|
-
<%= render partial: "fe/answer_sheets/pages_list" %>
|
9
|
-
</div>
|
10
|
-
<div id="legend">
|
11
|
-
<%= image_tag("fe/icons/question-balloon.png") %> <%= _("Rolling over this symbol gives you help") %><br/>
|
12
|
-
<%= image_tag("fe/icons/star-small.png") %> <%= _("Marks a required field") %>
|
13
|
-
</div>
|
14
|
-
</div>
|
15
|
-
|
16
|
-
<div id="preview">
|
17
|
-
<%= render partial: "fe/answer_sheets/title" %>
|
18
|
-
<%= render partial: "fe/answer_pages/answer_page", locals: { show_first: true } %>
|
19
|
-
</div>
|
20
|
-
|
21
|
-
<script type="text/javascript">
|
22
|
-
$(function() {
|
23
|
-
page_handler = fe.pageHandler;
|
24
|
-
page_handler.initialize("<%= @presenter.active_page_link.try(:dom_id) %>");
|
25
|
-
// Event.observe(window, "unload", page_handler.savePage);
|
26
|
-
|
27
|
-
// Validation.add("validate-phone", "Please enter a valid phone number +1-800-555-1234 x102", {
|
28
|
-
// pattern: /((\(\d{3}\)?)|(\d{3}))((\s|-|\.|\/)?)(\d{3})((\s|-|\.|\/)?)(\d{4})\s*([xX]|[eE][xX][tT])?\.?\s*\d*$/
|
29
|
-
// });
|
30
|
-
// Validation.add("validate-rating", "Please select one of the above options.", function(v,elm) {
|
31
|
-
// var p = elm.parentNode.parentNode;
|
32
|
-
// var options = p.getElementsByTagName("INPUT");
|
33
|
-
// return $A(options).any(function(elm) {
|
34
|
-
// return $F(elm);
|
35
|
-
// });
|
36
|
-
// })
|
37
|
-
|
38
|
-
// global responders for all Ajax requests
|
39
|
-
$(function() {
|
40
|
-
$(document).ajaxStart(function() {
|
41
|
-
$("#page_ajax_spinner").show();
|
42
|
-
$("#page_ajax_spinner").css({top: $(window).scrollTop() + 200});
|
43
|
-
}).ajaxComplete(function() {
|
44
|
-
$("#page_ajax_spinner").hide();
|
45
|
-
})
|
46
|
-
});
|
47
|
-
});
|
48
|
-
function updateTotals() {
|
49
|
-
// Set up js for all question grids with totals
|
50
|
-
<% if @page %>
|
51
|
-
<% @page.question_sheet.pages.collect(&:question_grid_with_totals).flatten.each do |question_grid_with_total|
|
52
|
-
question_grid_with_total.total_cols.split(",").collect(&:to_i).each do |col| -%>
|
53
|
-
try {
|
54
|
-
updateTotal("<%= "#{question_grid_with_total.id}_#{col - 1}" %>");
|
55
|
-
$(".col_<%= "#{question_grid_with_total.id}_#{col - 1}" %>").change(function(e) {
|
56
|
-
updateTotal("<%= "#{question_grid_with_total.id}_#{col - 1}" %>");
|
57
|
-
});
|
58
|
-
} catch(e) {}
|
59
|
-
<% end
|
60
|
-
end %>
|
61
|
-
<% end %>
|
62
|
-
}
|
63
|
-
$(function() { $(document).trigger("fePageLoaded"); });
|
64
|
-
</script>
|
65
|
-
<%= render "fe/answer_sheets/submit_to" %>
|
66
|
-
<% end %>
|
@@ -1,11 +0,0 @@
|
|
1
|
-
if ($('#submit_message, .submit_message').length == 0) {
|
2
|
-
$("ul#questions_list").filter(":visible").append("<li><div id=\"submit_message\"></div></li>");
|
3
|
-
}
|
4
|
-
$('#submit_message, .submit_message').html('<%= escape_javascript(render("incomplete")) %>')
|
5
|
-
<% @answer_sheet.pages.each do |page| %>
|
6
|
-
$page = $('<%= escape_javascript(render("fe/answer_sheets/page_link", page_link: @presenter.new_page_link(@answer_sheet, page))) %>');
|
7
|
-
<% id = "##{dom_id(@answer_sheet)}-#{dom_id(page)}-li" %>
|
8
|
-
$('<%= id %>').replaceWith($page.find('<%= id %>'));
|
9
|
-
<% end %>
|
10
|
-
$('#submit_message, .submit_message').show();
|
11
|
-
$('#'+fe.pageHandler.current_page+'-li').addClass('active');
|
@@ -1,18 +0,0 @@
|
|
1
|
-
<h1>Questionnaires</h1>
|
2
|
-
|
3
|
-
<% form_tag fe_answer_sheets_path do %>
|
4
|
-
<%= select_tag("question_sheet_id", options_for_select(@question_sheets)) %>
|
5
|
-
<%= submit_tag("Capture") %>
|
6
|
-
<% end -%>
|
7
|
-
|
8
|
-
<table cellspacing="0" class="list">
|
9
|
-
<% for answer_sheet in @answer_sheets %>
|
10
|
-
<tr>
|
11
|
-
<td><%= link_to answer_sheet.question_sheet.label, edit_fe_answer_sheet_path(answer_sheet) %></td>
|
12
|
-
<td><%= link_to "Review", fe_answer_sheet_path(answer_sheet), method: :get %></td>
|
13
|
-
</tr>
|
14
|
-
<% end %>
|
15
|
-
</table>
|
16
|
-
|
17
|
-
<br />
|
18
|
-
|
@@ -1,8 +0,0 @@
|
|
1
|
-
<% unless @reference.valid? %>
|
2
|
-
alert('<%= escape_javascript(@reference.errors.full_messages.join("\n").html_safe) %>');
|
3
|
-
<% else %>
|
4
|
-
<% if @reference.email_sent_at.present? %>
|
5
|
-
$('#ref_last_sent_<%= @reference.id %>').html('<%= @reference.email_sent_at.strftime("%m/%d/%Y @ %I:%M%p") %>')
|
6
|
-
$('#ref_last_sent_<%= @reference.id %>').effect("highlight", {}, 3000);
|
7
|
-
<% end %>
|
8
|
-
<% end %>
|
@@ -1,13 +0,0 @@
|
|
1
|
-
<div id="controls">
|
2
|
-
<div id="panel">
|
3
|
-
<div class="panel">
|
4
|
-
|
5
|
-
</div>
|
6
|
-
</div>
|
7
|
-
</div>
|
8
|
-
|
9
|
-
<div id="preview" class="answer-page">
|
10
|
-
|
11
|
-
<%= render partial: "fe/answer_sheets/answer_sheet", locals: {answer_sheet: @answer_sheet, elements: @elements } %>
|
12
|
-
|
13
|
-
</div>
|
@@ -1 +0,0 @@
|
|
1
|
-
<% if user_signed_in? %><%= link_to(_("Log Out"), destroy_user_session_path, { method: :delete, style: "color: #fff;", id: "link-log-out" }) %><% end %>
|
@@ -1 +0,0 @@
|
|
1
|
-
Implement the applications show view in your app
|
@@ -1,33 +0,0 @@
|
|
1
|
-
<div id="help">
|
2
|
-
<h1>Form Designer Help</h1>
|
3
|
-
|
4
|
-
<h2>Pages</h2>
|
5
|
-
|
6
|
-
<p>Pages are the individual forms which make up a questionnaire. There must be
|
7
|
-
at least one page in your questionnaire, but there is no limit to the number
|
8
|
-
of pages allowed.</p>
|
9
|
-
|
10
|
-
<p>To add a page, click the "Add a page" link at the bottom of the list of
|
11
|
-
pages.</p>
|
12
|
-
|
13
|
-
<p>To edit a page's title, click the text of the title in the preview area on the right.</p>
|
14
|
-
|
15
|
-
<p>To edit the name of the questionnaire, click the text of the questionnaire's title in the preview area on the right.</p>
|
16
|
-
|
17
|
-
<h2>Elements</h2>
|
18
|
-
|
19
|
-
<p>Elements are the individual questions on a page. The list of elements can
|
20
|
-
be seen by clicking on the "Elements" tab. To add an element, simply
|
21
|
-
click the type you wish to add to your form. Once an element has been
|
22
|
-
added to a page, you can edit, reorder and add elements to grids.</p>
|
23
|
-
|
24
|
-
<p>To edit an element, click on the 'pencil' icon [ <img src="/images/fe/icons/pencil.png" style="height: 11px; width: 11px;" /> ].</p>
|
25
|
-
|
26
|
-
<p>To reorder elements, click on the 'drag' icon [ <img src="/images/fe/icons/move.png" style="height: 11px; width: 11px;" /> ]
|
27
|
-
and drag the element to the desired position in the list. If you need to scroll to get to the desired position, you can use either the scroll wheel on your mouse
|
28
|
-
or your keyboard (arrows, page up/down, etc).</p>
|
29
|
-
|
30
|
-
<p>To add an element to a grid, click on the 'drag' icon [ <img src="/images/fe/icons/move.png" style="height: 11px; width: 11px;" /> ] and drag the element onto the grid, within the gray border of the grid.</p>
|
31
|
-
|
32
|
-
<p>To remove an element from a grid, click the 'remove' icon [ <img src="/images/fe/icons/arrow_out.png" style="height: 11px; width: 11px;" /> ]. </p>
|
33
|
-
</div>
|
@@ -1,18 +0,0 @@
|
|
1
|
-
<div id="help">
|
2
|
-
<div style="float: right;"><a href="#" class="lbAction" rel="deactivate">close X</a></div>
|
3
|
-
|
4
|
-
<h1>Question Grid Help</h1>
|
5
|
-
|
6
|
-
<p>Grids will not be displayed in a grid format in the administration
|
7
|
-
system for easier editing and organization. Please view the public
|
8
|
-
application to preview the final grid format once you have fully assembled
|
9
|
-
your list of elements in the grid.</p>
|
10
|
-
|
11
|
-
<p>Set the number of columns and column headings using the <b>Column Headings</b>
|
12
|
-
field. When the formatted grid is displayed on an application, the
|
13
|
-
elements will be added left-to-right. A new row will be created depending
|
14
|
-
on the number of columns you've set for the grid. For example, if your
|
15
|
-
<b>Column Headings</b> are "Column 1;Column 2;Column 3", then you have three
|
16
|
-
columns and every three elements added to the grid will create a new
|
17
|
-
row in the grid.</p>
|
18
|
-
</div>
|
@@ -1,14 +0,0 @@
|
|
1
|
-
<% css_class = "checkbox " + acceptance.validation_class(@answer_sheet, @page)
|
2
|
-
checked = acceptance.has_answer?("1", @answer_sheet)
|
3
|
-
locked = acceptance.locked?(params, @answer_sheet, @presenter, current_person)
|
4
|
-
%>
|
5
|
-
<%= check_box_tag "answers[#{acceptance.id}]", "1",
|
6
|
-
checked,
|
7
|
-
id: dom_id(acceptance),
|
8
|
-
class: css_class,
|
9
|
-
disabled: locked,
|
10
|
-
readonly: locked %>
|
11
|
-
<label class="choice" for="<%= dom_id(acceptance) %>">
|
12
|
-
<%= raw acceptance.label(session[:locale]) %>
|
13
|
-
</label>
|
14
|
-
<%= hidden_field_tag "answers[#{acceptance.id}]", "", id: "" %>
|
@@ -1,165 +0,0 @@
|
|
1
|
-
<% element_id = attachment_field.id; base_element = "#element_#{element_id}" %>
|
2
|
-
|
3
|
-
<% if @presenter %>
|
4
|
-
<% answer = attachment_field.responses(@answer_sheet).first %>
|
5
|
-
<% if @answer_sheet&.frozen? && !@answer_sheet&.reference? %>
|
6
|
-
<% if answer %>
|
7
|
-
Current File: <%= link_to(answer.attachment.filename, url_for(answer.attachment)) %>
|
8
|
-
<%= link_to(image_tag("fe/icons/minus-button.png"),
|
9
|
-
delete_file_fe_answer_sheet_page_path(@presenter.active_answer_sheet, @page, question_id: element_id, answer_sheet_type: @answer_sheet.class.name),
|
10
|
-
method: :delete, remote: true) %>
|
11
|
-
<% end %>
|
12
|
-
<% else %>
|
13
|
-
<div class="legacy_uploader" style="display: none">
|
14
|
-
<div class="uploader">
|
15
|
-
<input <% if Fe.bootstrap %>class="form-control"<% end %> id="<%= dom_id(attachment_field) %>_file_uploader" name="image_uploader" type="file" />
|
16
|
-
|
17
|
-
<span id="<%= dom_id(attachment_field) %>_filename">
|
18
|
-
<% answer = attachment_field.sheet_answers.where(answer_sheet: @answer_sheet).first # using responses method doesn't work because it filters out value nil, but on attachments value will be nil
|
19
|
-
if answer&.attachment&.attached? %>
|
20
|
-
Current File: <%= link_to(answer.attachment.filename, url_for(answer.attachment)) %>
|
21
|
-
<%= link_to(image_tag('fe/icons/minus-button.png'),
|
22
|
-
delete_file_fe_answer_sheet_page_path(@presenter.active_answer_sheet, @page, question_id: element_id, answer_sheet_type: @answer_sheet.class.name),
|
23
|
-
method: :delete, remote: true) %>
|
24
|
-
<% end %>
|
25
|
-
</span>
|
26
|
-
</div>
|
27
|
-
|
28
|
-
<script type="text/javascript" charset="utf-8">
|
29
|
-
<% session_key_name = Rails.application.config.session_options[:key] %>
|
30
|
-
$('#<%= dom_id(attachment_field) %>_file_uploader').uploadify({
|
31
|
-
uploader : '<%= asset_path "fe/uploadify/uploadify.swf" %>',
|
32
|
-
script : '<%= save_file_fe_answer_sheet_page_path(@presenter.active_answer_sheet, @page, question_id: element_id, answer_sheet_type: @answer_sheet.class.name) %>',
|
33
|
-
fileDesc : 'Pick a file',
|
34
|
-
fileExt : '<%= attachment_field.content || "*.*" %>',
|
35
|
-
auto : true,
|
36
|
-
sizeLimit : <%= 100.megabytes %>,
|
37
|
-
width : 350,
|
38
|
-
height : 30,
|
39
|
-
multi : true,
|
40
|
-
simUploadLimit : 2,
|
41
|
-
method : 'POST',
|
42
|
-
cancelImg : '<%= asset_path "fe/uploadify/cancel.png" %>',
|
43
|
-
onComplete : function(a, b, c, response){ eval(response); },
|
44
|
-
buttonText : 'Attach a file',
|
45
|
-
scriptData : {
|
46
|
-
'_http_accept': 'application/javascript',
|
47
|
-
'_method': 'post',
|
48
|
-
'<%= session_key_name %>' : encodeURIComponent('<%= u cookies[session_key_name] %>'),
|
49
|
-
'authenticity_token': encodeURIComponent('<%= u form_authenticity_token %>'),
|
50
|
-
'answer_sheet_type': answer_sheet_type
|
51
|
-
}
|
52
|
-
});
|
53
|
-
</script>
|
54
|
-
</div>
|
55
|
-
|
56
|
-
<div class="new_uploader">
|
57
|
-
|
58
|
-
<% if answer&.attachment&.attached? %>
|
59
|
-
Current File: <%= link_to(answer.attachment.filename, url_for(answer.attachment)) %>
|
60
|
-
<%= link_to(image_tag("fe/icons/minus-button.png"),
|
61
|
-
delete_file_fe_answer_sheet_page_path(@presenter.active_answer_sheet, @page, question_id: element_id, answer_sheet_type: @answer_sheet.class.name),
|
62
|
-
method: :delete, remote: true, class: 'remove_current') %>
|
63
|
-
<script>
|
64
|
-
$('<%= base_element %> .remove_current').click(function() {
|
65
|
-
$.ajax({
|
66
|
-
type: 'DELETE',
|
67
|
-
url: '<%= delete_file_fe_answer_sheet_page_path(@presenter.active_answer_sheet, @page, question_id: element_id, answer_sheet_type: @answer_sheet.class.name) %>',
|
68
|
-
success: function(result) {
|
69
|
-
$.get("/fe/answer_sheets/<%= @answer_sheet.id %>/page/<%= @page.id %>/edit?answer_sheet_type=<%= @answer_sheet.class.name %>", function(data) {
|
70
|
-
$('<%= base_element %>').replaceWith($(data).find('<%= base_element %>'))
|
71
|
-
});
|
72
|
-
}
|
73
|
-
});
|
74
|
-
return false;
|
75
|
-
});
|
76
|
-
</script>
|
77
|
-
<% else %>
|
78
|
-
|
79
|
-
<style>
|
80
|
-
.drop_area.file_hover {
|
81
|
-
background:red;
|
82
|
-
}
|
83
|
-
|
84
|
-
</style>
|
85
|
-
|
86
|
-
<input type="file" class="upload_field" <% if attachment_field.content %>accept="<%= attachment_field.content %>"<% end %>/>
|
87
|
-
<div class="drop_area" style="margin:20px 0; width:300px; padding:20px; border:1px dashed black;">or drop a file here</div>
|
88
|
-
<div class="progress_report">
|
89
|
-
<div class="progress_report_name"></div>
|
90
|
-
<div class="progress_report_status" style="font-style: italic;"></div>
|
91
|
-
<div class="progress_report_bar_container" style="width: 90%; height: 5px;">
|
92
|
-
<div class="progress_report_bar" style="background-color: blue; width: 0; height: 100%;"></div>
|
93
|
-
</div>
|
94
|
-
<br/>
|
95
|
-
</div>
|
96
|
-
<script type="text/javascript">
|
97
|
-
$(function() {
|
98
|
-
|
99
|
-
var $input = $("<%= base_element %> .upload_field").html5_upload({
|
100
|
-
url: function(number) {
|
101
|
-
return "<%= save_file_fe_answer_sheet_page_path(@presenter.active_answer_sheet, @page, question_id: element_id, answer_sheet_type: @answer_sheet.class.name) %>";
|
102
|
-
},
|
103
|
-
sendBoundary: window.FormData || $.browser.mozilla,
|
104
|
-
onStart: function(event, total) {
|
105
|
-
return true;
|
106
|
-
return confirm("You are trying to upload " + total + " files. Are you sure?");
|
107
|
-
},
|
108
|
-
onProgress: function(event, progress, name, number, total) {
|
109
|
-
console.log(progress, number);
|
110
|
-
},
|
111
|
-
setName: function(text) {
|
112
|
-
$("#element_<%= attachment_field.id %> .progress_report_name").text(text);
|
113
|
-
},
|
114
|
-
setStatus: function(text) {
|
115
|
-
if (!$("<%= base_element %> .upload_field").data('error', true)) {
|
116
|
-
$("<%= base_element %> .progress_report_status").text(text);
|
117
|
-
}
|
118
|
-
},
|
119
|
-
setProgress: function(val) {
|
120
|
-
$("<%= base_element %> .progress_report_bar").css('width', Math.ceil(val*100)+"%");
|
121
|
-
},
|
122
|
-
onFinishOne: function(event, response, name, number, total) {
|
123
|
-
// Re-render the attachment file to show the current file; use the page view, which is not the
|
124
|
-
// most efficient way, but lets us avoid making an action just for this. And the amount of data
|
125
|
-
// on a page is not that much
|
126
|
-
$.get("/fe/answer_sheets/<%= @answer_sheet.id %>/page/<%= @page.id %>/edit?answer_sheet_type=<%= @answer_sheet.class.name %>", function(data) {
|
127
|
-
$('<%= base_element %>').replaceWith($(data).find('<%= base_element %>'))
|
128
|
-
});
|
129
|
-
},
|
130
|
-
onError: function(event, name, error) {
|
131
|
-
$("<%= base_element %> .upload_field").data('error', true)
|
132
|
-
$('<%= base_element %> .progress_report_status').text('Error while uploading file ' + name)
|
133
|
-
}, onBrowserIncompatible: function() {
|
134
|
-
$("<%= base_element %> .legacy_uploader").show();
|
135
|
-
$("<%= base_element %> .new_uploader").hide();
|
136
|
-
},
|
137
|
-
});
|
138
|
-
|
139
|
-
// this is absolutely necessary -- see http://weblog.bocoup.com/using-datatransfer-with-jquery-events/
|
140
|
-
if ($.fn.jquery.substring(0, 2) == "3.") {
|
141
|
-
$.event.addProp('dataTransfer');
|
142
|
-
} else {
|
143
|
-
$.event.props.push('dataTransfer');
|
144
|
-
}
|
145
|
-
|
146
|
-
var $drop = $('<%= base_element %> .drop_area');
|
147
|
-
$drop.on('dragover dragenter', function(e) {
|
148
|
-
$drop.addClass('file_hover');
|
149
|
-
return false;
|
150
|
-
}).on('dragleave dragexit', function(e) {
|
151
|
-
$drop.removeClass('file_hover');
|
152
|
-
return false;
|
153
|
-
}).on( 'drop', function(e) {
|
154
|
-
if(e.originalEvent.dataTransfer && e.originalEvent.dataTransfer.files.length) {
|
155
|
-
$input.trigger('html5_upload.startFromDrop', e );
|
156
|
-
}
|
157
|
-
return false;
|
158
|
-
})
|
159
|
-
|
160
|
-
});
|
161
|
-
</script>
|
162
|
-
</div>
|
163
|
-
<% end %>
|
164
|
-
<% end %>
|
165
|
-
<% end %>
|
@@ -1,53 +0,0 @@
|
|
1
|
-
<% if checkbox_field.hide_option_labels? && !["question_pages", "question_sheets", "elements"].include?(controller.controller_name) %>
|
2
|
-
<tr id="<%= dom_id(checkbox_field) %>">
|
3
|
-
<td>
|
4
|
-
<label for="<%= dom_id(checkbox_field) %>" class="desc">
|
5
|
-
<%= raw checkbox_field.label(session[:locale]) %>
|
6
|
-
<% if checkbox_field.required?(@answer_sheet, @page) -%><span class="required">required</span><% end -%>
|
7
|
-
<%= tip(checkbox_field.tooltip) if checkbox_field.tooltip.present? %>
|
8
|
-
</label>
|
9
|
-
</td>
|
10
|
-
<% choices = checkbox_field.choices(session[:locale]) %>
|
11
|
-
<% choices.each_with_index do |choice, num| -%>
|
12
|
-
<td>
|
13
|
-
<% css_class = checkbox_field.css_class.to_s + " checkbox " -%>
|
14
|
-
<% dom_id = dom_id(checkbox_field) + "_" + pretty_tag(choice[1])
|
15
|
-
last_choice = (num == choices.length - 1)
|
16
|
-
css_class += checkbox_field.validation_class(@answer_sheet, @page) if last_choice
|
17
|
-
locked = checkbox_field.locked?(params, @answer_sheet, @presenter, current_person)
|
18
|
-
%>
|
19
|
-
<%= hidden_field_tag "answers[#{checkbox_field.id}][#{num}]", "", id: "" %>
|
20
|
-
<div class="field field_check">
|
21
|
-
<%= check_box_tag "answers[#{checkbox_field.id}][#{num}]", choice[1],
|
22
|
-
checkbox_field.has_answer?(choice[1], @answer_sheet),
|
23
|
-
id: dom_id,
|
24
|
-
class: css_class,
|
25
|
-
disabled: locked,
|
26
|
-
readonly: locked %>
|
27
|
-
</div>
|
28
|
-
</td>
|
29
|
-
<% end -%>
|
30
|
-
</tr>
|
31
|
-
<% else %>
|
32
|
-
<div id="<%= dom_id(checkbox_field) %>">
|
33
|
-
<% css_class = checkbox_field.css_class.to_s + " checkbox " -%>
|
34
|
-
<% choices = checkbox_field.choices(session[:locale]) %>
|
35
|
-
<% choices.each_with_index do |choice, num| -%>
|
36
|
-
<% dom_id = dom_id(checkbox_field) + "_" + pretty_tag(choice[1])
|
37
|
-
last_choice = (num == choices.length - 1)
|
38
|
-
css_class += checkbox_field.validation_class(@answer_sheet, @page) if last_choice
|
39
|
-
locked = checkbox_field.locked?(params, @answer_sheet, @presenter, current_person)
|
40
|
-
%>
|
41
|
-
<%= hidden_field_tag "answers[#{checkbox_field.id}][#{num}]", "", id: "" %>
|
42
|
-
<div class="field field_check">
|
43
|
-
<%= check_box_tag "answers[#{checkbox_field.id}][#{num}]", choice[1],
|
44
|
-
checkbox_field.has_answer?(choice[1], @answer_sheet),
|
45
|
-
id: dom_id,
|
46
|
-
class: css_class,
|
47
|
-
disabled: locked,
|
48
|
-
readonly: locked %>
|
49
|
-
<label class="choice" for="<%= dom_id %>"><%= choice[0] %></label>
|
50
|
-
</div>
|
51
|
-
<% end -%>
|
52
|
-
</div>
|
53
|
-
<% end %>
|
@@ -1,7 +0,0 @@
|
|
1
|
-
<% locked = country.locked?(params, @answer_sheet, @presenter, current_person) %>
|
2
|
-
<%= select_tag "answers[#{country.id}]",
|
3
|
-
options_for_select([""] + Carmen.countries, country.response(@answer_sheet).to_s),
|
4
|
-
class: "#{"form-control" if Fe.bootstrap} select " + country.validation_class(@answer_sheet, @page),
|
5
|
-
id: dom_id(country),
|
6
|
-
disabled: locked,
|
7
|
-
readonly: locked %>
|
@@ -1,7 +0,0 @@
|
|
1
|
-
<% locked = date_field.locked?(params, @answer_sheet, @presenter, current_person) %>
|
2
|
-
<%= calendar_date_select_tag "answers[#{date_field.id}]", date_field.format_date_response(@answer_sheet),
|
3
|
-
class: "#{"form-control" if Fe.bootstrap} text " + date_field.validation_class(@answer_sheet, @page),
|
4
|
-
id: dom_id(date_field),
|
5
|
-
disabled: locked,
|
6
|
-
readonly: true %>
|
7
|
-
<div id="advice-required-<%= dom_id(date_field) %>" class="validation-advice" style="display: none;">This is a required field.</div>
|
@@ -1,9 +0,0 @@
|
|
1
|
-
<%= select_month(date_field_mmyy.response(@answer_sheet), include_blank: true,
|
2
|
-
prefix: "answers[#{date_field_mmyy.id}]",
|
3
|
-
class: "#{"form-control" if Fe.bootstrap} select " + date_field_mmyy.validation_class(@answer_sheet, @page)) %>
|
4
|
-
<%= select_year(date_field_mmyy.response(@answer_sheet), include_blank: true,
|
5
|
-
start_year: Time.now.year - 50, end_year: Time.now.year + 7,
|
6
|
-
prefix: "answers[#{date_field_mmyy.id}]",
|
7
|
-
class: "select " + date_field_mmyy.validation_class(@answer_sheet, @page)) %>
|
8
|
-
|
9
|
-
<% # not validated because class doesn"t pass, see ticket #6000 -%>
|
@@ -1,8 +0,0 @@
|
|
1
|
-
<% choices = drop_down_field.choices(session[:locale]) %>
|
2
|
-
<% locked = drop_down_field.locked?(params, @answer_sheet, @presenter, current_person) %>
|
3
|
-
<%= select_tag "answers[#{drop_down_field.id}]",
|
4
|
-
options_for_select([""] + choices, drop_down_field.response(@answer_sheet).to_s),
|
5
|
-
class: "form-control select " + drop_down_field.validation_class(@answer_sheet, @page) + " #{drop_down_field.css_class}",
|
6
|
-
id: dom_id(drop_down_field),
|
7
|
-
disabled: locked,
|
8
|
-
readonly: locked %>
|
@@ -1 +0,0 @@
|
|
1
|
-
<div class="p_content <%= paragraph.css_class %>"><%= raw paragraph.content(session[:locale]) %></div>
|