From c88e1d7030312f8027766e914140fe08d22b1249 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 Signed-off-by: Andrew Fuerste-Henry --- 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 c1935ba1e5..a71d772b39 100644 --- a/Koha/Database/Columns.pm +++ b/Koha/Database/Columns.pm @@ -66,6 +66,7 @@ sub columns { "middle_name" => __("Middle 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 3d3a3cd2e7..821b7d0b7f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/patronfields.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patronfields.inc @@ -9,6 +9,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 9eb5f1605a..8c2b3cada5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt @@ -266,7 +266,7 @@ legend:hover { [% END %] [% IF ( step_1 ) %] - [% UNLESS notitle && nosurname && nofirstname && nomiddle_name && nodateofbirth && noinitials && noothernames &&nosex %] + [% UNLESS notitle && nosurname && nofirstname && nomiddle_name && nodateofbirth && noinitials && noothernames &&nosex && nopronouns %]
[% IF ( patron_category.category_type == 'I' ) %]Organization [% ELSE %]Patron [% END %]identity
    @@ -389,6 +389,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 7d3ba0b643..9da28cd486 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 @@ -23,6 +23,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 dec7e2f7f6..595a60fd19 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' 'middle_name' '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' 'middle_name' '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('middle_name') && hidden.defined('dateofbirth') && hidden.defined('initials') && hidden.defined('othernames') && hidden.defined('sex') %] + [% UNLESS hidden.defined('title') && hidden.defined('surname') && hidden.defined('firstname') && hidden.defined('middle_name') && hidden.defined('dateofbirth') && hidden.defined('initials') && hidden.definded('pronouns') && hidden.defined('othernames') && hidden.defined('sex') %]
    @@ -371,6 +371,15 @@
  4. [% END %] + [% UNLESS hidden.defined('pronouns') %] +
  5. + + + +
    Required
    +
  6. + [% END %] + [% UNLESS hidden.defined('othernames') %]
  7. -- 2.30.2