diff --git a/app/models/pbs/person.rb b/app/models/pbs/person.rb index f4f14b2cf..860759460 100644 --- a/app/models/pbs/person.rb +++ b/app/models/pbs/person.rb @@ -72,6 +72,16 @@ module Pbs::Person timeliness: { type: :date, allow_blank: true } alias_method_chain :full_name, :title + + after_initialize :defaults, unless: :persisted? + # ":if => :new_record?" is equivalent in this context + + end + + def defaults + self.country = "Schweiz" + self.salutation = "lieber_pfadiname" + self.correspondence_language = "de" end def salutation_label diff --git a/app/views/people/_fields_pbs.html.haml b/app/views/people/_fields_pbs.html.haml index 7d0cff9c7..fa4612e5d 100644 --- a/app/views/people/_fields_pbs.html.haml +++ b/app/views/people/_fields_pbs.html.haml @@ -5,12 +5,12 @@ = field_set_tag do = f.labeled_input_field :title - = f.labeled_collection_select :salutation, Salutation.available, :first, :last, { include_blank: true }, class: 'span6' + = f.labeled_collection_select :salutation, Salutation.available, :first, :last, { include_blank: false }, class: 'span6' = f.labeled_collection_select(:correspondence_language, Settings.application.languages.to_hash, :first, :last, - { prompt: true }, + { prompt: false }, class: 'span6') = f.labeled_input_field :j_s_number = f.labeled_input_field :grade_of_school, help_inline: t('.non_automatic_field') diff --git a/config/locales/models.pbs.de.yml b/config/locales/models.pbs.de.yml index 6da01b79d..9a7415ab3 100644 --- a/config/locales/models.pbs.de.yml +++ b/config/locales/models.pbs.de.yml @@ -15,7 +15,7 @@ de: other: APVs group/corps: one: Corps - other: Corps + other: Corps group/abteilung: one: Abteilung other: Abteilungen @@ -74,7 +74,7 @@ de: group/woelfe: one: Wölfe other: Wölfe - + group/apv/präsident_apv: one: Präsident APV description: @@ -87,7 +87,7 @@ de: group/apv/mitglied: one: Mitglied description: - + group/corps/corpsleitung: one: Corpsleiter description: @@ -97,7 +97,7 @@ de: group/corps/mitglied_corpsrat: one: Corpsrat description: - + group/bund/mitarbeiter_gs: one: Mitarbeiter GS description: