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,69 +3,86 @@
= 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
= 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"} %div{:role => "tabpanel"}
= f.input :registration_subject / Nav tabs
= f.input :registration_email_template, :input_html => { :rows => 10, :cols => 20} %ul.nav.nav-tabs{:role => "tablist"}
%a.btn.btn-link.control_label.load_template{"data-template"=>"Dear {name},\n\nThank you for Registering for the conference {conference}.\nPlease complete your registration by filling out your travel information.\n\nIf you are unable to attend please unregister online:\n{registrationlink}\n\nFeel free to contact us with any questions or concerns.\nWe look forward to see you there.\n\nBest wishes\n\n{conference} Team", %li.active{:role => "presentation"}
"data-name"=>"email_settings_registration_email_template"} Load Template %a{"aria-controls" => "home", "data-toggle" => "tab", :href => "#home", :role => "tab"} Onboarding
%a.btn.btn-link.control_label.template_help_link{"data-name"=>"registration_help"} Show Help %li{:role => "presentation"}
= render partial: 'help', locals: {id: 'registration_help', show_event_variables: false} %a{"aria-controls" => "profile", "data-toggle" => "tab", :href => "#profile", :role => "tab"} Proposal
= 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"} %li{:role => "presentation"}
= f.input :accepted_subject %a{"aria-controls" => "notifications", "data-toggle" => "tab", :href => "#notifications", :role => "tab"} Update Notifications
= f.input :accepted_email_template, :input_html => { :rows => 10, :cols => 20 } %li{:role => "presentation"}
%a.btn.btn-link.control_label.load_template{"data-template"=>"Dear {name}\n\nWe are very pleased to inform you that your submission {eventtitle} has been accepted for the conference {conference}.\n\nThe public page of your submission can be found at:\n{proposalslink}\nIf you haven´t already registered for {conference}, please do as soon as possible:\n{registrationlink}\n\nFeel free to contact us with any questions or concerns.\n\nWe look forward to seeing you there.\n\nBest wishes\n\n{conference} Team", %a{"aria-controls" => "settings", "data-toggle" => "tab", :href => "#settings", :role => "tab"} Call for Papers
"data-name"=>"email_settings_accepted_email_template"} Load Template / Tab panes
%a.btn.btn-link.control_label.template_help_link{"data-name"=>"accepted_help"} Show Help .tab-content
= render partial: 'help', locals: {id: 'accepted_help', show_event_variables: true} #home.tab-pane.active{:role => "tabpanel"}
= f.input :send_on_rejected, label: "Send an email when the proposal is rejected?", :input_html => {"data-name"=>"email_settings_rejected_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 :rejected_subject = f.input :registration_subject
= f.input :rejected_email_template, :input_html => { :rows => 10, :cols => 20 } = f.input :registration_email_template, :input_html => { :rows => 10, :cols => 20}
%a.btn.btn-link.control_label.load_template{"data-template"=>"Dear {name},\n\nThank you for your submission {eventtitle} for the conference {conference}.\nAfter careful consideration we are sorry to inform you that your submissionhas been rejected.\n\n\nBest wishes\n\n{conference} Team", %a.btn.btn-link.control_label.load_template{"data-template"=>"Dear {name},\n\nThank you for Registering for the conference {conference}.\nPlease complete your registration by filling out your travel information.\n\nIf you are unable to attend please unregister online:\n{registrationlink}\n\nFeel free to contact us with any questions or concerns.\nWe look forward to see you there.\n\nBest wishes\n\n{conference} Team",
"data-name"=>"email_settings_rejected_email_template"} Load Template "data-name"=>"email_settings_registration_email_template"} Load Template
%a.btn.btn-link.control_label.template_help_link{"data-name"=>"rejected_help"} Show Help %a.btn.btn-link.control_label.template_help_link{"data-name"=>"registration_help"} Show Help
= render partial: 'help', locals: {id: 'rejected_help', show_event_variables: true} = render partial: 'help', locals: {id: 'registration_help', show_event_variables: false}
= f.input :send_on_confirmed_without_registration, label: "Send an email when a user has a confirmed proposal, but isn't yet registered?", :input_html => {"data-name"=>"email_settings_confirmed_without_registration_subject", "class"=>"send_on_radio"} #profile.tab-pane{:role => "tabpanel"}
= f.input :confirmed_without_registration_subject = 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 :confirmed_email_template, :input_html => { :rows => 10, :cols => 20 } = f.input :accepted_subject
%a.btn.btn-link.control_label.load_template{"data-template"=>"Dear {name},\n\nThank you for the confirmation of {eventtitle}. Unfortunately you are not registered for the conference {conference}. Please register as soon as possible:\n{registrationlink}\n\nFeel free to contact us with any questions or concerns.\n\nWe look forward to seeing you there.\n\nBest wishes\n\n{conference} Team", = f.input :accepted_email_template, :input_html => { :rows => 10, :cols => 20 }
"data-name"=>"email_settings_confirmed_email_template"} Load Template %a.btn.btn-link.control_label.load_template{"data-template"=>"Dear {name}\n\nWe are very pleased to inform you that your submission {eventtitle} has been accepted for the conference {conference}.\n\nThe public page of your submission can be found at:\n{proposalslink}\nIf you haven´t already registered for {conference}, please do as soon as possible:\n{registrationlink}\n\nFeel free to contact us with any questions or concerns.\n\nWe look forward to seeing you there.\n\nBest wishes\n\n{conference} Team",
%a.btn.btn-link.control_label.template_help_link{"data-name"=>"confirmed_help"} Show Help "data-name"=>"email_settings_accepted_email_template"} Load Template
= render partial: 'help', locals: {id: 'confirmed_help', show_event_variables: true} %a.btn.btn-link.control_label.template_help_link{"data-name"=>"accepted_help"} Show Help
= 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"} = render partial: 'help', locals: {id: 'accepted_help', show_event_variables: true}
= f.input :updated_conference_dates_subject = f.input :send_on_rejected, label: "Send an email when the proposal is rejected?", :input_html => {"data-name"=>"email_settings_rejected_subject", "class"=>"send_on_radio"}
= f.input :updated_conference_dates_template, :input_html => { :rows => 10, :cols => 20 } = f.input :rejected_subject
%a.btn.btn-link.control_label.load_template{"data-template"=>"Dear {name},\n\nThe date of {conference} has changed.\n New Dates : {conference_start_date} - {conference_end_date}.\n\nFeel free to contact us with any questions or concerns.\n\nWe look forward to seeing you there.\n\nBest wishes\n\n{conference} Team", = f.input :rejected_email_template, :input_html => { :rows => 10, :cols => 20 }
"data-name"=>"email_settings_updated_conference_dates_template"} Load Template %a.btn.btn-link.control_label.load_template{"data-template"=>"Dear {name},\n\nThank you for your submission {eventtitle} for the conference {conference}.\nAfter careful consideration we are sorry to inform you that your submissionhas been rejected.\n\n\nBest wishes\n\n{conference} Team",
%a.btn.btn-link.control_label.template_help_link{"data-name"=>"updated_dates_help"} Show Help "data-name"=>"email_settings_rejected_email_template"} Load Template
= render partial: 'help', locals: {id: 'updated_dates_help', show_event_variables: false} %a.btn.btn-link.control_label.template_help_link{"data-name"=>"rejected_help"} Show Help
= f.input :send_on_updated_conference_registration_dates, label: "This is to notify all participants that the conference registration dates has been changed.", :input_html => {"data-name"=>"email_settings_updated_conference_registration_dates_subject", "class"=>"send_on_radio"} = render partial: 'help', locals: {id: 'rejected_help', show_event_variables: true}
= f.input :updated_conference_registration_dates_subject = f.input :send_on_confirmed_without_registration, label: "Send an email when a user has a confirmed proposal, but isn't yet registered?", :input_html => {"data-name"=>"email_settings_confirmed_without_registration_subject", "class"=>"send_on_radio"}
= f.input :updated_conference_registration_dates_template, :input_html => { :rows => 10, :cols => 20 } = f.input :confirmed_without_registration_subject
%a.btn.btn-link.control_label.load_template{"data-template"=>"Dear {name},\n\nThe registration date of {conference} has changed.\n New Dates : {registration_start_date} - {registration_end_date}.\n\nFeel free to contact us with any questions or concerns.\n\nWe look forward to seeing you there.\n\nBest wishes\n\n{conference} Team", = f.input :confirmed_email_template, :input_html => { :rows => 10, :cols => 20 }
"data-name"=>"email_settings_updated_conference_registration_dates_template"} Load Template %a.btn.btn-link.control_label.load_template{"data-template"=>"Dear {name},\n\nThank you for the confirmation of {eventtitle}. Unfortunately you are not registered for the conference {conference}. Please register as soon as possible:\n{registrationlink}\n\nFeel free to contact us with any questions or concerns.\n\nWe look forward to seeing you there.\n\nBest wishes\n\n{conference} Team",
%a.btn.btn-link.control_label.template_help_link{"data-name"=>"updated_registrations_dates_help"} Show Help "data-name"=>"email_settings_confirmed_email_template"} Load Template
= render partial: 'help', locals: {id: 'updated_registrations_dates_help', show_event_variables: false} %a.btn.btn-link.control_label.template_help_link{"data-name"=>"confirmed_help"} Show Help
= f.input :send_on_venue_update, label: 'Send an email on updating the Venue.', :input_html => {"data-name"=>"email_settings_venue_update_subject", "class"=>"send_on_radio"} = render partial: 'help', locals: {id: 'confirmed_help', show_event_variables: true}
= f.input :venue_update_subject #notifications.tab-pane{:role => "tabpanel"}
= f.input :venue_update_template, :input_html => { :rows => 10, :cols => 20 } = 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"}
%a.btn.btn-link.control_label.load_template{"data-template"=>"Dear {name},\n\nThe Conference venue of {conference} has changed. New location is: {venue}.\n Address: {venue_address}.\n\nFeel free to contact us with any questions or concerns.\n\nWe look forward to seeing you there.\n\nBest wishes\n\n{conference} Team", = f.input :updated_conference_dates_subject
"data-name"=>"email_settings_venue_update_template"} Load Template = f.input :updated_conference_dates_template, :input_html => { :rows => 10, :cols => 20 }
%a.btn.btn-link.control_label.template_help_link{"data-name"=>"updated_venue_help"} Show Help %a.btn.btn-link.control_label.load_template{"data-template"=>"Dear {name},\n\nThe date of {conference} has changed.\n New Dates : {conference_start_date} - {conference_end_date}.\n\nFeel free to contact us with any questions or concerns.\n\nWe look forward to seeing you there.\n\nBest wishes\n\n{conference} Team",
= render partial: 'help', locals: {id: 'updated_venue_help', show_event_variables: false} "data-name"=>"email_settings_updated_conference_dates_template"} Load Template
= 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" %a.btn.btn-link.control_label.template_help_link{"data-name"=>"updated_dates_help"} Show Help
= f.input :call_for_papers_schedule_public_subject, hint: "This subject will used whenever dates are updated or when the schedule is made public" = render partial: 'help', locals: {id: 'updated_dates_help', show_event_variables: false}
= f.input :call_for_papers_schedule_public_template, :input_html => { :rows => 10, :cols => 20 } = f.input :send_on_updated_conference_registration_dates, label: "This is to notify all participants that the conference registration dates has been changed.", :input_html => {"data-name"=>"email_settings_updated_conference_registration_dates_subject", "class"=>"send_on_radio"}
%a.btn.btn-link.control_label.load_template{"data-template"=>"Dear {name},\n\nThe Conference Call for Papers Details of {conference} has changed.The schedule is being made public.\n Link to Schedule {schedule_link} \n\nBest wishes\n\n{conference} Team", = f.input :updated_conference_registration_dates_subject
"data-name"=>"email_settings_call_for_papers_schedule_public_template"} Load Template = f.input :updated_conference_registration_dates_template, :input_html => { :rows => 10, :cols => 20 }
%a.btn.btn-link.control_label.template_help_link{"data-name"=>"updated_cfp_help"} Show Help %a.btn.btn-link.control_label.load_template{"data-template"=>"Dear {name},\n\nThe registration date of {conference} has changed.\n New Dates : {registration_start_date} - {registration_end_date}.\n\nFeel free to contact us with any questions or concerns.\n\nWe look forward to seeing you there.\n\nBest wishes\n\n{conference} Team",
= render partial: 'help', locals: {id: 'updated_cfp_help', show_event_variables: false} "data-name"=>"email_settings_updated_conference_registration_dates_template"} Load Template
= f.input :send_on_call_for_papers_dates_updates, hint: "This will notify all participants when the dates are updated or when the schedule is made public" %a.btn.btn-link.control_label.template_help_link{"data-name"=>"updated_registrations_dates_help"} Show Help
= f.input :call_for_papers_dates_updates_subject, hint: "This subject will used whenever dates are updated or when the schedule is made public" = render partial: 'help', locals: {id: 'updated_registrations_dates_help', show_event_variables: false}
= f.input :call_for_papers_dates_updates_template, :input_html => { :rows => 10, :cols => 20 } = f.input :send_on_venue_update, label: 'Send an email on updating the Venue.', :input_html => {"data-name"=>"email_settings_venue_update_subject", "class"=>"send_on_radio"}
%a.btn.btn-link.control_label.load_template{"data-template"=>"Dear {name},\n\nThe Conference Call for Papers Details of {conference} has changed.\nNew Dates : {cfp_start_date} - {cfp_end_date}.\n Link to Schedule {schedule_link} \n\nBest wishes\n\n{conference} Team", = f.input :venue_update_subject
"data-name"=>"email_settings_call_for_papers_dates_updates_template"} Load Template = f.input :venue_update_template, :input_html => { :rows => 10, :cols => 20 }
%a.btn.btn-link.control_label.template_help_link{"data-name"=>"updated_cfp_help"} Show Help %a.btn.btn-link.control_label.load_template{"data-template"=>"Dear {name},\n\nThe Conference venue of {conference} has changed. New location is: {venue}.\n Address: {venue_address}.\n\nFeel free to contact us with any questions or concerns.\n\nWe look forward to seeing you there.\n\nBest wishes\n\n{conference} Team",
= render partial: 'help', locals: {id: 'updated_cfp_help', show_event_variables: false} "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}
#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 :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 }
%a.btn.btn-link.control_label.load_template{"data-template"=>"Dear {name},\n\nThe Conference Call for Papers Details of {conference} has changed.The schedule is being made public.\n Link to Schedule {schedule_link} \n\nBest wishes\n\n{conference} Team",
"data-name"=>"email_settings_call_for_papers_schedule_public_template"} Load Template
%a.btn.btn-link.control_label.template_help_link{"data-name"=>"updated_cfp_help"} Show Help
= render partial: 'help', locals: {id: 'updated_cfp_help', show_event_variables: false}
= f.input :send_on_call_for_papers_dates_updates, hint: "This will notify all participants when the dates are updated or when the schedule is made public"
= f.input :call_for_papers_dates_updates_subject, hint: "This subject will used whenever dates are updated or when the schedule is made public"
= f.input :call_for_papers_dates_updates_template, :input_html => { :rows => 10, :cols => 20 }
%a.btn.btn-link.control_label.load_template{"data-template"=>"Dear {name},\n\nThe Conference Call for Papers Details of {conference} has changed.\nNew Dates : {cfp_start_date} - {cfp_end_date}.\n Link to Schedule {schedule_link} \n\nBest wishes\n\n{conference} Team",
"data-name"=>"email_settings_call_for_papers_dates_updates_template"} Load Template
%a.btn.btn-link.control_label.template_help_link{"data-name"=>"updated_cfp_help"} Show Help
= render partial: 'help', locals: {id: 'updated_cfp_help', show_event_variables: false}
.row .row
.col-md-12 .col-md-12
= f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"} = f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"}