Merge pull request #580 from openSUSE/refactor_email_settings
Refactor Admin Email Settings Form
This commit is contained in:
commit
dc05cc83ac
2 changed files with 85 additions and 65 deletions
|
|
@ -3,6 +3,20 @@
|
|||
= semantic_form_for(@settings, :url => admin_conference_email_path(@conference.short_title, @conference.email_settings),:html => {:multipart => true}) do |f|
|
||||
.row
|
||||
.col-md-12
|
||||
%div{:role => "tabpanel"}
|
||||
/ Nav tabs
|
||||
%ul.nav.nav-tabs{:role => "tablist"}
|
||||
%li.active{:role => "presentation"}
|
||||
%a{"aria-controls" => "onboarding", "data-toggle" => "tab", :href => "#onboarding", :role => "tab"} Onboarding
|
||||
%li{:role => "presentation"}
|
||||
%a{"aria-controls" => "proposal", "data-toggle" => "tab", :href => "#proposal", :role => "tab"} Proposal
|
||||
%li{:role => "presentation"}
|
||||
%a{"aria-controls" => "notifications", "data-toggle" => "tab", :href => "#notifications", :role => "tab"} Update Notifications
|
||||
%li{:role => "presentation"}
|
||||
%a{"aria-controls" => "cfp", "data-toggle" => "tab", :href => "#cfp", :role => "tab"} Call for Papers
|
||||
/ Tab panes
|
||||
.tab-content
|
||||
#onboarding.tab-pane.active{:role => "tabpanel"}
|
||||
= f.input :send_on_registration, label: "Send an email when the user registers for the conference?", :input_html => {"data-name"=>"email_settings_registration_subject", "class"=>"send_on_radio"}
|
||||
= f.input :registration_subject
|
||||
= f.input :registration_email_template, :input_html => { :rows => 10, :cols => 20}
|
||||
|
|
@ -10,6 +24,7 @@
|
|||
"data-name"=>"email_settings_registration_email_template"} Load Template
|
||||
%a.btn.btn-link.control_label.template_help_link{"data-name"=>"registration_help"} Show Help
|
||||
= render partial: 'help', locals: {id: 'registration_help', show_event_variables: false}
|
||||
#proposal.tab-pane{:role => "tabpanel"}
|
||||
= f.input :send_on_accepted, label: "Send an email when the proposal is accepted?", :input_html => {"data-name"=>"email_settings_accepted_subject", "class"=>"send_on_radio"}
|
||||
= f.input :accepted_subject
|
||||
= f.input :accepted_email_template, :input_html => { :rows => 10, :cols => 20 }
|
||||
|
|
@ -31,6 +46,7 @@
|
|||
"data-name"=>"email_settings_confirmed_email_template"} Load Template
|
||||
%a.btn.btn-link.control_label.template_help_link{"data-name"=>"confirmed_help"} Show Help
|
||||
= render partial: 'help', locals: {id: 'confirmed_help', show_event_variables: true}
|
||||
#notifications.tab-pane{:role => "tabpanel"}
|
||||
= f.input :send_on_updated_conference_dates, label: "This is to notify all participants that the conference dates has been changed.", :input_html => {"data-name"=>"email_settings_updated_conference_dates_subject", "class"=>"send_on_radio"}
|
||||
= f.input :updated_conference_dates_subject
|
||||
= f.input :updated_conference_dates_template, :input_html => { :rows => 10, :cols => 20 }
|
||||
|
|
@ -52,6 +68,7 @@
|
|||
"data-name"=>"email_settings_venue_update_template"} Load Template
|
||||
%a.btn.btn-link.control_label.template_help_link{"data-name"=>"updated_venue_help"} Show Help
|
||||
= render partial: 'help', locals: {id: 'updated_venue_help', show_event_variables: false}
|
||||
#cfp.tab-pane{:role => "tabpanel"}
|
||||
= f.input :send_on_call_for_papers_schedule_public, hint: "This will notify all participants when the dates are updated or when the schedule is made public"
|
||||
= f.input :call_for_papers_schedule_public_subject, hint: "This subject will used whenever dates are updated or when the schedule is made public"
|
||||
= f.input :call_for_papers_schedule_public_template, :input_html => { :rows => 10, :cols => 20 }
|
||||
|
|
|
|||
|
|
@ -14,12 +14,12 @@ feature EmailSettings do
|
|||
sign_in organizer
|
||||
|
||||
visit admin_conference_emails_path(conference.short_title)
|
||||
|
||||
click_link 'Onboarding'
|
||||
fill_in 'email_settings_registration_subject',
|
||||
with: 'Registration subject'
|
||||
fill_in 'email_settings_registration_email_template',
|
||||
with: 'Registration email body'
|
||||
|
||||
click_link 'Proposal'
|
||||
fill_in 'email_settings_accepted_subject',
|
||||
with: 'Accepted subject'
|
||||
fill_in 'email_settings_accepted_email_template',
|
||||
|
|
@ -35,6 +35,7 @@ feature EmailSettings do
|
|||
fill_in 'email_settings_confirmed_email_template',
|
||||
with: 'Confirmed without registration email body'
|
||||
|
||||
click_link 'Update Notifications'
|
||||
fill_in 'email_settings_updated_conference_dates_subject',
|
||||
with: 'Updated conference dates subject'
|
||||
fill_in 'email_settings_updated_conference_dates_template',
|
||||
|
|
@ -59,6 +60,7 @@ feature EmailSettings do
|
|||
value).to eq('Registration subject')
|
||||
expect(find('#email_settings_registration_email_template').
|
||||
value).to eq('Registration email body')
|
||||
click_link 'Proposal'
|
||||
expect(find('#email_settings_accepted_subject').
|
||||
value).to eq('Accepted subject')
|
||||
expect(find('#email_settings_accepted_email_template').
|
||||
|
|
@ -71,6 +73,7 @@ feature EmailSettings do
|
|||
value).to eq('Confirmed without registration subject')
|
||||
expect(find('#email_settings_confirmed_email_template').
|
||||
value).to eq('Confirmed without registration email body')
|
||||
click_link 'Update Notifications'
|
||||
expect(find('#email_settings_updated_conference_dates_subject').
|
||||
value).to eq('Updated conference dates subject')
|
||||
expect(find('#email_settings_updated_conference_dates_template').
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue