From b64d9d1c125945e96b9b287dd30ad9a1aa2f4b63 Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Thu, 9 Jun 2022 16:02:42 +0000 Subject: [PATCH] Bug 10950: Add intranet/OPAC form fields Signed-off-by: Martin Renvoize --- Koha/Database/Columns.pm | 1 + .../prog/en/includes/patronfields.inc | 1 + .../prog/en/modules/members/memberentrygen.tt | 17 ++++++++++++++++- .../prog/en/modules/members/members-update.tt | 1 + .../bootstrap/en/modules/opac-memberentry.tt | 13 +++++++++++-- 5 files changed, 30 insertions(+), 3 deletions(-) diff --git a/Koha/Database/Columns.pm b/Koha/Database/Columns.pm index 5fa7075de2..3686c28bf2 100644 --- a/Koha/Database/Columns.pm +++ b/Koha/Database/Columns.pm @@ -65,6 +65,7 @@ sub columns { "firstname" => __("First name"), "dateofbirth" => __("Date of birth"), "initials" => __("Initials"), + "pronouns" => __("Pronouns"), "othernames" => __("Other name"), "sex" => __("Gender"), "relationship" => __("Relationship"), diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patronfields.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patronfields.inc index 416a5ae26c..17d28b6c33 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/patronfields.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patronfields.inc @@ -8,6 +8,7 @@ [%- CASE 'title' -%]Salutation [%- CASE 'othernames' -%]Other name [%- CASE 'initials' -%]Initials + [%- CASE 'pronouns' -%]Pronouns [%- CASE 'streetnumber' -%]Street number [%- CASE 'streettype' -%]Street type [%- CASE 'address' -%]Address diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt index 548f8c9943..92971e97d2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt @@ -267,7 +267,7 @@ legend:hover { [% END %] [% IF ( step_1 ) %] - [% UNLESS notitle && nosurname && nofirstname && nodateofbirth && noinitials && noothernames &&nosex %] + [% UNLESS notitle && nosurname && nofirstname && nodateofbirth && noinitials && noothernames &&nosex && nopronouns %]
[% IF ( I ) %]Organization [% ELSE %]Patron [% END %]identity
    @@ -375,6 +375,21 @@ legend:hover { [% END %] [% END # /UNLESS noinitials %] + [% UNLESS nopronouns %] +
  1. + [% IF ( mandatorypronouns ) %] +
  2. + [% END # /UNLESS nopronouns %] [% END #/UNLESS ( I ) %] [% UNLESS noothernames %]
  3. diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/members-update.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/members-update.tt index 9384c653c9..99f049836c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/members-update.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/members-update.tt @@ -22,6 +22,7 @@ [% CASE 'title' %]Title [% CASE 'othernames' %]Other names [% CASE 'initials' %]Initials +[% CASE 'pronouns' %]Pronouns [% CASE 'streetnumber' %]Street number [% CASE 'streettype' %]Street type [% CASE 'address' %]Address diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt index cd146409d4..3a18ac7db3 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt @@ -193,7 +193,7 @@
    - [% FOREACH field = ['streetnumber' 'streettype' 'cardnumber' 'branchcode' 'categorycode' 'title' 'surname' 'firstname' 'dateofbirth' 'initials' 'othernames' 'address' 'address2' 'city' 'state' 'zipcode' 'country' 'phone' 'phonepro' 'mobile' 'email' 'emailpro' 'fax' 'B_streettype' 'B_address' 'B_address2' 'B_city' 'B_state' 'B_zipcode' 'B_country' 'B_phone' 'B_email' 'contactnote' 'altcontactsurname' 'altcontactfirstname' 'altcontactaddress1' 'altcontactaddress2' 'altcontactaddress3' 'altcontactstate' 'altcontactzipcode' 'altcontactcountry' 'altcontactphone' 'password' ] %] + [% FOREACH field = ['streetnumber' 'streettype' 'cardnumber' 'branchcode' 'categorycode' 'title' 'surname' 'firstname' 'dateofbirth' 'initials' 'pronouns' 'othernames' 'address' 'address2' 'city' 'state' 'zipcode' 'country' 'phone' 'phonepro' 'mobile' 'email' 'emailpro' 'fax' 'B_streettype' 'B_address' 'B_address2' 'B_city' 'B_state' 'B_zipcode' 'B_country' 'B_phone' 'B_email' 'contactnote' 'altcontactsurname' 'altcontactfirstname' 'altcontactaddress1' 'altcontactaddress2' 'altcontactaddress3' 'altcontactstate' 'altcontactzipcode' 'altcontactcountry' 'altcontactphone' 'password' ] %] [% IF mandatory.defined( field ) %] [% SET required.$field = 'required' %] [% END %] @@ -300,7 +300,7 @@ [% END # / defined 'branchcode' %] [%# Following on one line for translatability %] - [% UNLESS hidden.defined('title') && hidden.defined('surname') && hidden.defined('firstname') && hidden.defined('dateofbirth') && hidden.defined('initials') && hidden.defined('othernames') && hidden.defined('sex') %] + [% UNLESS hidden.defined('title') && hidden.defined('surname') && hidden.defined('firstname') && hidden.defined('dateofbirth') && hidden.defined('initials') && hidden.defined('pronouns') && hidden.defined('othernames') && hidden.defined('sex') %]
    @@ -362,6 +362,15 @@
  4. [% END %] + [% UNLESS hidden.defined('pronouns') %] +
  5. + + + +
    Required
    +
  6. + [% END %] + [% UNLESS hidden.defined('othernames') %]
  7. -- 2.20.1