Skip to content

Commit b59f08e

Browse files
authored
CORE-1383: Store self-reported school from signup and display it in profile (#1674)
[CORE-1383]
1 parent 2d3b67a commit b59f08e

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

app/handlers/newflow/student_signup/signup_form.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ class SignupForm
1111
attribute :first_name, type: String
1212
attribute :last_name, type: String
1313
attribute :email, type: String
14+
attribute :school, type: String
1415
attribute :password, type: String
1516
attribute :is_title_1_school, type: boolean
1617
attribute :newsletter, type: boolean
@@ -84,6 +85,7 @@ def create_user
8485
role: :student,
8586
first_name: signup_params.first_name,
8687
last_name: signup_params.last_name,
88+
self_reported_school: signup_params.school,
8789
phone_number: signup_params.phone_number,
8890
receive_newsletter: signup_params.newsletter,
8991
source_application: options[:client_app],

app/views/newflow/base/profile_newflow.html.erb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,16 @@
164164
</div>
165165
<% end %>
166166

167+
<% if current_user.self_reported_school.present? %>
168+
<div class="row">
169+
<div class="col-sm-2 category">
170+
<%= I18n.t(:"legacy.users.edit.self_reported_school") %>
171+
</div>
172+
<div class="col-sm-10 info">
173+
<%= current_user.self_reported_school %>
174+
</div>
175+
</div>
176+
<% end %>
167177

168178
<div class="row">
169179
<div class="col-sm-2 category">

config/locales/en.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -564,6 +564,7 @@ en:
564564
unconfirmed_warning: unconfirmed
565565
password: Password
566566
searchable: Let other users find me by this email.
567+
self_reported_school: Self-reported school
567568

568569
signup:
569570
# In fields `first_name`, `last_name`, `email_address` and `username`

0 commit comments

Comments
 (0)