File tree Expand file tree Collapse file tree 3 files changed +37
-7
lines changed
Expand file tree Collapse file tree 3 files changed +37
-7
lines changed Original file line number Diff line number Diff line change @@ -77,6 +77,22 @@ input[type="radio"] {
7777 align-items : center;
7878}
7979
80+ .survey-date {
81+ text-align : center;
82+ font-size : 2rem ;
83+ }
84+
85+ .survey-radio-group {
86+ padding : 0px 5rem ;
87+ display : flex;
88+ justify-content : space-between;
89+ align-items : center;
90+ }
91+
92+ .survey-radio-group label {
93+ display : none;
94+ }
95+
8096.question-selection-group {
8197 border : 0px var (--secondary-color ) solid;
8298 background-color : var (--fill-color-2 );
@@ -86,6 +102,12 @@ input[type="radio"] {
86102 box-shadow : 0px 4px 8px rgba (127 , 124 , 175 , 0.8 );
87103}
88104
105+ .question-selection-group label {
106+ font-size : 2rem ;
107+ margin-left : 1rem ;
108+ margin-right : 1rem ;
109+ }
110+
89111.under-radio {
90112 padding : 0px 3rem ;
91113 /*width: 100%;*/
@@ -98,15 +120,16 @@ input[type="radio"] {
98120 color : var (--fill-color-1 );
99121}
100122
101- .button_action {
123+ .button-action {
102124 display : flex;
103125 align-items : center;
104126 justify-content : center;
105127}
106128
107- .button_action button {
129+ .button-action input {
108130 font-size : 4rem ;
109131 padding : 1rem ;
132+ margin : 2rem ;
110133 border-radius : 1rem ;
111134}
112135
Original file line number Diff line number Diff line change @@ -18,7 +18,8 @@ def self.create_intake_survey_for_user(user)
1818 # TODO: Will need to decide once we get 'finalized' questions which ones we want to be on the intake survey
1919 # For now, I'm just gonna grab all of them
2020 Question . each do |question |
21- Answer . create! ( question_id : question . id , survey : survey )
21+ # Answer.create!(question_id: question.id, survey: survey)
22+ Answer . create! ( question_id : question . id , survey : survey , question_text : question . text )
2223 end
2324 end
2425end
Original file line number Diff line number Diff line change 11<%= render "survey_header" %>
22<%= form_with model: @survey do |f| %>
3- <%= "Survey Questions #{@survey.created_at.strftime("%b %d, %Y")}" %>
3+ <div class =" survey-date " > < %= "Survey Questions #{ @survey . created_at . strftime ( "%b %d, %Y" ) } " %> </ div >
44 <%= f . fields_for :answers do |answer_f | %>
55 < div class ="question-selection-group ">
66 <%= answer_f . hidden_field :id %>
77 <%= answer_f . label :answer , answer_f . object . question_text %>
88 < div class ="survey-radio-group ">
99 <%= answer_f . collection_radio_buttons :answer ,
1010 [
11- [ "Strongly Disagree" , 1 ] ,
11+ [ ' ' . html_safe , 1 ] ,
1212 [ ' ' . html_safe , 2 ] ,
1313 [ ' ' . html_safe , 3 ] ,
1414 [ ' ' . html_safe , 4 ] ,
15- [ "Strongly Agree" , 5 ]
15+ [ ' ' . html_safe , 5 ]
1616 ] ,
1717 :last ,
1818 :first
1919 %>
2020 </ div >
21+ < div class ="under-radio ">
22+ < div > Strongly Disagree</ div >
23+ < div > Strongly Agree</ div >
24+ </ div >
2125 </ div >
2226 <% end %>
23- <%= f . submit "Submit Survey" %>
27+ < div class ="button-action ">
28+ <%= f . submit "Submit Survey" %>
29+ </ div >
2430<% end %>
You can’t perform that action at this time.
0 commit comments