Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/views/contact_preferences/show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
%h1 Contact Preferences
- if @contact.present?
= simple_form_for @contact, url: :contact_preferences, method: :put do |f|
= f.input :token, as: :hidden
= f.input :mailing_list_consent, label: 'Sponsors mailing list'
= f.hidden_field :token, value: @contact.token
= f.input :mailing_list_consent, label: 'Sponsors mailing list', hint_html: { class: 'd-block ml-1' }
= f.button :button, 'Update', class: 'btn btn-primary'
12 changes: 5 additions & 7 deletions app/views/feedback/show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,20 @@
.row.justify-content-md-center
.col-md-8
= simple_form_for @feedback, url: submit_feedback_path(params[:id]), html: { method: 'patch' } do |f|
= f.hidden_field :token, :value => params[:id]
= f.hidden_field :rating
.row
.mb-4
= f.hidden_field :token, value: params[:id]
= f.hidden_field :rating
.mb-3
%label.required
%abbr(title='required') *
= t('feedback_form.rating')
.rating{:data => {:rating_max => 5 }}
.row
.col-lg-6.mb-4
.col-lg-6
= f.association :coach, collection: @coaches, label_method: :full_name, value_method: :id, label: t('feedback.coach')
.col-lg-6.mb-4
.col-lg-6
= f.association :tutorial, label_method: :title, value_method: :id, label: t('feedback_form.tutorial'), include_blank: t('feedback_form.select_tutorial')
= f.input :request, label: t('feedback_form.request'), input_html: { rows: 3 }
= f.input :suggestions, label: t('feedback_form.suggestions'), input_html: { rows: 3 }
.row
.text-right
= f.button :button, 'Submit feedback', class: 'btn btn-primary'

Expand Down
4 changes: 2 additions & 2 deletions app/views/invitation/_waiting_list.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
= simple_form_for @invitation, url: invitation_waiting_list_path(@invitation), method: :post do |f|
= f.input :tutorial, collection: @tutorial_titles, include_blank: true
= f.input :note, required: false, input_html: { rows: 3, maxlength: 100 }, hint: 'Anything else we should know?', placeholder: 'e.g. I need help understanding selectors'
= f.button :button, 'Join the waiting list', class: 'btn btn-primary w-100'
= f.button :button, 'Join the waiting list', class: 'btn btn-primary w-100 mb-0'
- else
= simple_form_for @invitation, url: invitation_waiting_list_path(@invitation), method: :post do |f|
= f.input :note, required: false, input_html: { rows: 3, maxlength: 100 }
= f.button :button, 'Join the waiting list', class: 'btn btn-primary w-100'
= f.button :button, 'Join the waiting list', class: 'btn btn-primary w-100 mb-0'
- else
%p Waiting List position: <strong>#{invitation.waiting_list_position}</strong>/#{@workshop.waiting_list_count_for(invitation.role)}
- if @invitation.for_student?
Expand Down
8 changes: 4 additions & 4 deletions app/views/invitation/show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@
= simple_form_for @invitation, url: :invitation, method: :put do |f|
= f.input :tutorial, collection: @tutorial_titles, include_blank: true
= f.input :note, required: false, input_html: { rows: 3, maxlength: 100 }, hint: 'Anything else we should know?', placeholder: 'e.g. I need help understanding selectors'
= f.button :button, 'Update', class: 'btn btn-primary w-100'
= f.button :button, 'Update', class: 'btn btn-primary w-100 mb-2'
- if @invitation.for_coach?
= link_to 'Keep your skills up-to-date!', edit_member_path
%span.d-block
%small= I18n.t('workshop_invitation.coach_skills_tooltip')
%hr
= simple_form_for @invitation, url: :invitation, method: :put do |f|
= f.input :note, required: false, input_html: { rows: 3, maxlength: 100 }
= f.button :button, 'Update note', class: 'btn btn-primary w-100'
= f.button :button, 'Update note', class: 'btn btn-primary w-100 mb-2'
- if @workshop.rsvp_available?
= link_to 'I can no longer attend', reject_invitation_url(@invitation), class: 'btn btn-danger w-100', role: 'button'
- else
Expand All @@ -87,15 +87,15 @@
%hr
= simple_form_for @invitation, url: :accept_invitation, method: :post do |f|
= f.input :note, required: false, input_html: { rows: 3, maxlength: 100 }
= f.button :button, 'Attend', class: 'btn btn-primary w-100'
= f.button :button, 'Attend', class: 'btn btn-primary w-100 mb-0'
- else
= render partial: 'invitation/waiting_list', locals: { invitation: @invitation }
- else
- if @workshop.student_spaces?
= simple_form_for @invitation, url: :accept_invitation, method: :post do |f|
= f.input :tutorial, collection: @tutorial_titles, include_blank: true
= f.input :note, required: false, input_html: { rows: 3, maxlength: 100 }, hint: 'Anything else we should know?', placeholder: 'e.g. I need help understanding selectors'
= f.button :button, 'Attend', class: 'btn btn-primary w-100'
= f.button :button, 'Attend', class: 'btn btn-primary w-100 mb-0'
- else
= render partial: 'invitation/waiting_list', locals: { invitation: @invitation }
.card-footer.bg-transparent
Expand Down
20 changes: 8 additions & 12 deletions app/views/member/details/edit.html.haml
Original file line number Diff line number Diff line change
@@ -1,25 +1,21 @@
.container-fluid
.row.justify-content-md-center.pt-4
.col-12.col-md-7
.container-fluid.pt-3
.row.justify-content-md-center
.col.col-md-8
%h1= t('member.details.edit.title')
%p= t('member.details.edit.summary')

