From eeb8cc42ddba8b125b012d6ad8747ced67599aa5 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 Signed-off-by: Andrew Fuerste-Henry Signed-off-by: Chris Cormack Signed-off-by: Tomas Cohen Arazi --- 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 8484ceb22d..114c839307 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 && 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
    @@ -390,6 +390,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 a0e19b2ad0..b6f3449d2d 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.39.5