From 5a4cf7fbc022c12ed4c47cfa2533b51d34a6b6cf Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Fri, 4 Mar 2016 21:34:07 +0000 Subject: [PATCH] Bug 3534 - Patron quick add form This patch adds two new system preferences: PatronQuickAdd PatronQuickAddFields When enabled the pref will add a new form to memberentrygen composed of the fields in PatronQuickAddFields and BorrowerMandatoryField. There will be a button allowing a user to switch from the quickadd to the full form. The Quick add will only be displayed on add of a new patron, future edits should display the full form. Test plan: 1 - Apply patch 2 - run updatedatabase.pl 3 - Add a new patron and ensure nothing has changed 4 - Enable quick add (do not add any fields) 5 - Only required fields should be displayed 6 - Ensure that values are populated when swtiching forms 7 - Ensure you can save patron 8 - Verify that subsequent edits use only full form 9 - Add fields to PatronQuickAddFields 10 - check that fields are present in quick add form 11 - Ensure that you can save patron 12 - Test with various values in both MandatoryBorrowerFields and PatronQuickAddFields --- .../prog/en/modules/admin/preferences/patrons.pref | 7 +++ .../prog/en/modules/members/memberentrygen.tt | 69 ++++++++++++++++++++-- 2 files changed, 72 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref index 22c2b27..c1c72da 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref @@ -100,6 +100,13 @@ Patrons: class: integer - results per page in the staff client. - + - pref: PatronQuickAdd + choices: + yes: Use + no: "Don't use" + - "the patron quick add form when entering a new patron. Displays only mandatory fields and fields specified here:" + - pref: PatronQuickAddFields + - - "Use the SMS::Send::" - pref: SMSSendDriver - driver to send SMS messages. 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 497c1a7..8542039 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt @@ -8,6 +8,32 @@ // +[% UNLESS ( check_member ) %]
[% END %] @@ -796,7 +822,7 @@ [% ELSE %] [% END %] - [% END %] + [% END % ] [% END %] [% IF ( mandatorypassword ) %]Required[% END %][% IF ( ERROR_password_mismatch ) %]Passwords do not match[% END %] @@ -1014,16 +1040,51 @@ [% UNLESS ( check_member ) %]
+ [% IF opadd %] + + [% END %] - [% IF ( opadd ) %] + [% IF ( opadd ) %] Cancel [% ELSE %] Cancel [% END %]
[% END %] +
- + +[% IF Koha.Preference('PatronQuickAdd') && opadd && !check_member %] +
+
Quick Add +
    +
+
+ +
+ + + Cancel +
+ +
+ +[% END %] -- 2.1.4