= simple_form_for @member, url: member_details_path, method: :put do |f|
.row.justify-content-md-center
.col-12.col-md-7
.col.col-md-8
= f.input :name, required: true
= f.input :surname, required: true
= f.input :pronouns
= f.input :email, required: true

- if @member.coach?
= f.input :about_you, as: :text, label: t('member.details.edit.coach.about_you'), input_html: { rows: 3 }, required: true
- else
= f.input :about_you, as: :text, label: t('member.details.edit.student.about_you'), input_html: { rows: 3 }, required: true
%div
= f.input :newsletter, as: :boolean, checked_value: true, unchecked_value: false

.row.justify-content-md-center.mt-4.mb-4
.col-12.col-md-7.text-right
= hidden_field_tag :next_page, step2_member_path(member_type: @type)
= f.button :button, t('member.details.edit.submit'), class: 'btn btn-primary'
= f.input :newsletter, as: :boolean, checked_value: true, unchecked_value: false
.text-right
= hidden_field_tag :next_page, step2_member_path(member_type: @type)
= f.button :button, t('member.details.edit.submit'), class: 'btn btn-primary'
30 changes: 11 additions & 19 deletions app/views/member/jobs/_form.html.haml
Original file line number Diff line number Diff line change
@@ -1,32 +1,24 @@
%fieldset.mt-0
%legend.mb-3 Job post details
.mb-3
= f.input :title, required: true
.mb-3
= f.input :description, input_html: { rows: 10 }, required: true
.mb-3
= f.input :salary, required: true
.mb-3
= f.input :remote, wrapper: :checkbox
.mb-3
= f.input :email
.mb-3
= f.input :link_to_job, required: true
= f.input :title, required: true
= f.input :description, input_html: { rows: 10 }, required: true
= f.input :salary, required: true
= f.input :remote
= f.input :email
= f.input :link_to_job, required: true
= f.input :expiry_date, as: :string, required: true, input_html: { data: { value: @job.expiry_date.try(:strftime, '%d/%m/%Y') } }

%fieldset
%legend.mb-3 Company details
.mb-3
= f.input :company, required: true
.mb-3
= f.input :company_website, required: true
= f.input :company, required: true
= f.input :company_website, required: true
= f.input :location, required: true

%fieldset
%p
%small= t('member.jobs.new.optional_details_message')
.mb-3
= f.input :company_address
= f.input :company_address
= f.input :company_postcode

= f.button :button, 'Submit job for approval', class: "btn btn-primary"
.text-right
= f.button :button, 'Submit job for approval', class: 'btn btn-primary'
8 changes: 4 additions & 4 deletions app/views/members/_coach_invite_subscriptions.html.haml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.row.justify-content-md-center.subscriptions
.col-12.col-md-7
.col.col-md-8
%h2.h4.toggle
As a Coach
- if collapsed
Expand All @@ -11,12 +11,12 @@
- groups.each do |group|
- if belongs_to_group?(group)
= simple_form_for :subscription, url: :destroy_subscriptions, method: :delete do |f|
= f.input :subscription_id, as: :hidden, input_html: { value: nil }
= f.input :group_id, as: :hidden, input_html: { value: group.id }
= f.hidden_field :subscription_id, value: nil
= f.hidden_field :group_id, value: group.id
= button_tag type: :submit, class: 'btn btn-success w-100' do
%i.fas.fa-check
= group.chapter.name
- else
= simple_form_for :subscription, url: :subscriptions do |f|
= f.input :group_id, as: :hidden, input_html: { value: group.id }
= f.hidden_field :group_id, value: group.id
= f.button :button, group.chapter.name, class: 'btn btn-secondary w-100'
29 changes: 0 additions & 29 deletions app/views/members/_form.html.haml

