Refactor Admin Email Settings Form

This commit is contained in:
Gopesh Tulsyan 2015-01-15 11:09:08 +05:30
parent bca62e6204
commit fc450b98ae

View file

@ -3,6 +3,20 @@
= semantic_form_for(@settings, :url => admin_conference_email_path(@conference.short_title, @conference.email_settings),:html => {:multipart => true}) do |f| = semantic_form_for(@settings, :url => admin_conference_email_path(@conference.short_title, @conference.email_settings),:html => {:multipart => true}) do |f|
.row .row
.col-md-12 .col-md-12
%div{:role => "tabpanel"}
/ Nav tabs
%ul.nav.nav-tabs{:role => "tablist"}
%li.active{:role => "presentation"}
%a{"aria-controls" => "home", "data-toggle" => "tab", :href => "#home", :role => "tab"} Onboarding
%li{:role => "presentation"}
%a{"aria-controls" => "profile", "data-toggle" => "tab", :href => "#profile", :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" => "settings", "data-toggle" => "tab", :href => "#settings", :role => "tab"} Call for Papers
/ Tab panes
.tab-content
#home.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 :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_subject
= f.input :registration_email_template, :input_html => { :rows => 10, :cols => 20} = f.input :registration_email_template, :input_html => { :rows => 10, :cols => 20}
@ -10,6 +24,7 @@
"data-name"=>"email_settings_registration_email_template"} Load Template "data-name"=>"email_settings_registration_email_template"} Load Template
%a.btn.btn-link.control_label.template_help_link{"data-name"=>"registration_help"} Show Help %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} = render partial: 'help', locals: {id: 'registration_help', show_event_variables: false}
#profile.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 :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_subject
= f.input :accepted_email_template, :input_html => { :rows => 10, :cols => 20 } = f.input :accepted_email_template, :input_html => { :rows => 10, :cols => 20 }
@ -31,6 +46,7 @@
"data-name"=>"email_settings_confirmed_email_template"} Load Template "data-name"=>"email_settings_confirmed_email_template"} Load Template
%a.btn.btn-link.control_label.template_help_link{"data-name"=>"confirmed_help"} Show Help %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} = 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 :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_subject
= f.input :updated_conference_dates_template, :input_html => { :rows => 10, :cols => 20 } = 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 "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 %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} = render partial: 'help', locals: {id: 'updated_venue_help', show_event_variables: false}
#settings.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 :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_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 } = f.input :call_for_papers_schedule_public_template, :input_html => { :rows => 10, :cols => 20 }