Change agree field layout.

This commit is contained in:
BoHung Chiu 2021-12-27 11:07:15 +08:00
parent aa179d57eb
commit 2a4270d1a7
3 changed files with 9 additions and 1 deletions

View File

@ -94,7 +94,13 @@
<% if @survey.enable_consent_feature %>
<li class="survey_consent_contents question-item ">
<span class="required-star">(*)</span>
<label for="survey_consent_used" class="o-question-title"><%= f.check_box :consent_used , {:id=>"survey_consent_used", :title=>t('survey.agree'), :required=>"required"} %><span style="margin-left: 0.2em;"><%= @survey.consent_contents.to_s.html_safe %></span></label>
<% consent_contents = @survey.consent_contents.to_s %>
<% consent_contents = t("survey.consent_to_be_used_for_research") if consent_contents.blank? %>
<label for="survey_consent_used" class="o-question-title"><span style="margin-left: 0.2em;"><%= consent_contents.html_safe %></span></label>
<%= content_tag :ul, :class => "o-question-group view-list" do %>
<li><label for="survey_consent_used_agree"><%= f.radio_button :consent_used , "1", {:id=>"survey_consent_used_agree", :title=>t('survey.agree'), :required=>"required"} %><span style="margin-left: 12px;"><%=t('survey.agree')%></span></label></li>
<li><label for="survey_consent_used_disagree"><%= f.radio_button :consent_used , "0", {:id=>"survey_consent_used_disagree", :title=>t('survey.disagree'), :required=>"required"} %><span style="margin-left: 12px;"><%=t('survey.disagree')%></span></label></li>
<% end %>
</li>
<% end %>
<% @questions.each_with_index do |question, i| %>

View File

@ -7,6 +7,7 @@ en:
'false': 'No'
consent_to_be_used_for_research: "Consent answer to be used for research"
agree: Agree
disagree: Disagree
consent_contents: '"Consent" contents'
enable_consent_feature: 'Enable "Consent" feature'
result_score: Result score

View File

@ -9,6 +9,7 @@ zh_tw:
'false': 未勾選
consent_to_be_used_for_research: "同意填答結果被用於研究"
agree: 同意
disagree: 不同意
consent_contents: '"同意書"內容'
enable_consent_feature: '開啟"同意書"功能'
result_score: 結果分數