This file was deleted.

2 changes: 0 additions & 2 deletions app/views/members/_new.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,5 @@
- if @member.coach?
.col-12
= f.input :skill_list, label: 'Skills, enter as a comma separated list', input_html: { value: @member.skill_list.join(", ") }

.row
.col-12.text-right
= f.button :button, submit_text, class: 'btn btn-primary'
8 changes: 4 additions & 4 deletions app/views/members/_student_invite_subscriptions.html.haml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.row.justify-content-md-center.subscriptions
.col-12.col-md-7
.col.col-md-8
%h2.h4.toggle
As a Student
- if collapsed
Expand All @@ -11,12 +11,12 @@
- groups.each do |group|
- if belongs_to_group?(group)
= simple_form_for :subscription, url: :destroy_subscriptions, method: :delete do |f|
= f.input :subscription_id, as: :hidden, input_html: { value: nil }
= f.input :group_id, as: :hidden, input_html: { value: group.id }
= f.hidden_field :subscription_id, value: nil
= f.hidden_field :group_id, value: group.id
= button_tag type: :submit, class: 'btn btn-success w-100' do
%i.fas.fa-check
= group.chapter.name
- else
= simple_form_for :subscription, url: :subscriptions do |f|
= f.input :group_id, as: :hidden, input_html: { value: group.id }
= f.hidden_field :group_id, value: group.id
= f.button :button, group.chapter.name, class: 'btn btn-secondary w-100'
8 changes: 4 additions & 4 deletions app/views/members/step2.html.haml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.container-fluid
.row.justify-content-md-center.pt-4
.col-12.col-md-7
.container-fluid.pt-3
.row.justify-content-md-center
.col.col-md-8
%h1 Subscribe
%p To receive invitations to our events you must subscribe to the appropriate chapters. Alternatively, you can always RSVP directly from the website. Just be aware that spots to some of our busier chapters fill up fast.

Expand All @@ -13,5 +13,5 @@
= render partial: 'coach_invite_subscriptions', locals: {groups: @coach_groups, collapsed: false}

.row.justify-content-md-center.mb-4
.col-12.col-md-7.text-right
.col.col-md-8.text-right
= link_to 'Done', profile_path, class: 'btn btn-primary', role: 'button'
4 changes: 2 additions & 2 deletions app/views/payments/new.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
%p.lead By submitting a job to the codebar #{link_to 'job board', jobs_path} you are helping promote diversity in the tech industry so that more women, non-binary, LGBTQA and other minority groups will be able to get started with their tech career.
.col-md-6
= simple_form_for :payment, url: payments_path, method: :post do |f|
= f.input :name, placeholder: 'Name', required: false, html: { id: 'name' }
= f.input :amount, placeholder: '50.00', required: true, id: 'amount'
= f.input :name, placeholder: 'Name', required: false
= f.input :amount, placeholder: '50.00', required: true
= f.button :button, 'Confirm', class: 'btn btn-primary', id: 'donate'
.message

6 changes: 3 additions & 3 deletions app/views/subscriptions/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@
.col.col-md-4.col-lg-3
- if belongs_to_group?(group)
= simple_form_for :subscription, method: :delete, html: { class: 'w-100' } do |f|
= f.input :subscription_id, as: :hidden, input_html: { value: nil }
= f.input :group_id, as: :hidden, input_html: { value: group.id }
= f.hidden_field :subscription_id, value: nil
= f.hidden_field :group_id, value: group.id
= f.button :button, 'Subscribed', class: 'btn btn-success btn-lg w-100', id: "#{chapter.name.downcase}-#{group.name.downcase}"
- else
= simple_form_for :subscription, html: { class: 'w-100' } do |f|
= f.input :group_id, as: :hidden, input_html: { value: group.id }
= f.hidden_field :group_id, value: group.id
= f.button :button, 'Subscribe', class: 'btn btn-primary btn-lg w-100', id: "#{chapter.name.downcase}-#{group.name.downcase}"
7 changes: 2 additions & 5 deletions app/views/terms_and_conditions/show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,5 @@
= simple_form_for @terms_and_conditions_form, url: terms_and_conditions_path, method: :patch do |f|
.row.justify-content-md-center
.col.col-md-8
= f.check_box :terms
= f.label :terms
.row.justify-content-md-center
.col.col-md-8
= f.button :button, t('terms_and_conditions.accept'), class: 'btn btn-primary'
= f.input :terms, as: :boolean
= f.button :button, t('terms_and_conditions.accept'), class: 'btn btn-primary mb-0'
Loading