Commit 6dfcbe3d authored by Kaspar Vollenweider's avatar Kaspar Vollenweider

Merge branch 'develop' into 'master'

Deploy 2019-03-19

See merge request !942
parents 730d905c d0add18a
Pipeline #40225 passed with stage
in 37 minutes and 34 seconds
...@@ -69,3 +69,7 @@ fieldset { ...@@ -69,3 +69,7 @@ fieldset {
.checkbox + .checkbox-line { .checkbox + .checkbox-line {
margin-top: 0; margin-top: 0;
} }
textarea.double-height {
min-height: 100px;
}
...@@ -35,7 +35,7 @@ class ReminderMailingsController < ApplicationController ...@@ -35,7 +35,7 @@ class ReminderMailingsController < ApplicationController
else else
redirect_to new_email_template_path, redirect_to new_email_template_path,
notice: 'Sie müssen eine aktive E-Mailvorlage haben, notice: 'Sie müssen eine aktive E-Mailvorlage haben,
bevor Sie eine Beendigungs E-Mail erstellen können.' bevor Sie eine Abschlussevaluations E-Mail erstellen können.'
end end
authorize @reminder_mailing authorize @reminder_mailing
end end
......
...@@ -53,10 +53,10 @@ module ApplicationHelper ...@@ -53,10 +53,10 @@ module ApplicationHelper
}, class: html_class } }, class: html_class }
end end
def checkbox_toggle_collapse(f, field, collapse_selector, check_shows: true, label_html: nil, type: :boolean, disabled: false) def checkbox_toggle_collapse(f, field, collapse_selector, check_shows: true, label_html: nil, type: :boolean, disabled: false, tabindex: nil)
input_html = { data: { collapse: collapse_selector, check_shows: check_shows }, input_html = { data: { collapse: collapse_selector, check_shows: check_shows },
class: 'checkbox-toggle-collapse', class: 'checkbox-toggle-collapse', disabled: disabled }
disabled: disabled } input_html.merge(tabindex: tabindex) if tabindex
f.input(field, type: type, input_html: input_html, label_html: label_html) f.input(field, type: type, input_html: input_html, label_html: label_html)
end end
......
...@@ -31,10 +31,10 @@ class EmailTemplate < ApplicationRecord ...@@ -31,10 +31,10 @@ class EmailTemplate < ApplicationRecord
{ {
signup: [], signup: [],
assignment: [:Anrede, :Name, :EinsatzTitel, :FeedbackLink], assignment: [:Anrede, :Name, :EinsatzTitel, :FeedbackLink],
trial: ReminderMailing::TEMPLATE_VARNAMES, trial: ReminderMailing.template_varnames(:trial_period).values,
termination: ReminderMailing::TEMPLATE_VARNAMES, termination: ReminderMailing.template_varnames(:termination).values,
half_year_process_email: SemesterProcessMail.template_varnames[:mail], half_year_process_email: ReminderMailing.template_varnames(:half_year_process_email).values,
half_year_process_overdue: SemesterProcessMail.template_varnames[:reminder] half_year_process_overdue: ReminderMailing.template_varnames(:half_year_process_overdue).values
} }
end end
......
...@@ -16,7 +16,8 @@ class LanguageSkill < ApplicationRecord ...@@ -16,7 +16,8 @@ class LanguageSkill < ApplicationRecord
} }
def self.languages def self.languages
@languages ||= I18n.t('language_names').map { |key, lang| [lang, key.to_s] }.sort @languages ||= I18n.t('language_names').merge(I18n.t('language_names_customizations'))
.map { |key, lang| [lang, key.to_s] }.sort
end end
......
class ReminderMailing < ApplicationRecord class ReminderMailing < ApplicationRecord
before_update :remove_untoggled_volunteers # Key is method name, value is users variable %{FeedbackLink}
TEMPLATE_VARNAMES_GENERAL = {
TEMPLATE_VARNAMES = [ anrede: :Anrede,
:Anrede, name: :Name,
:Name, einsatz: :Einsatz,
:Einsatz, email_absender: :EmailAbsender,
:EinsatzStart, online_plattform_url: :OnlinePlattformUrl
:FeedbackLink, }.freeze
:EmailAbsender,
:OnlinePlattformUrl # method var_name pairs per reminder_mailing kind
].freeze TEMPLATE_VARNAMES = {
trial_period: {
einsatz_start: :EinsatzStart,
feedback_link_trial: :FeedbackLink
}.merge(TEMPLATE_VARNAMES_GENERAL),
termination: {
einsatz_start: :EinsatzStart,
feedback_link_termination: :FeedbackLink
}.merge(TEMPLATE_VARNAMES_GENERAL),
half_year_process_email: {
feedback_link_semester: :FeedbackLink
}.merge(TEMPLATE_VARNAMES_GENERAL),
half_year_process_overdue: {
feedback_link_semester: :FeedbackLink
}.merge(TEMPLATE_VARNAMES_GENERAL)
}.freeze
belongs_to :creator, -> { with_deleted }, class_name: 'User', inverse_of: 'reminder_mailings' belongs_to :creator, -> { with_deleted }, class_name: 'User', inverse_of: 'reminder_mailings'
...@@ -26,7 +41,8 @@ class ReminderMailing < ApplicationRecord ...@@ -26,7 +41,8 @@ class ReminderMailing < ApplicationRecord
source_type: 'GroupAssignment' source_type: 'GroupAssignment'
has_many :process_submitters, through: :reminder_mailing_volunteers, source: :process_submitted_by has_many :process_submitters, through: :reminder_mailing_volunteers, source: :process_submitted_by
enum kind: { trial_period: 1, termination: 2, half_year_process_email: 3, half_year_process_overdue: 4 } enum kind: { trial_period: 1, termination: 2, half_year_process_email: 3, half_year_process_overdue: 4 }
ransacker :kind, formatter: ->(value) { kinds[value] } ransacker :kind, formatter: ->(value) { kinds[value] }
validates :subject, presence: true validates :subject, presence: true
...@@ -35,6 +51,16 @@ class ReminderMailing < ApplicationRecord ...@@ -35,6 +51,16 @@ class ReminderMailing < ApplicationRecord
validate :no_reminder_volunteer_present, unless: :reminder_volunteer_mailings_any? validate :no_reminder_volunteer_present, unless: :reminder_volunteer_mailings_any?
validate :mailing_not_to_change_after_sent validate :mailing_not_to_change_after_sent
before_update :remove_untoggled_volunteers
def self.template_varnames(kind_requested)
TEMPLATE_VARNAMES[kind_requested.to_sym]
end
def template_varnames
TEMPLATE_VARNAMES[kind.to_sym]
end
# setter generates relation to assignment/group_assignment and volunteer in one go # setter generates relation to assignment/group_assignment and volunteer in one go
def reminder_mailing_volunteers=(reminder_mailable) def reminder_mailing_volunteers=(reminder_mailable)
if [Assignment, GroupAssignment].include? reminder_mailable.first&.class if [Assignment, GroupAssignment].include? reminder_mailable.first&.class
......
...@@ -71,6 +71,20 @@ class ReminderMailingVolunteer < ApplicationRecord ...@@ -71,6 +71,20 @@ class ReminderMailingVolunteer < ApplicationRecord
template % template_variables template % template_variables
end end
def template_variables
template_variables = reminder_mailing.template_varnames.map do |method_name, var_name|
[var_name, send(method_name)]
end.to_h
template_variables.default = ''
template_variables
end
## template variable converters
#
# there needs to be a method with the name matching each value
# from ReminderMailing::TEMPLATE_VARNAMES
# Otherwise there will be a method missing error if that template variable is used
def anrede def anrede
I18n.t("salutation.#{volunteer.salutation}") I18n.t("salutation.#{volunteer.salutation}")
end end
...@@ -95,30 +109,30 @@ class ReminderMailingVolunteer < ApplicationRecord ...@@ -95,30 +109,30 @@ class ReminderMailingVolunteer < ApplicationRecord
end end
end end
def template_variables
template_variables = ReminderMailing::TEMPLATE_VARNAMES.map do |varname|
[varname, send(varname.to_s.underscore)]
end.to_h
template_variables.default = ''
template_variables
end
def email_absender def email_absender
"[#{reminder_mailing_creator_name}](mailto:"\ "[#{reminder_mailing_creator_name}](mailto:"\
"#{reminder_mailing.creator.email})" "#{reminder_mailing.creator.email})"
end end
def reminder_mailing_creator_name def feedback_link_trial
reminder_mailing.creator.profile&.contact&.natural_name || "[Probezeit-Feedback erstellen](#{feedback_url})"
reminder_mailing.creator.email end
def feedback_link_termination
"[Abschlussevaluations-Feedback erstellen](#{feedback_url})"
end end
def feedback_link def feedback_link_semester
"[Halbjahres-Rapport erstellen](#{feedback_url})" "[Halbjahres-Feedback erstellen](#{feedback_url})"
end end
def online_plattform_url def online_plattform_url
"[Online-Plattform Url](#{Rails.application.routes.url_helpers.root_path})" "[Online-Plattform Url](#{Rails.application.routes.url_helpers.root_path})"
end end
# template variable assisting methods
def reminder_mailing_creator_name
reminder_mailing.creator.profile&.contact&.natural_name ||
reminder_mailing.creator.email
end
end end
...@@ -12,42 +12,60 @@ class SemesterProcessMail < ApplicationRecord ...@@ -12,42 +12,60 @@ class SemesterProcessMail < ApplicationRecord
delegate :volunteer, to: :semester_process_volunteer delegate :volunteer, to: :semester_process_volunteer
delegate :semester_process, to: :semester_process_volunteer delegate :semester_process, to: :semester_process_volunteer
# Key is method name, value is users variable %{FeedbackLink}
TEMPLATE_VARNAMES_GENERAL = {
anrede: :Anrede,
name: :Name,
feedback_link: :FeedbackLink,
email_absender: :EmailAbsender,
online_plattform_url: :OnlinePlattformUrl,
semester_from_to_date: :SemesterAnfangUndEndDatum
}.freeze
TEMPLATE_VARNAMES = {
mail: TEMPLATE_VARNAMES_GENERAL,
reminder: TEMPLATE_VARNAMES_GENERAL
}.freeze
def self.template_varnames(kind = :mail)
TEMPLATE_VARNAMES[kind]
end
TEMPLATE_VARNAMES = [ def template_varnames
:Anrede, TEMPLATE_VARNAMES[kind.to_sym]
:Name,
:Einsatz,
:FeedbackLink,
:EmailAbsender,
:OnlinePlattformUrl
].freeze
def self.template_varnames
{
mail: TEMPLATE_VARNAMES,
reminder: TEMPLATE_VARNAMES
}
end end
def process_template def process_template
{ {
subject: replace_ruby_template(self.subject), subject: replace_ruby_template(subject),
body: replace_ruby_template(self.body) body: replace_ruby_template(body)
} }
end end
private
def send_email
VolunteerMailer.half_year_process_email(self).deliver
update!(sent_at: Time.zone.now)
end
def replace_ruby_template(template) def replace_ruby_template(template)
template % template_variables template % template_variables
end end
def template_variables def template_variables
template_variables = SemesterProcessMail::template_varnames[self.kind.to_sym].map do |varname| template_variables = template_varnames.map do |method_name, var_name|
[varname, send(varname.to_s.underscore)] [var_name, send(method_name)]
end.to_h end.to_h
template_variables.default = '' template_variables.default = ''
template_variables template_variables
end end
## template variable converters
#
# there needs to be a method with the name matching each value
# from SemesterProcessMail::TEMPLATE_VARNAMES
# Otherwise there will be a method missing error if that template variable is used
def anrede def anrede
I18n.t("salutation.#{volunteer.salutation}") I18n.t("salutation.#{volunteer.salutation}")
end end
...@@ -56,10 +74,6 @@ class SemesterProcessMail < ApplicationRecord ...@@ -56,10 +74,6 @@ class SemesterProcessMail < ApplicationRecord
volunteer.contact.natural_name volunteer.contact.natural_name
end end
def einsatz
''
end
def email_absender def email_absender
"[#{reminder_mailing_creator_name}](mailto:"\ "[#{reminder_mailing_creator_name}](mailto:"\
"#{semester_process.creator.email})" "#{semester_process.creator.email})"
...@@ -67,14 +81,14 @@ class SemesterProcessMail < ApplicationRecord ...@@ -67,14 +81,14 @@ class SemesterProcessMail < ApplicationRecord
def reminder_mailing_creator_name def reminder_mailing_creator_name
semester_process.creator.profile&.contact&.natural_name || semester_process.creator.profile&.contact&.natural_name ||
semester_process.creator.email semester_process.creator.email
end end
def feedback_link def feedback_link
"[Halbjahres-Rapport erstellen](#{feedback_url})" "[Halbjahres-Rapport erstellen](#{feedback_url})"
end end
def feedback_url(options = {}) def feedback_url
Rails.application.routes.url_helpers.review_semester_review_semester_url( Rails.application.routes.url_helpers.review_semester_review_semester_url(
semester_process_volunteer, semester_process_volunteer,
ActionMailer::Base.default_url_options ActionMailer::Base.default_url_options
...@@ -85,10 +99,8 @@ class SemesterProcessMail < ApplicationRecord ...@@ -85,10 +99,8 @@ class SemesterProcessMail < ApplicationRecord
"[Online-Plattform Url](#{Rails.application.routes.url_helpers.root_path})" "[Online-Plattform Url](#{Rails.application.routes.url_helpers.root_path})"
end end
private def semester_from_to_date
semester = semester_process_volunteer.semester
def send_email "#{I18n.l(semester.first)} bis #{I18n.l(semester.last)}}"
VolunteerMailer.half_year_process_email(self).deliver
self.update(sent_at: Time.zone.now)
end end
end end
...@@ -52,13 +52,13 @@ hr ...@@ -52,13 +52,13 @@ hr
td= @assignment.hours.last&.hours || 0.0 td= @assignment.hours.last&.hours || 0.0
- else - else
h2.m-t-20 Beendigung Abschliessen h2.m-t-20 Abschlussevaluation Abschliessen
= simple_form_for(@assignment, url: update_terminated_at_assignment_path, method: :put) do |f| = simple_form_for(@assignment, url: update_terminated_at_assignment_path, method: :put) do |f|
.row .row
.col-xs-12.col-md-6 .col-xs-12.col-md-6
fieldset fieldset
legend Rückmeldungen zur Beendigung des Einsatzes legend Rückmeldungen zur Abschlussevaluation des Einsatzes
= f.input :term_feedback_activities = f.input :term_feedback_activities
= f.input :term_feedback_success = f.input :term_feedback_success
= f.input :term_feedback_problems = f.input :term_feedback_problems
......
...@@ -11,23 +11,23 @@ ...@@ -11,23 +11,23 @@
.col-xs-12.col-md-6 .col-xs-12.col-md-6
fieldset fieldset
legend= t_attr(:personal_particulars, Contact) legend= t_attr(:personal_particulars, Contact)
= f.input :salutation, as: :select, collection: Client::SALUTATIONS, include_blank: true = f.input :salutation, as: :select, collection: Client::SALUTATIONS, include_blank: true, input_html: { tabindex: 1 }
= f.simple_fields_for :contact do |c| = f.simple_fields_for :contact do |c|
.row .row
.col-xs-12.col-md-6 .col-xs-12.col-md-6
= c.input :first_name, required: true = c.input :first_name, required: true, input_html: { tabindex: 2 }
= f.input :birth_year, as: :select, collection: Client.year_collection, = f.input :birth_year, as: :select, collection: Client.year_collection,
include_blank: true include_blank: true, input_html: { tabindex: 4 }
= f.input :entry_date = f.input :entry_date, input_html: { tabindex: 6 }
.col-xs-12.col-md-6 .col-xs-12.col-md-6
= c.input :last_name, required: true, label: t_attr(:last_name) = c.input :last_name, required: true, label: t_attr(:last_name), input_html: { tabindex: 3 }
= f.input :nationality, as: :country = f.input :nationality, as: :country, input_html: { tabindex: 5 }
= f.input :permit, collection: Client::PERMITS, as: :radio_buttons = f.input :permit, collection: Client::PERMITS, as: :radio_buttons, input_html: { tabindex: 7 }
= f.simple_fields_for :contact do |c| = f.simple_fields_for :contact do |c|
.col-xs-12.col-md-6 .col-xs-12.col-md-6
= render 'contacts/address_fields', f: c = render 'contacts/address_fields', f: c, tabindex_start: 7
= render 'contacts/phone_fields', f: c = render 'contacts/phone_fields', f: c, tabindex_start: 10
fieldset fieldset
legend Sprachkenntnisse legend Sprachkenntnisse
...@@ -67,9 +67,8 @@ fieldset ...@@ -67,9 +67,8 @@ fieldset
= f.input :other_request = f.input :other_request
fieldset fieldset
legend Wann sind Sie verfügbar? legend Verfügbarkeit?
= render 'availability/form', f: f = render 'availability/form', f: f
.col-xs-12.col-md-6 .col-xs-12.col-md-6
fieldset fieldset
legend Interne Kriterien legend Interne Kriterien
...@@ -79,7 +78,24 @@ fieldset ...@@ -79,7 +78,24 @@ fieldset
= f.association :involved_authority, collection: @social_workers = f.association :involved_authority, collection: @social_workers
= f.input :competent_authority = f.input :competent_authority
= f.input :cost_unit, collection: Client.cost_unit_collection, include_blank: true fieldset
- if policy(Client).show_comments? legend= t_attr(:cost_unit)
= f.input :comments = f.input :cost_unit, collection: Client.cost_unit_collection, include_blank: true, label_html: { class: 'sr-only' }
= f.input :additional_comments
h4 Hinweis
p
'Kosten in der Stadt Zürich: Vermittlung von Freiwilligen ist kostenlos.
br
'Kosten in Gemeinden: Die einmalige Vermittlungspauschale nach einer einmonatigen Probezeit beträgt:
br
'CHF 600 bei TransFair-Unterstützung der Tandems in der AOZ, Stadt Zürich
br
'CHF 800 bei TransFair-Unterstützung der Tandems vor Ort
- if policy(Client).show_comments?
.col-xs-12
hr
.col-xs-12.col-md-6
= f.input :comments, input_html: { class: 'double-height' }
.col-xs-12.col-md-6
= f.input :additional_comments, input_html: { class: 'double-height' }
...@@ -77,7 +77,7 @@ h1.m-b-20= @client.contact.full_name ...@@ -77,7 +77,7 @@ h1.m-b-20= @client.contact.full_name
td= t_attr(:additional_comments) td= t_attr(:additional_comments)
td= @client.additional_comments td= @client.additional_comments
h3 Wann sind Sie verfügbar? h3 Verfügbarkeit
= render 'availability/show', available: @client = render 'availability/show', available: @client
= render 'assignments' = render 'assignments'
= render 'show_navigation' = render 'show_navigation'
- tabindex_start ||= 0
fieldset fieldset
legend= t_attr(:address, Contact) legend= t_attr(:address, Contact)
.row .row
.col-xs-6 .col-xs-6
= f.input :street, required: true = f.input :street, required: true, input_html: { tabindex: tabindex_start + 1 }
.col-xs-6 .col-xs-6
= f.input :extended = f.input :extended
.row .row
.col-xs-4 .col-xs-4
= f.input :postal_code, required: true = f.input :postal_code, required: true, input_html: { tabindex: tabindex_start + 2 }
.col-xs-8 .col-xs-8
= f.input :city, required: true = f.input :city, required: true, input_html: { tabindex: tabindex_start + 3 }
- tabindex_start ||= 0
fieldset fieldset
legend Telefon und Email legend Telefon und Email
.row .row
.col-xs-12.col-md-6 .col-xs-12.col-md-6
= f.input :primary_email, as: :email, required: f.object.needs_primary_email? = f.input :primary_email, as: :email, required: f.object.needs_primary_email?, input_html: { tabindex: tabindex_start + 1 }
.col-xs-12.col-md-6 .col-xs-12.col-md-6
= f.input :primary_phone, as: :tel, required: f.object.needs_primary_phone? = f.input :primary_phone, as: :tel, required: f.object.needs_primary_phone?, input_html: { tabindex: tabindex_start + 2 }
- if controller_name == 'clients' - if controller_name == 'clients'
.col-xs-12.col-md-6 .col-xs-12.col-md-6
= f.input :secondary_phone, as: :tel = f.input :secondary_phone, as: :tel, input_html: { tabindex: tabindex_start + 3 }
- tabindex_start ||= 0
.row .row
- if !f.object.client? - if !f.object.client?
.col-xs-12.col-md-6= f.input :first_name, required: true .col-xs-12.col-md-6= f.input :first_name, required: true, input_html: { tabindex: tabindex_start + 1 }
.col-xs-12.col-md-6= f.input :last_name, required: true, label: t('generic_keys.last_name') .col-xs-12.col-md-6= f.input :last_name, required: true, label: t('generic_keys.last_name'), input_html: { tabindex: tabindex_start + 2 }
...@@ -51,15 +51,38 @@ wb.add_worksheet(name: 'Veranstaltung') do |sheet| ...@@ -51,15 +51,38 @@ wb.add_worksheet(name: 'Veranstaltung') do |sheet|
sheet.add_row(['Teilnehmerliste'], types: :string, style: col_header) sheet.add_row(['Teilnehmerliste'], types: :string, style: col_header)
sheet.add_row(['Teilnehmeranzahl', @event.volunteers.count], types: [:string, :integer], style: [col_header, standard_format]) sheet.add_row(['Teilnehmeranzahl', @event.volunteers.count], types: [:string, :integer], style: [col_header, standard_format])
2.times { sheet.add_row } 2.times { sheet.add_row }
sheet.add_row(['Name', 'Mailadresse', 'Beginn als FW', 'Adresse', 'Telefon', 'Jahrgang'], types: :string, style: col_header)
row_options = {
types: [
:string, # 00
:string, # 01
:string, # 02
:string, # 03
:string, # 04
:string, # 05
:integer, # 06
],
style: [
standard_format, # 00
standard_format, # 01
standard_format, # 02
date_format, # 03
standard_format, # 04
standard_format, # 05
standard_format, # 06
]
}
sheet.add_row(['Vorname', 'Nachname', 'Mailadresse', 'Beginn als FW', 'Adresse', 'Telefon', 'Jahrgang'], types: :string, style: col_header)
@event.volunteers.map do |volunteer| @event.volunteers.map do |volunteer|
[ [
volunteer.contact&.full_name, volunteer.contact&.first_name,
volunteer.contact&.last_name,
volunteer.contact&.primary_email, volunteer.contact&.primary_email,
volunteer.accepted_at.present? ? l(volunteer.accepted_at.to_date) : nil, volunteer.accepted_at.present? ? l(volunteer.accepted_at.to_date) : nil,
volunteer.contact&.full_address, volunteer.contact&.full_address,
volunteer.contact&.primary_phone, volunteer.contact&.primary_phone,
volunteer.birth_year&.year, volunteer.birth_year&.year
] ]
end.each { |row| sheet.add_row row, row_options } end.each { |row| sheet.add_row row, row_options }
end end
...@@ -46,7 +46,10 @@ wb.add_worksheet(name: t('group_offers', count: 2)) do |sheet| ...@@ -46,7 +46,10 @@ wb.add_worksheet(name: t('group_offers', count: 2)) do |sheet|
type = t("offer_type.#{offer.offer_type}") if offer.offer_type? type = t("offer_type.#{offer.offer_type}") if offer.offer_type?
state = t("offer_state.#{offer.offer_state}") if offer.offer_state? state = t("offer_state.#{offer.offer_state}") if offer.offer_state?
creator = offer.creator if offer.creator creator = offer.creator if offer.creator
volunteers = offer.volunteers_with_roles volunteers = offer.volunteers.map do |volunteer|
role_key = offer.responsible?(volunteer) ? 'responsible' : 'member'
"#{volunteer} (#{I18n.t("activerecord.attributes.group_assignment.#{role_key}")}) #{volunteer.contact.primary_email}"
end.compact
sheet.add_row [ sheet.add_row [
offer.active? ? 'Aktiv' : 'Inaktiv', offer.active? ? 'Aktiv' : 'Inaktiv',
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
= f.input :profession = f.input :profession
h3 Wann sind Sie verfügbar? h3 Verfügbarkeit?
= render 'availability/form', f: f = render 'availability/form', f: f
.row .row
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
td= t_attr(:profession) td= t_attr(:profession)
td= @profile.profession td= @profile.profession
h3 Wann sind Sie verfügbar? h3 Verfügbarkeit
= render 'availability/show', available: @profile = render 'availability/show', available: @profile
= form_navigation_btn :edit = form_navigation_btn :edit
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
= f.input_field :kind, value: @reminder_mailing.kind, as: :hidden = f.input_field :kind, value: @reminder_mailing.kind, as: :hidden
.row .row
.col-xs-12.col-md-4 .col-xs-12.col-md-4
= render 'email_templates/explain_panel', template_varnames: ReminderMailing::TEMPLATE_VARNAMES = render 'email_templates/explain_panel', template_varnames: @reminder_mailing.template_varnames.values
.col-xs-12.col-md-8 .col-xs-12.col-md-8
= render 'email_templates/subject_body_inputs', f: f = render 'email_templates/subject_body_inputs', f: f
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
.row .row
.col-xs-12.col-md-4 .col-xs-12.col-md-4
= render 'email_templates/explain_panel', template_varnames: SemesterProcessMail::template_varnames[:mail] = render 'email_templates/explain_panel', template_varnames: SemesterProcessMail.template_varnames.values
.col-xs-12.col-md-8 .col-xs-12.col-md-8
= render 'email_templates/subject_body_inputs', f: f = render 'email_templates/subject_body_inputs', f: f
......
...@@ -43,47 +43,47 @@ ...@@ -43,47 +43,47 @@
= f.input :salutation, = f.input :salutation,
as: :select, as: :select,
collection: Volunteer::SALUTATIONS, collection: Volunteer::SALUTATIONS,
include_blank: true include_blank: true, input_html: { tabindex: 1 }
= render 'contacts/user_fields', f: c = render 'contacts/user_fields', f: c, tabindex_start: 1
.col-xs-12.col-md-6 .col-xs-12.col-md-6
= render 'contacts/address_fields', f: c = render 'contacts/address_fields', f: c, tabindex_start: 3