@@ -, +, @@ form (register at smartform.cz or use "smartform" as the client ID) (eg. fill in "streetnumber|B_streetnumber") --- .../bug_17718-add_smartform_syspref.sql | 2 + installer/data/mysql/sysprefs.sql | 2 + .../en/includes/member-alt-address-style-de.inc | 44 +++++++++++++++++----- .../en/includes/member-alt-contact-style-de.inc | 36 +++++++++++++----- .../en/includes/member-main-address-style-de.inc | 24 ++++++++++++ .../prog/en/modules/admin/preferences/patrons.pref | 11 ++++++ .../prog/en/modules/members/memberentrygen.tt | 10 +++++ 7 files changed, 109 insertions(+), 20 deletions(-) create mode 100644 installer/data/mysql/atomicupdate/bug_17718-add_smartform_syspref.sql --- a/installer/data/mysql/atomicupdate/bug_17718-add_smartform_syspref.sql +++ a/installer/data/mysql/atomicupdate/bug_17718-add_smartform_syspref.sql @@ -0,0 +1,2 @@ +INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES ('SmartformEnable', '0', 'If ON, enable Smartform to simplify address entering during patron registration.', NULL, 'YesNo'); +INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES ('SmartformClientID', '', 'Smartform service client ID', '', 'Free'); --- a/installer/data/mysql/sysprefs.sql +++ a/installer/data/mysql/sysprefs.sql @@ -466,6 +466,8 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('ShowReviewer','full','none|full|first|surname|firstandinitial|username','Choose how a commenter\'s identity is presented alongside comments in the OPAC','Choice'), ('ShowReviewerPhoto','1','','If ON, photo of reviewer will be shown beside comments in OPAC','YesNo'), ('SlipCSS','',NULL,'Slips CSS url.','free'), +('SmartformEnable', '0', NULL, 'If ON, enable Smartform service to simplify address entering during patron registration.', 'YesNo'), +('SmartformClientID', '', '', 'Smartform service client ID', 'Free'), ('SMSSendDriver','','','Sets which SMS::Send driver is used to send SMS messages.','free'), ('SMSSendPassword', '', '', 'Password used to send SMS messages', 'free'), ('SMSSendUsername', '', '', 'Username/Login used to send SMS messages', 'free'), --- a/koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-address-style-de.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-address-style-de.inc @@ -1,3 +1,4 @@ +[% USE Koha %]
Alternate address
    [% UNLESS noB_address %] @@ -8,7 +9,15 @@ + [% IF Koha.Preference('SmartformEnable') %] + [% IF ( noB_streetnumber ) %] + + [% ELSE %] + + [% END %] + [% ELSE %] + [% END %] [% IF ( mandatoryB_address ) %]Required[% END %] [% END %] @@ -43,7 +52,11 @@ + [% IF Koha.Preference('SmartformEnable') %] + + [% ELSE %] + [% END %] [% IF ( mandatoryB_streetnumber ) %]Required[% END %] [% END %] @@ -61,16 +74,20 @@ [% END %] [% UNLESS noB_zipcode %] -
  1. - [% IF ( mandatoryB_zipcode ) %] -
  2. + [% IF ( mandatoryB_zipcode ) %] +
  3. + [% END %] + [% IF ( mandatoryB_zipcode ) %]Required[% END %] + [% END %] [% UNLESS noB_city %]
  4. @@ -80,7 +97,11 @@ - + [% IF Koha.Preference('SmartformEnable') %] + + [% ELSE %] + + [% END %] [% IF ( mandatoryB_city ) %]Required[% END %]
  5. [% END %] @@ -144,4 +165,7 @@ [% END %]
+ [% IF Koha.Preference('SmartformEnable') %] + + [% END %]
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-contact-style-de.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-contact-style-de.inc @@ -1,3 +1,4 @@ +[% USE Koha %]
Alternate contact
    [% UNLESS noaltcontactsurname %] @@ -32,7 +33,11 @@ + [% IF Koha.Preference('SmartformEnable') %] + + [% ELSE %] + [% END %] [% IF ( mandatoryaltcontactaddress1 ) %]Required[% END %] [% END %] @@ -49,16 +54,20 @@ [% END %] [% UNLESS noaltcontactzipcode %] -
  1. - [% IF ( mandatoryaltcontactzipcode ) %] -
  2. + [% IF ( mandatoryaltcontactzipcode ) %] +
  3. + [% END %] + [% IF ( mandatoryaltcontactzipcode ) %]Required[% END %] + [% END %] [% UNLESS noaltcontactaddress3 %]
  4. @@ -68,7 +77,11 @@ - + [% IF Koha.Preference('SmartformEnable') %] + + [% ELSE %] + + [% END %] [% IF ( mandatoryaltcontactaddress3 ) %]Required[% END %]
  5. [% END %] @@ -109,4 +122,7 @@ [% END %]
+ [% IF Koha.Preference('SmartformEnable') %] + + [% END %]
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/member-main-address-style-de.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/member-main-address-style-de.inc @@ -1,3 +1,4 @@ +[% USE Koha %]
Main address
    [% UNLESS nostreettype %] @@ -31,7 +32,15 @@ + [% IF Koha.Preference('SmartformEnable') %] + [% IF ( nostreetnumber ) %] + + [% ELSE %] + + [% END %] + [% ELSE %] + [% END %] [% IF ( mandatoryaddress ) %]Required[% END %] [% END %] @@ -43,7 +52,11 @@ + [% IF Koha.Preference('SmartformEnable') %] + + [% ELSE %] + [% END %] [% IF ( mandatorystreetnumber ) %]Required[% END %] [% END %] @@ -67,7 +80,11 @@ + [% IF Koha.Preference('SmartformEnable') %] + + [% ELSE %] + [% END %] [% IF ( mandatoryzipcode ) %]Required[% END %] [% END %] @@ -79,7 +96,11 @@ + [% IF Koha.Preference('SmartformEnable') %] + + [% ELSE %] + [% END %] [% IF cities.count %]or choose