This repository was archived by the owner on Jun 27, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 137
Expand file tree
/
Copy pathedit.html.slim
More file actions
135 lines (118 loc) · 6.31 KB
/
Copy pathedit.html.slim
File metadata and controls
135 lines (118 loc) · 6.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
- if params[:welcome]
h1 Welcome!
p Please <strong>check your email address</strong> and fill all required fields to complete signing up.
Not saving your profile may cause strange behaviour while using the app!
- else
nav.page
.back-nav
ul
li = icon('chevron-left')
li = link_to 'Back', @user, class: 'back'
nav.actions
ul.list-inline
li = link_to 'Cancel', @user, class: 'btn btn-default btn-sm'
li = link_to 'Delete Profile', @user, data: { confirm: 'This action cannot be undone. Are you sure?' }, method: :delete, class: 'btn btn-default btn-sm destroy'
h1.page-header Edit your profile
- unless @user.valid?
.has-error
.help-block
p Please fill out all required fields below to complete and verify your profile.
= simple_nested_form_for @user do |f|
- if @user.errors.any?
#error_explanation
h2 = "#{pluralize(@user.errors.count, "error")} prohibited this user from being saved:"
ul
- @user.errors.full_messages.each do |message|
li = message
= hidden_field_tag :welcome, params[:welcome]
= hidden_field_tag :redirect_to, params[:redirect_to]
= f.input :name, wrapper_html: { class: 'col-md-6' }
= f.input :email, required: true, wrapper_html: { class: 'col-md-6' }
- if current_user.unconfirmed_email
.help-block
p
' Check your email on
= current_user.unconfirmed_email
' to confirm your new email address. Until confirmed all messages will go to your current email address.
= f.input :github_handle, required: false, disabled: true, wrapper_html: { class: 'col-md-6' }
= f.input :twitter_handle, wrapper_html: { class: 'col-md-6' }
= f.input :irc_handle, wrapper_html: { class: 'col-md-6' }
= f.input :homepage, as: :url, wrapper_html: { class: 'col-md-6' }
= f.input :country, required: true, as: :country, label: "Country", prompt: "Select your country", wrapper_html: { class: 'col-md-6' }
= f.input :timezone, as: :select, collection: list_all_timezones, label: "Timezone", prompt: "Select your timezone", wrapper_html: { class: 'col-md-6' }
= f.input :location, required: true, wrapper_html: { class: 'col-md-6' }
div.clearfix
= f.input :hide_email, label: 'Never show my email address', hint: 'Only signed-in users will see your email address anyway. People will have trouble contacting you.'
= f.input :is_company, label: "I represent a company"
= f.input :company_name, label: 'Company name'
= f.input :company_info, label: 'Company info', hint: 'Where is the office, how much space can you provide, etc.'
= f.input :bio, label: 'About you', hint: 'You can use basic <a href="http://en.wikipedia.org/wiki/Markdown" target="_blank">Markdown</a> here.'.html_safe
h3.page-header Communication
.checkbox
label
= f.check_box :opted_in_newsletter
| Newsletter Opt In
p.help-block
| RGSoC Newsletter Opt In Invitation (this is still in progress, but we promise you that when we make a newsletter, it will be worth reading!)
.checkbox
label
= f.check_box :opted_in_announcements
| Announcements
p.help-block
| Important announcements and updates (that’s 5 emails per year: Opening of our Scholarship Applications, Opening of our Open Source Project Submissions, Crowdfunding Campaign Launch, Selected Teams Announcement and RGSoC Kick-off, RGSoC Wrap Up)
.checkbox
label
= f.check_box :opted_in_marketing_announcements
| Marketing Incentives
p.help-block
| Marketing and Communication initiatives (such as the #ThankfulForRGSoC stories and Alumna Interviews)
.checkbox
label
= f.check_box :opted_in_surveys
| Surveys
p.help-block
| Surveys to get feedback about the program and/or for marketing related purposes (i.e., “The number of scholars who are still working in tech and open source projects after RGSoC”)
.checkbox
label
= f.check_box :opted_in_sponsorships
| Sponsorship and Coaching Companies ONLY
p.help-block
| I just want to be notified about sponsorship and coaching companies opportunities related to RGSoC
.checkbox
label
= f.check_box :opted_in_applications_open
| Applications are Open Announcement ONLY
p.help-block
| Opening of our Scholarship Applications announcement
h3.page-header I am interested in:
= f.collection_check_boxes :interested_in, User::INTERESTS.to_a, :first, :last, item_wrapper_tag: 'div', item_wrapper_class: 'interested_in'
h3.page-header Technologies
= f.input :tech_expertise_list, placeholder: 'Programming Languages, Frameworks, Technologies, etc. I am experienced with', label: 'Technologies of expertise', hint: 'Separate with comma.'
= f.input :tech_interest_list, placeholder: 'Other Languages, Technologies, etc. I am interested in', label: 'Technologies of interest', hint: 'Separate with comma.'
h3.page-header Private information
p.help-block This information will only be visible to yourself and the organizers.
= f.input :tshirt_size, as: :select, collection: User::TSHIRT_SIZES.map { |k| [k, k] }, label: 'T-Shirt size', blank: false, required: false, hint: 'For sponsor T-Shirts, in case they send some.'
= f.input :tshirt_cut, as: :select, collection: User::TSHIRT_CUTS.map { |s| [s, s] }, label: 'T-Shirt cut', include_blank: true
h4 Shipping Address
= f.simple_fields_for :postal_address_attributes, @user.postal_address do |pa|
- if @user.postal_address
= pa.input :id, as: :hidden, input_html: { value: @user.postal_address.id }
= pa.check_box '_destroy'
| Remove Address
= pa.input :line1, required: false
= pa.input :line2, required: false
= pa.input :city, required: false
= pa.input :state, required: false
= pa.input :zip, required: false
= pa.input :country, prompt: "Select your country", required: false, include_blank: true
- if admin?
h3.page-header Roles
= f.simple_fields_for :roles do |r|
= r.input :team_id, as: :select, collection: teams, required: false
= r.input :name, as: :select, collection: Role::ROLES
= r.link_to_remove 'Remove', class: 'btn btn-default'
= f.link_to_add 'Add another role', :roles, class: 'btn btn-primary form-btn-group'
.actions
ul.list-inline
li = f.submit 'Save', class: 'btn btn-success'
li = link_to 'Cancel', @user, class: 'btn btn-default'