@@ -, +, @@ minPasswordLength --- installer/data/mysql/sysprefs.sql | 2 +- installer/onboarding.pl | 22 ++++++++- koha-tmpl/intranet-tmpl/prog/css/installer.css | 4 ++ .../prog/en/includes/onboarding_messages.inc | 4 ++ .../prog/en/modules/onboarding/onboardingstep5.tt | 10 ---- .../prog/en/modules/onboarding/onboardingstep6.tt | 53 ++++++++++++++++++++++ 6 files changed, 82 insertions(+), 13 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep6.tt --- a/installer/data/mysql/sysprefs.sql +++ a/installer/data/mysql/sysprefs.sql @@ -304,7 +304,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('MaxSearchResultsItemsPerRecordStatusCheck','20','','Max number of items per record for which to check transit and hold status','Integer'), ('MembershipExpiryDaysNotice','',NULL,'Send an account expiration notice that a patron\'s card is about to expire after','Integer'), ('MergeReportFields','',NULL,'Displayed fields for deleted MARC records after merge','Free'), -('minPasswordLength','3',NULL,'Specify the minimum length of a patron/staff password','free'), +('minPasswordLength','8',NULL,'Specify the minimum length of a patron/staff password','free'), ('NewItemsDefaultLocation','','','If set, all new items will have a location of the given Location Code ( Authorized Value type LOC )',''), ('NewsAuthorDisplay','none','none|opac|staff|both','Display the author name for news items.','Choice'), ('noissuescharge','5','','Define maximum amount withstanding before check outs are blocked','Integer'), --- a/installer/onboarding.pl +++ a/installer/onboarding.pl @@ -290,12 +290,30 @@ if ( $step == 5 ) { $step++ if Koha::IssuingRules->count; } +if ( $step == 6 ) { + if ( $op eq 'set_validate_min_password_length' ) { + my $minPasswordLength = $input->param('pref_minPasswordLength'); + warn $minPasswordLength; + C4::Context->set_preference( 'minPasswordLength', $minPasswordLength ); + unless ($@) { + push @messages, { code => 'success_on_update_minPasswordLength_syspref' }; + $step++; + } + else { + push @messages, { code => 'error_on_update_minPasswordLength_syspref' }; + } + } +} + my $libraries = Koha::Libraries->search( {}, { order_by => ['branchcode'] }, ); $template_params->{libraries} = $libraries; -if ( $step > 5 ) { +my $minPasswordLength = C4::Context->preference('minPasswordLength'); +$template_params->{minPasswordLength} = $minPasswordLength; + +if ( $step > 6 ) { $template_params->{all_done} = 1; # If step 5 is complete, we are done! - $step = 5; + $step = 6; } #Getting the appropriate template to display to the user --- a/koha-tmpl/intranet-tmpl/prog/css/installer.css +++ a/koha-tmpl/intranet-tmpl/prog/css/installer.css @@ -241,3 +241,7 @@ span.breadcrumbs { .deselectall.optional { display: none; } + +#passwordlengthhint { + color:red; +} --- a/koha-tmpl/intranet-tmpl/prog/en/includes/onboarding_messages.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/onboarding_messages.inc @@ -33,5 +33,9 @@ [% CASE 'ERROR_password_has_whitespaces' %]
The patron has not been created the entered password contained whitespaces
[% CASE %][% message | html %] + [% CASE 'success_on_update_minPasswordLength_syspref' %] +
Minimum password length set!
+ [% CASE 'error_on_update_minPasswordLength_syspref' %] +
Minimum password length not set!
[% END %] [% END %] --- a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep5.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep5.tt @@ -15,15 +15,6 @@

Koha

- [% IF all_done %] - -

Web installer › Complete

- [% INCLUDE 'onboarding_messages.inc' %] -

Congratulations you have finished and are ready to use Koha

- Start using Koha - - [% ELSE %] -

Web installer › Create a new circulation rule

[% INCLUDE 'onboarding_messages.inc' %] @@ -128,7 +119,6 @@ - [% END %]
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep6.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep6.tt @@ -0,0 +1,53 @@ +[% INCLUDE 'doc-head-open.inc' %] +Koha › Web installer › + [% IF all_done %] + Complete + [% ELSE %] + Create circulation rule + [% END %] + +[% INCLUDE 'installer-doc-head-close.inc' %] +[% INCLUDE 'validator-strings.inc' %] +[% INCLUDE 'installer-strings.inc' %] + + + + +
+
+
+

Koha

+ [% IF all_done %] +

Web installer › Complete

+ [% INCLUDE 'onboarding_messages.inc' %] +

Congratulations you have finished and are ready to use Koha

+ Start using Koha + [% ELSE %] +

Web installer › Set minPasswordLength system preference

+ [% INCLUDE 'onboarding_messages.inc' %] + + The minPasswordLength system preference is a setting for the shortest length library staff and patrons can set their passwords to. + +
+
+ + +
    +
  1. + + + Required +
  2. +
+

+ To amend the minPasswordLength system preference go to: + Administration › Global system preferences › Patrons +

+
+ +
+ [% END %] +
+
+ +[% INCLUDE 'intranet-bottom.inc' %] --