Bugzilla – Attachment 59037 Details for
Bug 17855
New onboarding tool feature to guide users through setting up Koha, and minor web installer UI improvements
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17855 - Seventh update following testing feedback.
Bug-17855---Seventh-update-following-testing-feedb.patch (text/plain), 69.84 KB, created by
Alex Buckley
on 2017-01-17 00:44:13 UTC
(
hide
)
Description:
Bug 17855 - Seventh update following testing feedback.
Filename:
MIME Type:
Creator:
Alex Buckley
Created:
2017-01-17 00:44:13 UTC
Size:
69.84 KB
patch
obsolete
>From f6d20bedb451302fb4866fbcc84c7bbb38c4ea6c Mon Sep 17 00:00:00 2001 >From: "@alexbuckley" <alexbuckley@catalyst.net.nz> >Date: Mon, 16 Jan 2017 04:34:09 +0000 >Subject: [PATCH] Bug 17855 - Seventh update following testing feedback. > >1. Moved the "select all options" button down to just above the selectable options >in the basic setup, and positioned at the top of the page for the advanced setup. > >2. Removed the "there is nothing to do because the sample data is >already installed" page so if the user has install sample data in the web >installer then the step to create that object in the onboarding tool is >skipped altogether. > >3. Removed the "We're just going to setup a few more things" page > >4. Changed the title of the 'Create patron page' > >5. Added clarifying information to the "Add a patron category" page > >6. Added clarifying information to the "Create item type" page > >7. Fixed the capitalization in the onboarding tool > >8. Removed the BackupStep3.tt file which was un-used > >9. Changed the redirect time displayed to user in step3.tt to 10 > >10. Changed the cardnumber on the create patron administrator page so >that it is only populated when the user installed sample patrons. Also >changed the regex so that it allows letters and number. > >11. Used the HTMl validator to identify errors in the template and have >corrected all possible in the onboarding templates. >--- > installer/onboarding.pl | 208 ++++++++--------- > .../prog/en/modules/installer/Backupstep3.tt | 257 --------------------- > .../prog/en/modules/installer/step3.tt | 189 +++++++-------- > .../prog/en/modules/onboarding/onboardingstep0.tt | 18 -- > .../prog/en/modules/onboarding/onboardingstep1.tt | 57 ++--- > .../prog/en/modules/onboarding/onboardingstep2.tt | 42 ++-- > .../prog/en/modules/onboarding/onboardingstep3.tt | 87 +++++-- > .../prog/en/modules/onboarding/onboardingstep4.tt | 100 ++++---- > .../prog/en/modules/onboarding/onboardingstep5.tt | 52 +++-- > 9 files changed, 383 insertions(+), 627 deletions(-) > delete mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/installer/Backupstep3.tt > delete mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep0.tt > >diff --git a/installer/onboarding.pl b/installer/onboarding.pl >index cd04cf0..437657d 100755 >--- a/installer/onboarding.pl >+++ b/installer/onboarding.pl >@@ -63,7 +63,7 @@ my ( $template, $loggedinuser, $cookie ) = > C4::InstallAuth::get_template_and_user( > { > template_name => "/onboarding/onboardingstep" >- . ( $step ? $step : 0 ) . ".tt", >+ . ( $step ? $step : 1 ) . ".tt", > query => $input, > type => "intranet", > authnotrequired => 0, >@@ -93,60 +93,46 @@ my $dbh = DBI->connect( > #Store the value of the template input name='op' in the variable $op so we can check if the user has pressed the button with the name="op" and value="finish" meaning the user has finished the onboarding tool. > my $op = $input->param('op'); > $template->param( 'op' => $op ); >+ > if ( $op && $op eq 'finish' ) > { #If the value of $op equals 'finish' then redirect user to /cgi-bin/koha/mainpage.pl > print $input->redirect("/cgi-bin/koha/mainpage.pl"); > exit; > } > >-#Store the value of the template input name='start' in the variable $start so we can check if the user has pressed this button and started the onboarding tool process >-my $start = $input->param('start'); >-$template->param( 'start' => $start ); >+my $libraries = Koha::Libraries->search( {}, { order_by => ['branchcode'] }, ); >+$template->param( >+ libraries => $libraries, >+ group_types => [ >+ { >+ categorytype => 'searchdomain', >+ categories => [ >+ Koha::LibraryCategories->search( >+ { categorytype => 'searchdomain' } >+ ) >+ ], >+ }, >+ { >+ categorytype => 'properties', >+ categories => [ >+ Koha::LibraryCategories->search( >+ { categorytype => 'properties' } >+ ) >+ ], >+ }, >+ ] >+); > >-if ( $start && $start eq 'Start setting up my Koha' ) { >- my $libraries = >- Koha::Libraries->search( {}, { order_by => ['branchcode'] }, ); >- $template->param( >- libraries => $libraries, >- group_types => [ >- { >- categorytype => 'searchdomain', >- categories => [ >- Koha::LibraryCategories->search( >- { categorytype => 'searchdomain' } >- ) >- ], >- }, >- { >- categorytype => 'properties', >- categories => [ >- Koha::LibraryCategories->search( >- { categorytype => 'properties' } >- ) >- ], >- }, >- ] >- ); >-} >-elsif ( $start && $start eq 'Minimal patron category setup' ) { > > #Select all the patron category records in the categories database table and give them to the template > my $categories = Koha::Patron::Categories->search(); >- $template->param( categories => $categories, ); >+ $template->param( 'categories' => $categories, ); > > #Check if the $step variable equals 1 i.e. the user has clicked to create a library in the create library screen 1 >-} >-elsif ( $start && $start eq 'Minimal item type setup' ) { >- > my $itemtypes = Koha::ItemTypes->search(); >- $template->param( itemtypes => $itemtypes, ); >-} >-elsif ( $step && $step == 1 ) { >- my $createlibrary = $input->param('createlibrary') >- ; #Store the inputted library branch code and name in $createlibrary variable >- $template->param( 'createlibrary' => $createlibrary ) >- ; # Hand the library values back to the template in the createlibrary variable >+ $template->param( 'itemtypes' => $itemtypes, ); > >+if ( $step && $step == 1 ) { > #store inputted parameters in variables > my $branchcode = $input->param('branchcode'); > $branchcode = uc($branchcode); >@@ -179,88 +165,94 @@ elsif ( $step && $step == 1 ) { > else { > $message = 'error_on_insert'; > } >+ warn $message; > $template->param( 'message' => $message ); > > #Check if the $step variable equals 2 i.e. the user has clicked to create a patron category in the create patron category screen 1 > } > elsif ( $step && $step == 2 ) { >- my $createcat = $input->param('createcat') >- ; #Store the inputted category code and name in $createcat >- $template->param( 'createcat' => $createcat ); >+ if ($op eq "add_validate_category"){ >+ #Initialising values >+ my $searchfield = $input->param('description') // q||; >+ my $categorycode = $input->param('categorycode'); >+ my $op = $input->param('op') // 'list'; >+ my $message; >+ my $category; >+ $template->param( 'categorycode' => $categorycode ); > >- #Initialising values >- my $searchfield = $input->param('description') // q||; >- my $categorycode = $input->param('categorycode'); >- my $op = $input->param('op') // 'list'; >- my $message; >- my $category; >- $template->param( 'categorycode' => $categorycode ); >+ my ( $template, $loggedinuser, $cookie ) = >+ C4::InstallAuth::get_template_and_user( >+ { >+ template_name => "/onboarding/onboardingstep2.tt", >+ query => $input, >+ type => "intranet", >+ authnotrequired => 0, >+ flagsrequired => >+ { parameters => 'parameters_remaining_permissions' }, >+ debug => 1, >+ } >+ ); > >- my ( $template, $loggedinuser, $cookie ) = >- C4::InstallAuth::get_template_and_user( >- { >- template_name => "/onboarding/onboardingstep2.tt", >- query => $input, >- type => "intranet", >- authnotrequired => 0, >- flagsrequired => >- { parameters => 'parameters_remaining_permissions' }, >- debug => 1, >+ #Once the user submits the page, this code validates the input and adds it >+ #to the database as a new patron category >+ $categorycode = $input->param('categorycode'); >+ my $description = $input->param('description'); >+ my $overduenoticerequired = $input->param('overduenoticerequired'); >+ my $category_type = $input->param('category_type'); >+ my $default_privacy = $input->param('default_privacy'); >+ my $enrolmentperiod = $input->param('enrolmentperiod'); >+ my $enrolmentperioddate = $input->param('enrolmentperioddate') || undef; >+ >+ #Converts the string into a date format >+ if ($enrolmentperioddate) { >+ $enrolmentperioddate = output_pref( >+ { >+ dt => dt_from_string($enrolmentperioddate), >+ dateformat => 'iso', >+ dateonly => 1, >+ } >+ ); > } >- ); > >- #Once the user submits the page, this code validates the input and adds it >- #to the database as a new patron category >- $categorycode = $input->param('categorycode'); >- my $description = $input->param('description'); >- my $overduenoticerequired = $input->param('overduenoticerequired'); >- my $category_type = $input->param('category_type'); >- my $default_privacy = $input->param('default_privacy'); >- my $enrolmentperiod = $input->param('enrolmentperiod'); >- my $enrolmentperioddate = $input->param('enrolmentperioddate') || undef; >- >- #Converts the string into a date format >- if ($enrolmentperioddate) { >- $enrolmentperioddate = output_pref( >+ #Adds a new patron category to the database >+ $category = Koha::Patron::Category->new( > { >- dt => dt_from_string($enrolmentperioddate), >- dateformat => 'iso', >- dateonly => 1, >+ categorycode => $categorycode, >+ description => $description, >+ overduenoticerequired => $overduenoticerequired, >+ category_type => $category_type, >+ default_privacy => $default_privacy, >+ enrolmentperiod => $enrolmentperiod, >+ enrolmentperioddate => $enrolmentperioddate, > } > ); >- } > >- #Adds a new patron category to the database >- $category = Koha::Patron::Category->new( >- { >- categorycode => $categorycode, >- description => $description, >- overduenoticerequired => $overduenoticerequired, >- category_type => $category_type, >- default_privacy => $default_privacy, >- enrolmentperiod => $enrolmentperiod, >- enrolmentperioddate => $enrolmentperioddate, >- } >- ); >+ eval { $category->store; }; > >- eval { $category->store; }; >+ #Error messages >+ if ($category) { >+ $message = 'success_on_insert'; >+ } >+ else { >+ $message = 'error_on_insert'; >+ } > >- #Error messages >- if ($category) { >- $message = 'success_on_insert'; >- } >- else { >- $message = 'error_on_insert'; >+ $template->param( 'message' => $message ); > } >- >- $template->param( 'message' => $message ); >- > #Create a patron > } > elsif ( $step && $step == 3 ) { > my $firstpassword = $input->param('password'); > my $secondpassword = $input->param('password2'); > >+ >+ #Find all patron records in the database and hand them to the template >+ my %currentpatrons = Koha::Patrons->search(); >+ my $currentpatrons = values %currentpatrons; >+ warn $currentpatrons; >+ $template->param( 'patrons' =>$currentpatrons); >+ >+ > #Find all library records in the database and hand them to the template to display in the library dropdown box > my $libraries = > Koha::Libraries->search( {}, { order_by => ['branchcode'] }, ); >@@ -288,11 +280,12 @@ elsif ( $step && $step == 3 ) { > > #Find all patron categories in the database and hand them to the template to display in the patron category dropdown box > my $categories = Koha::Patron::Categories->search(); >- $template->param( categories => $categories, ); >+ $template->param( 'categories' => $categories, ); > > #Incrementing the highest existing patron cardnumber to prevent duplicate cardnumber entry > my $exisiting_cardnumber = my $sth_search = > $dbh->prepare("SELECT MAX(cardnumber) FROM borrowers"); >+ warn $exisiting_cardnumber; > my $new_cardnumber = $exisiting_cardnumber + 1; > warn $new_cardnumber; > $template->param( "newcardnumber" => $new_cardnumber ); >@@ -446,9 +439,6 @@ elsif ( $step && $step == 3 ) { > } > } > elsif ( $step && $step == 4 ) { >- my $createitemtype = $input->param('createitemtype'); >- $template->param( 'createitemtype' => $createitemtype ); >- > my ( $template, $borrowernumber, $cookie ) = > C4::InstallAuth::get_template_and_user( > { >@@ -460,11 +450,11 @@ elsif ( $step && $step == 4 ) { > { parameters => 'parameters_remaining_permissions' }, > debug => 1, > } >- ); >- >- if ( $op eq 'add_validate' ) { >+ ); >+ if ($op eq "add_validate"){ > my $description = $input->param('description'); > my $itemtype_code = $input->param('itemtype'); >+ warn $description; > $itemtype_code = uc($itemtype_code); > > #Create a new itemtype object using the user inputted itemtype and description >@@ -672,8 +662,6 @@ elsif ( $step && $step == 5 ) { > } > } > >- #End new code >- > my $issuingrule = Koha::IssuingRules->find( > { categorycode => $bor, itemtype => $itemtype, branchcode => $br } > ); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/Backupstep3.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/installer/Backupstep3.tt >deleted file mode 100644 >index 3b08fb2..0000000 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/Backupstep3.tt >+++ /dev/null >@@ -1,257 +0,0 @@ >-[% INCLUDE 'doc-head-open.inc' %]<title>Koha › Web installer › Step 3</title> >-[% IF ( finish ) %]<meta http-equiv="refresh" content="10; url=/cgi-bin/koha/mainpage.pl">[% END %] >-[% INCLUDE 'installer-doc-head-close.inc' %] >-<div> >-<h1 id="logo"><img alt="Koha" src="[% interface %]/[% theme %]/img/koha.org-logo.gif" /> Koha web installer › Step 3</h1> >- >-[% IF ( selectframeworks ) %] >- <script type="text/javascript"> >- //<![CDATA[ >- >- var surl = unescape(window.location.pathname); >- >- function doLoad() >- { >- // the timeout value should be the same as in the "refresh" meta-tag >- setTimeout( "refresh()", 2*1000 ); >- } >- >- function refresh(value) >- { >- // The argument to the location.reload function determines >- // if the browser should retrieve the document from the >- // web-server. In our example all we need to do is cause >- // the JavaScript block in the document body to be >- // re-evaluated. If we needed to pull the document from >- // the web-server again (such as where the document contents >- // change dynamically) we would pass the argument as 'true'. >- // >- surl=surl+'?step=3&op=selectframeworks&fwklanguage='+value; >- >- window.location.replace( surl ); >- } >- >- function selectAllFrameworks() >- { >- // A handy short link that selects all available checkboxes >- // on the page. >- // >- var checkboxes = document.getElementsByTagName("input"); >- for (var i = 0; i < checkboxes.length; i++) >- { >- if (checkboxes[i].type == 'checkbox') >- { >- checkboxes[i].checked = true; >- } >- } >- >- // Prevent event propergation. >- return false; >- } >- >- function Hide(link) >- { >- // Toggle the display of a given element on the page. >- // >- subfield = document.getElementById('bloc'+link); >- var initstyle = subfield.style.display; >- if (initstyle == 'block') subfield.style.display = 'none' ; >- if (initstyle == 'none') subfield.style.display = 'block' ; >- } >- >- //]]> >- </script> >-[% END %] >-[% IF ( finish ) %] >- <h1>Congratulations, installation complete</h1> >- <p>If this page does not redirect in 5 seconds, click <a href="/">here</a>.</p> >-[% END %] >-[% IF ( choosemarc ) %] >- <h2 align="center">Select your MARC flavor</h2> >- <form name="frameworkselection" method="post" action="install.pl"> >- <input type="hidden" name="step" value="3" /> >- <input type="hidden" name="op" value="selectframeworks"/> >- <p> >- [% FOREACH flavourloo IN flavourloop %] >- <div> >- [% IF ( flavourloo.checked ) %] >- <input type="radio" name="marcflavour" value="[% flavourloo.code %]" checked="checked" /> [% flavourloo.label %] <br/> >- [% ELSE %] >- <input type="radio" name="marcflavour" value="[% flavourloo.code %]" /> [% flavourloo.label %] <br/> >- [% END %] >- </div> >- [% END %] >- </p> >- <p> Click 'Next' to continue <input value="Next >>" type="submit" /></p> >- </form> >-[% END %] >- >-[% IF ( selectframeworks ) %] >- <h2 align="center">Selecting Default Settings</h2> >- <script type="text/javascript"> >- var linklabel = _("Select all sample data"); >- document.write('<p><a href="#" onclick="return selectAllFrameworks();">'+linklabel+'</a></p>'); >- </script> >- <form name="frameworkselection" method="post" action="install.pl"> >- <input type="hidden" name="step" value="3" /> >- <input type="hidden" name="op" value="addframeworks" /> >- >- [% IF ( frameworksloop ) %] >- <h2>MARC frameworks: [% marcflavour %]</h2> >- [% IF ( en_marc_frameworks ) %] >- <h4><span class="error">No MARC frameworks are available for your language. >- Defaulting to the frameworks supplied for English (en)<span></h4> >- [% END %] >- [% FOREACH frameworksloo IN frameworksloop %] >- <div> >- <h3>[% frameworksloo.label %]</h3> >- [% FOREACH framework IN frameworksloo.frameworks %] >- <table style="border:1px;vertical-align:top;"> >- <tr> >- <td style="vertical-align:top;"> >- [% IF ( framework.checked ) %] >- <input type="checkbox" name="framework" value="[% framework.fwkfile %]" id="[% framework.fwkname %]" checked="checked" /> >- [% ELSE %] >- <input type="checkbox" name="framework" value="[% framework.fwkfile %]" id="[% framework.fwkname %]" /> >- [% END %] >- </td> >- <td> >- <label for="[% framework.fwkname %]"> >- [% framework.fwkdescription %] >- <em>([% framework.fwkname %])</em> >- </label> >- </td> >- </table> >- [% END %] >- </div> >- [% END %] >- <h2>Other data</h2> >- [% END %] >- [% IF ( en_sample_data ) %] >- <h4><span class="error">No sample data and settings are available for your language. >- Defaulting to the samples supplied for English (en)<span></h4> >- [% END %] >- [% FOREACH levelloo IN levelloop %] >- <div> >- <h3>[% levelloo.label %]</h3> >- [% FOREACH framework IN levelloo.frameworks %] >- <table style="border:1px;vertical-align:top;"> >- <tr> >- <td style="vertical-align:top;"> >- [% IF ( framework.checked ) %] >- <input type="checkbox" name="framework" value="[% framework.fwkfile %]" id="[% framework.fwkname %]" /> >- [% ELSE %] >- <input type="checkbox" name="framework" value="[% framework.fwkfile %]" id="[% framework.fwkname %]" /> >- [% END %] >- </td> >- <td> >- <label for="[% framework.fwkname %]"> >- [% framework.fwkdescription %] >- <em>([% framework.fwkname %])</em> >- </label> >- </td> >- </table> >- [% END %] >- </div> >- [% END %] >- <p>When you've made your selections, please click 'Import' below to begin the process. It may take a while to complete, >- please be patient.</p> >- <p><input type="submit" value="Import >>" /> >- </p> >- </form> >-[% END %] >- >- >-[% IF ( addframeworks ) %] >- [% FOREACH lis IN list %] >- <h3>[% lis.level %] data added</h3> >- <ul> >- [% FOREACH fwklis IN lis.fwklist %] >- <li>[% fwklis.fwkname %][% IF ( fwklis.error ) %]<br /><span class="error">[% fwklis.error %]</span>[% END %] </li> >- [% END %] >- </ul> >- [% END %] >- <h3>All done!</h3> >- <p>Installation complete.<br /> >- <p>Click on 'Finish' to complete and load the Koha Staff Interface. >- <form name="finish"> >- <input type="hidden" name="step" value="3" /> >- <input type="hidden" name="op" value="finish" /> >- <input type="submit" value="Finish" /></form> >- </p> >- </p> >-[% END %] >- >- >-[% IF ( importdatastructure ) %] >- [% IF ( error ) %] >- <p>The following error occurred while importing the database structure:</p> >- <p class="error">[% error %] </p> >- <p>Please contact your system administrator</p> >- [% ELSE %] >- <h2 align="center">Success</h2> >- <ul> >- <li>Database tables created</li> >- </ul> >- <form action="install.pl"> >- <input type="hidden" name="step" value="3" /> >- <p> Click 'Next' to continue <input value="Next >>" type="submit" /></p> >- </form> >- [% END %] >-[% END %] >- >- >-[% IF ( proposeimport ) %] >- <p>Now we're ready to create the database tables and fill them with some default data.</p> >- <form action="install.pl"> >- <input type="hidden" name="step" value="3" /> >- <input type="hidden" name="op" value="importdatastructure" /> >- <p> Click 'Next' to continue <input value="Next >>" type="submit" /></p> >- </form> >-[% END %] >- >- >-[% IF ( default ) %] >- [% IF ( upgrading ) %] >- <p> >- We are upgrading from Koha [% dbversion %] to [% kohaversion %], you must <a href="install.pl?step=3&op=updatestructure" class="button">update your database</a> >- </p> >- [% ELSE %] >- <p>We are ready to do some basic configuration. Please install some basic configuration settings to continue the installation: >- <br> >- <br> >- <a href="install.pl?step=3&op=choosemarc" class="button"><button>Install basic configuration settings</button></a> >- </p> >- [% END %] >-[% END %] >- >- >- >-[% IF ( updatestructure ) %] >- <div><h2 align="center">Updating database structure</h2> >- [% IF ( has_update_succeeds ) %] >- <p>Update report :</p> >- <ul> >- [% FOREACH update_repor IN update_report %] >- <li>[% update_repor.line |html %]</li> >- [% END %] >- </ul> >- [% END %] >- [% IF ( has_update_errors ) %] >- <p>Update errors :</p> >- <ul> >- [% FOREACH update_error IN update_errors %] >- <li class="update_error">[% update_error.line |html %]</li> >- [% END %] >- </ul> >- [% END %] >- [% UNLESS ( has_update_errors ) %] >- <p>Everything went OK, update done.</p> >- [% END %] >-<a href="install.pl?step=3&op=finished" class="button">Continue to log in to Koha</a> >- </div> >-[% END %] >- >-</div> >-</body> >-</html> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt >index f186027..4ea9580 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt >@@ -66,7 +66,7 @@ function Hide(link) > > [% IF ( finish ) %] > <h1>Congratulations, installation complete</h1> >- <p>If this page does not redirect in 5 seconds, click <a href="/cgi-bin/koha/installer/onboarding.pl">Start onboarding process</a>.</p> >+ <p>If this page does not redirect in 10 seconds, click <a href="/cgi-bin/koha/installer/onboarding.pl">Start onboarding process</a>.</p> > [% END %] > > >@@ -85,78 +85,78 @@ function Hide(link) > <h2 align="center">Select your MARC flavor</h2> > <p>MARC stands for Machine Readable Cataloging, containing information about a bibliographic record. MARC21 is more commonly used globally, whereas UNIMARC tends to be used in Europe. </p> > >- <p> > [% FOREACH flavourloo IN flavourloop %] > <div> > [% IF ( flavourloo.label == "Unimarc") %] >- <input type="radio" name="marcflavour" value="[% flavourloo.code %]" /> [% flavourloo.label %] <br/> >+ <input type="radio" name="marcflavour" value="[% flavourloo.code %]" /> [% flavourloo.label %]<br/> > [% ELSE %] > <input type="radio" name="marcflavour" value="[% flavourloo.code %]" checked="checked" /> [% flavourloo.label %] <br/> > [% END %] > </div> > [% END %] > >- </p> > <p>Click 'Next' to continue <input value="Next >>" type="submit" /></p> > > </form> > > [% END %] > >- > [% IF ( selectframeworks ) %] >- <h2 align= "center"> [% setup %] setup</h2> >- <h2 align="center">Selecting Default Settings</h2> >- >- <script type="text/javascript"> >- var linklabel = _("Select all options"); >- document.write('<p><a href="#" onclick="return selectAllFrameworks();"><button>'+linklabel+'</button></a></p>'); >- </script> >- <form name="frameworkselection" method="post" action="install.pl"> >- <input type="hidden" name="step" value="3" /> >- <input type="hidden" name="op" value="addframeworks" /> >- >+ <h2 align= "center"> [% setup %] setup</h2> >+ <h2 align="center">Selecting Default Settings</h2> >+ >+ [% IF setup == "Advanced" %] >+ <script type="text/javascript"> >+ var linklabel = _("Select all options"); >+ document.write('<p><a href="#" onclick="return selectAllFrameworks();"><button>'+linklabel+'</button></a></p>'); >+ </script> >+ [% END %] >+ <form name="frameworkselection" method="post" action="install.pl"> >+ <input type="hidden" name="step" value="3" /> >+ <input type="hidden" name="op" value="addframeworks" /> > [% IF ( frameworksloop ) %] >- <h2>MARC frameworks: [% marcflavour %]</h2> >- [% IF ( en_marc_frameworks ) %] >- <h4><span class="error">No MARC frameworks are available for your language. >- Defaulting to the frameworks supplied for English (en)<span></h4> >- [% END %] >- [% FOREACH frameworksloo IN frameworksloop %] >- <div> >- <h3>[% frameworksloo.label %]</h3> >- [% FOREACH framework IN frameworksloo.frameworks %] >- <table style="border:1px;vertical-align:top;"> >- <tr> >- <td style = "border:1px; vertical-align:top;"> >- [% IF (frameworksloo.label == "Default") && (setup=="Basic") %] >- <input type="hidden" name="framework" value="[% framework.fwkfile %]" id =="[%framework.fwkname%]" /> >- [% ELSE %] >- <input type="checkbox" name="framework" value="[% framework.fwkfile %]" id =="[%framework.fwkname%]" /> >- [% END %] >- </td> >- <td> >- [% IF (frameworksloo.label == "Default") && (setup=="Basic") %] >- <ul> >- <label for="[% framework.fwkname %]"> >- <li> [% framework.fwkdescription %]</li> >- <em>([% framework.fwkname %])</em> >- </label> >- </ul> >- </td> >- [% ELSE %] >- <td> >- <label for= "[% framework.fwkname %]"> >- [% framework.fwkdescription %] >- <em>([% framework.fwkname %])</em> >- </label> >- </td> >+ <h2>MARC frameworks: [% marcflavour %]</h2> >+ [% IF ( en_marc_frameworks ) %] >+ <h4><span class="error">No MARC frameworks are available for your language. >+ Defaulting to the frameworks supplied for English (en)<span></h4> >+ [% END %] >+ [% FOREACH frameworksloo IN frameworksloop %] >+ <div> >+ <h3>[% frameworksloo.label %]</h3> >+ [% FOREACH framework IN frameworksloo.frameworks %] >+ <table style="border:1px;vertical-align:top;"> >+ <tr> >+ <td style = "border:1px; vertical-align:top;"> >+ [% IF (frameworksloo.label == "Default") && (setup=="Basic") %] >+ <input type="hidden" name="framework" value="[% framework.fwkfile %]" id ="[%framework.fwkname%]" /> >+ [% ELSE %] >+ <input type="checkbox" name="framework" value="[% framework.fwkfile %]" id ="[%framework.fwkname%]" /> >+ [% END %] >+ </td> >+ <td> >+ [% IF (frameworksloo.label == "Default") && (setup=="Basic") %] >+ <ul> >+ <li> >+ <label for="[% framework.fwkname %]"> >+ [% framework.fwkdescription %] >+ <em>([% framework.fwkname %])</em> >+ </label> >+ </li> >+ </ul> >+ </td> >+ [% ELSE %] >+ <td> >+ <label for= "[% framework.fwkname %]"> >+ [% framework.fwkdescription %] >+ <em>([% framework.fwkname %])</em> >+ </label> >+ </td> >+ [% END %] >+ </tr> >+ </table> >+ [% END %] >+ </div> > [% END %] >- </tr> >- </table> >- [% END %] >- </div> >- [% END %] > <h2>Other data</h2> > [% END %] > [% IF ( en_sample_data ) %] >@@ -164,39 +164,49 @@ function Hide(link) > Defaulting to the samples supplied for English (en)<span></h4> > [% END %] > [% FOREACH levelloo IN levelloop %] >- <div> >- <h3>[% levelloo.label %]</h3> >- [% FOREACH framework IN levelloo.frameworks %] >- <table style="border:1px;vertical-align:top;"> >- <tr> >- <td style="vertical-align:top;"> >- [% IF (levelloo.label == "Default" ) && (setup=="Basic")%] >- <input type="hidden" name="framework" value="[% framework.fwkfile %]" id="[%framework.fwkname %]" /> >- [% ELSE %] >- <input type="checkbox" name="framework" value="[%framework.fwkfile %]" id=="[%framework.fwkname%]"/> >+ <div> >+ <h3>[% levelloo.label %]</h3> >+ >+ [% IF (setup == "Basic" && levelloo.label == "Optional") %] >+ <script type="text/javascript"> >+ var linklabel = _("Select all options"); >+ document.write('<p><a href="#" onclick="return selectAllFrameworks();"><button>'+linklabel+'</button></a></p>'); >+ </script> > [% END %] >- </td> >- <td> >- [% IF (levelloo.label == "Default") && (setup=="Basic")%] >- <ul> >- <label for="[% framework.fwkname %]"> >- <li> [% framework.fwkdescription %]</li> >- <em>([% framework.fwkname %])</em> >- </label> >- </ul> >- </td> >- [% ELSE %] >- <td> >- <label for= "[% framework.fwkname %]"> >- [% framework.fwkdescription %] >- <em>([% framework.fwkname %])</em> >- </label> >- </td> >+ >+ [% FOREACH framework IN levelloo.frameworks %] >+ <table style="border:1px;vertical-align:top;"> >+ <tr> >+ <td style="vertical-align:top;"> >+ [% IF (levelloo.label == "Default" ) && (setup=="Basic")%] >+ <input type="hidden" name="framework" value="[% framework.fwkfile %]" id="[%framework.fwkname %]" /> >+ [% ELSE %] >+ <input type="checkbox" name="framework" value="[%framework.fwkfile %]" id="[%framework.fwkname%]"/> >+ [% END %] >+ </td> >+ <td> >+ [% IF (levelloo.label == "Default") && (setup=="Basic")%] >+ <ul> >+ <li> >+ <label for="[% framework.fwkname %]"> >+ [% framework.fwkdescription %] >+ <em>([% framework.fwkname %])</em> >+ </label> >+ </li> >+ </ul> >+ </td> >+ [% ELSE %] >+ <td> >+ <label for= "[% framework.fwkname %]"> >+ [% framework.fwkdescription %] >+ <em>([% framework.fwkname %])</em> >+ </label> >+ </td> >+ [% END %] >+ </tr> >+ </table> > [% END %] >- </tr> >- </table> >- [% END %] >- </div> >+ </div> > [% END %] > <p>When you've made your selections, please click 'Import' below to begin the process. It may take a while to complete, > please be patient.</p> >@@ -217,11 +227,11 @@ function Hide(link) > [% END %] > <h3>All done!</h3> > <p>Installation complete.<br /> >- <p>Click on 'Set Koha version system preference' to complete and load the Koha onboarding tool. >+ <p>Click on 'Set up Koha with the onboarding tool' to complete and load the Koha onboarding tool. > <form name="finish"> > <input type="hidden" name="step" value="3" /> > <input type="hidden" name="op" value="finish" /> >- <input type="submit" value="Set Koha version system preference"/> >+ <input type="submit" value="Set up Koha with the onboarding tool"/> > </form> > </p> > </p> >@@ -255,7 +265,6 @@ function Hide(link) > </form> > [% END %] > >- > [% IF ( default ) %] > [% IF ( upgrading ) %] > <p> >@@ -272,8 +281,6 @@ function Hide(link) > [% END %] > [% END %] > >- >- > [% IF ( updatestructure ) %] > <div><h2 align="center">Updating database structure</h2> > [% IF ( has_update_succeeds ) %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep0.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep0.tt >deleted file mode 100644 >index eaa2f8e..0000000 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep0.tt >+++ /dev/null >@@ -1,18 +0,0 @@ >-<!-- Includes for creating library--> >-[% INCLUDE 'doc-head-open.inc' %] >-[% INCLUDE 'installer-doc-head-close.inc' %] >- >-<head> >-<title>Welcome › to › Koha</title> >-</head> >- >- <!--Header for the koha onboarding tool--> >-<div> >- <h1 align="center"> Welcome to Koha</h1> >- <h1 id="logo"><img alt="Koha" style="width:50%;margin:auto;display:block;align:center;" src="[% interface %]/[% theme %]/img/koha.org-logo.gif"/></h1> >- <h2 align="center"> We're just going to set up a few more things...</h2> >- <form name="startkoha" method="post" action="onboarding.pl"> >- <input type="hidden" name="step" value="1"/> >- <input type="submit" name="start" value="Start setting up my Koha"/> >- </form> >-</div> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep1.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep1.tt >index 0331960..18cff8c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep1.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep1.tt >@@ -1,35 +1,29 @@ > <!--Includes for creating library--> > [% INCLUDE 'doc-head-open.inc' %] >+<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" /> > [% INCLUDE 'installer-doc-head-close.inc' %] >+[% INCLUDE 'datatables.inc' %] > >-<head> >-<title>Welcome › to › Koha</title> >-</head> >+[% IF (libraries && libraries.count > 1) %] >+ <meta http-equiv="refresh" content="0; url=/cgi-bin/koha/installer/onboarding.pl?step=2"> > >-<!--Header for the koha onboarding tool--> >-<div> >- <h1 align="center"> Welcome to Koha</h1> >- <h1 id="logo"><img alt="Koha" style="width:50%;margin:auto;display:block;align:center;" src="[% interface %]/[% theme %]/img/koha.org-logo.gif"/></h1> >-</div> >- [% IF (libraries && libraries.count > 0) %] >- <br> >- <h3 align="left">You do not need to create a library as you have already installed the sample library data previously</h3> >- <form name="skiplibrary" method="post" action="onboarding.pl"> >- <input type="hidden" name="step" value="2"/> >- <div> >- <input type="submit" name="start" value="Minimal patron category setup"/> >- </div> >- </form> >+[% ELSIF (op == "add_validate_library") %] >+ <head> >+ <title>Welcome › to › Koha</title> >+ </head> > >- <!--Create a library screen 2--> >-[% ELSIF (createlibrary) %] >- <!--New Library created--> >+ <!--Header for the koha onboarding tool--> >+ <div> >+ <h1 id="logo"><img alt="Koha" src="[% interface %]/[% theme %]/img/koha.org-logo.gif"/> Welcome to Koha</h1> >+ </div> >+ >+<!--New Library created--> > [% IF message == "success_on_insert" %] >- <form name="createlibrary" method="post" action="onboarding.pl"> >+ <form name="createlibrary" method="post" action="onboarding.pl" > > <input type="hidden" name="step" value="2"/> >- <h1 align="left"> New Library</h1> >+ <h1 align="left"> New library</h1> > <div> >- <p> Success: Library created! >+ <p> Success: library created! > </p> > <p> To add another library and for more settings, <br> > go to:<br> >@@ -53,12 +47,21 @@ > [%END%] > > [% ELSE %] >+ <head> >+ <title>Welcome › to › Koha</title> >+ </head> >+ >+ <!--Header for the koha onboarding tool--> >+ <div> >+ <h1 id="logo"><img alt="Koha" src="[% interface %]/[% theme %]/img/koha.org-logo.gif"/> Welcome to Koha</h1> >+ </div> >+ > <!--Create a library screen 1--> >- <h2>Create a Library</h2> > <form name="LibraryCreation" method="post" action="onboarding.pl"> >- <fieldset class="rows"> >+ <fieldset class="rows" > >+ <h2>Create a library</h2> > <input type="hidden" name="step" value="1"/> >- <input type="hidden" name="createlibrary" value="createlibrary"/> >+ <input type="hidden" name="op" value="add_validate_library"/> > <ol> > <li> > <label for="branchcode" class="required">Library code: </label> >@@ -71,8 +74,8 @@ > <span class="required">Required</span> > </li> > </ol> >- </fieldset> > <br> > <input type="submit" class="action" value="Submit"/> >+ </fieldset> > </form> > [% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep2.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep2.tt >index 3ba72a5..453d96a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep2.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep2.tt >@@ -267,30 +267,24 @@ $(document).ready(function() { > </script> > </head> > >-<div> <!-- Header that appears at the top of every screen in the koha onboarding tool--> >- <h1 align="center"> Welcome to Koha</h1> >- <h1 id="logo"><img alt="Koha" style="width:50%;margin:auto;display:block;align:center;" src="[% interface %]/[% theme %]/img/koha.org-logo.gif"/></h1> >-</div> >+[% IF (categories && categories.count > 1 ) %] <!--This if statement checks if the categories variable handed to this template by onboarding.pl has data in it. If the categories variable does have data in it this means that the user has previously imported sample patron category data and so we do not need to show them the create patron category screen 1, instead we can display a screen with ubtton redirecting the user to step 3--> > > >-[% IF (categories && categories.count > 0) %] <!--This if statement checks if the categories variable handed to this template by onboarding.pl has data in it. If the categories variable does have data in it this means that the user has previously imported sample patron category data and so we do not need to show them the create patron category screen 1, instead we can display a screen with ubtton redirecting the user to step 3--> >-<br> >- <h3 align="left">You do not need to create a patron category as you have already installed the sample patron categories data previously</h3> >- <form name="skippatroncategory" method="post" action="onboarding.pl"> >- <input type="hidden" name="step" value="3"/> >- <div> >- <input type="submit" name="start" value="Add a patron"/> >- </div> >- </form> >+ <meta http-equiv="refresh" content="0; url=/cgi-bin/koha/installer/onboarding.pl?step=3"> > >+[% ELSIF (op == "add_validate_category") %] > <!--else if the user has not previously imported sample patron categories check if the user has pressed the button name="add_validate" in the create patron category screen 1, and if they have pressed that button then display the below screen with a button to redirect the user to step 3--> >-[% ELSIF createcat %] >+ >+ <div> <!-- Header that appears at the top of every screen in the koha onboarding tool--> >+ <h1 id="logo"><img alt="Koha" src="[% interface %]/[% theme %]/img/koha.org-logo.gif"/> Welcome to Koha</h1> >+ </div> >+ > [% IF message != "error_on_insert" %] > <form name="createcat" method="post" action="onboarding.pl"> > <input type="hidden" name="step" value="3"/> > <h1 align="left"> New patron category</h1> > <div> >- <p> Success: Patron category created! </p> >+ <p> Success: patron category created! </p> > <p> To add another patron category and for more settings<br> > go to:<br> > More -> Administration -> Patron categories<br> >@@ -303,7 +297,7 @@ $(document).ready(function() { > Message is [% message %] > <input type="hidden" name="step" value="2"/> > <h1 align="left">Failed</h1> >- <div>Patron Category was not successfully created.</br> >+ <div>Patron category was not successfully created.</br> > Please try again or contact your system administrator.</p> > </div> > <input type="submit" value="Try again"/> >@@ -312,11 +306,16 @@ $(document).ready(function() { > > > [% ELSE %] <!--Else display create patron category screen 1 where the user can input values to create their first patron category--> >- <h1 align="left"> Create a new Patron Category</h1> >+ <div> <!-- Header that appears at the top of every screen in the koha onboarding tool--> >+ <h1 id="logo"><img alt="Koha" src="[% interface %]/[% theme %]/img/koha.org-logo.gif"/> Welcome to Koha</h1> >+ </div> >+ >+ <h1 align="left"> Create a new patron category</h1> >+ <p> The patron category you create in this form is going to be the one which the new administrator patron account will have.</p> > <form id="category_form" method="post" action="onboarding.pl"> > <fieldset class="rows"> > <input type="hidden" name="step" value="2"/> >- <input type="hidden" name="createcat" value="createcat" /> >+ <input type="hidden" name="op" value="add_validate_category" /> > <ol> > <li> > <label for="categorycode" class="required">Category code: </label> >@@ -361,7 +360,7 @@ $(document).ready(function() { > [% SET default_privacy = 'default' %] > > [% IF category %] >- [% SET default_privacy = category.default_privacy %] >+ [% SET default_privacy = category.default_privacy %] > [% END %] > > [% SWITCH default_privacy %] >@@ -381,7 +380,7 @@ $(document).ready(function() { > </select> > <p>Controls how long a patrons checkout history is kept for new patrons of this category. "Never" anonymizes checkouts on return, and "Forever" keeps a patron's checkout history indefinitely. When set to "Default", the amount of history kept is controlled by the cronjob <i>batch_anonymise.pl</i> which should be set up by your system administrator.</p> > </li> >- >+ </ol> > <span class="label">Enrolment period: </span> > </br> > <fieldset> >@@ -389,7 +388,7 @@ $(document).ready(function() { > <ol> > <li> > <label for="enrolmentperiod" style="width:6em;">In months: </label> >- <input type="number" min="0" class="enrolmentperiod" name="enrolmentperiod" id="enrolmentperiod" size="3" maxlength="3" value="[% IF category.enrolmentperiod %][% category.enrolmentperiod %][% END %]" /> months >+ <input type="number" class="enrolmentperiod" name="enrolmentperiod" id="enrolmentperiod" size="3" maxlength="3" value="[% IF category.enrolmentperiod %][% category.enrolmentperiod %][% END %]" /> months > </li> > <li> > <label for="enrolmentperioddate" style="width:6em;">Until date: </label> >@@ -399,6 +398,7 @@ $(document).ready(function() { > </fieldset> > <br> > <input type="submit" class="action" value="Submit" /> >+ </fieldset> > </form> > [% END %] > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep3.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep3.tt >index 171601a..e9e56bb 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep3.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep3.tt >@@ -9,10 +9,10 @@ > [% INCLUDE 'datatables.inc' %] > > <head> >-<title>Create Patron</title> >+<title>Create Koha administrator patron</title> > > <!--jQuery scripts for creating patron--> >-<script type-"text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.fixFloat.js"></script> >+<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.fixFloat.js"></script> > > <script type="text/javascript"> > var MSG_CATEGORYCODE_CHARS=(_("Please only enter letters into this field.")); >@@ -34,6 +34,28 @@ jQuery.validator.addMethod( "password_match", function(value,element){ > }, MSG_PASSWORD_MISMATCH > ); > >+jQuery.validator.addMethod( "letters_only", function(value,element){ >+ var patt =/^[a-zA-Z ]+$/g; >+ if (patt.test(element.value)){ >+ return true; >+ } else { >+ return false; >+ } >+ }, MSG_DESCRIPTION_LETTERS_ONLY >+); >+ >+ >+jQuery.validator.addMethod( "cardnumber_check", function(value,element){ >+ var patt =/[A-Za-z1-9 ]+$/g; >+ if (patt.test(element.value)){ >+ return true; >+ } else { >+ return false; >+ } >+ }, MSG_CARDNUMBER_LETTERS_NUMBERS_ONLY >+); >+ >+ > > > $(document).ready(function(){ >@@ -41,14 +63,35 @@ $(document).ready(function(){ > $("#Submit").click(function(){ > $("#createpatron").validate({ > rules: { >- password: { >+ surname: { >+ required: true, >+ letters_only: true >+ }, >+ firstname: { >+ required: true, >+ letters_only: true >+ }, >+ cardnumber: { >+ required: true, >+ cardnumber_check: true >+ }, >+ password: { > password_match:true > } > }, > messages: { >- password: { >+ surname: { >+ required: MSG_DESCRIPTION_LETTERS_ONLY >+ }, >+ firstname: { >+ required: MSG_DESCRIPTION_LETTERS_ONLY >+ }, >+ cardnumber: { >+ required: MSG_CARDNUMBER_LETTERS_NUMBERS_ONLY >+ }, >+ password: { > required: MSG_PASSWORD_MISMATCH >- }, >+ }, > } > > }); >@@ -58,8 +101,7 @@ $(document).ready(function(){ > </head> > > <div> >- <h1 align="center"> Welcome to Koha</h1> >- <h1 id="logo"><img alt="Koha" style="width:50%;margin:auto;display:block;align:center;" src="[% interface %]/[% theme %]/img/koha.org-logo.gif"/></h1> >+ <h1 id="logo"><img alt="Koha" src="[% interface %]/[% theme %]/img/koha.org-logo.gif"/> Welcome to Koha</h1> > </div> > > >@@ -97,9 +139,9 @@ $(document).ready(function(){ > <!--New patron created--> > <form name="patrondone" method="post" action="onboarding.pl"> > <input type="hidden" name="step" value="4"/> >- <h1 align="left"> New Patron </h1> >+ <h1 align="left"> Koha administrator patron </h1> > <div> >- <p> Success: New patron created!</p> >+ <p> Success: administrator patron created!</p> > <p> To create another patron, go to Patrons -> New Patron. <br> > More -> Set Permissions in a user page to gain superlibrarian permissions. > </div> >@@ -108,8 +150,7 @@ $(document).ready(function(){ > </form> > [% ELSE %] > <!--Create a patron screen 1--> >- <h1 align="left"> Create a new Patron</h1> >- <legend id="library_management_lgd">Library Management</legend> >+ <h1 align="left"> Create koha administrator patron</h1> > <p> > Now we will create a patron with superlibrarian permissions. Login with this to access Koha as a staff member will all permissions. > </p> >@@ -117,17 +158,16 @@ $(document).ready(function(){ > <fieldset class="rows"> > <input type="hidden" name="step" value="3"/> > <input type="hidden" name="op" value="add_validate" /> >- <legend id="library_management_lgd">Library Management</legend> >+ <legend id="library_management_lgd">Library management</legend> > <ol> >- <h3>Patron Identity</h3> >+ <h3>Patron identity</h3> > <li> > <label for="surname" class="required">Surname: </label> >- > <input type="text" pattern="[a-zA-Z- ]+" title="Please only enter letters in the surname field" id="surname" name="surname" value="[% surname %]" class="required" required="required" /> > <span class="required">Required</span> > </li> > <li> >- <label for="firstname" class="required">First Name: </label> >+ <label for="firstname" class="required">First name: </label> > <input type="text" pattern="[a-zA-Z ]+" title="Please only enter letters in the firstname field" name="firstname" id="firstname" size="20" value="[% firstname |html %]" class="required" required="required"> > <span class="required">Required</span> > </li> >@@ -135,12 +175,17 @@ $(document).ready(function(){ > > <ol> > <li> >- <label for="cardnumber" class="required">Card Number: </label> >- <input type="number" min="[% newcardnumber %]" pattern="[1-9]+" title="Please only enter numbers into the card number field" id="cardnumber" class="noEnterSubmit valid" name="cardnumber" maxlength="[%maxlength_cardnumber%]" minlength="[%minlength_cardnumber%]" value="[% newcardnumber %]" class="required" required="required"> >+ <label for="cardnumber" class="required">Card number: </label> >+ [% IF patrons && patrons > 1 %] >+ <input type="text" pattern="[A-Za-z1-9 ]+" title="Please only enter letters and numbers into the card number field" id="cardnumber" class="noEnterSubmit valid" name="cardnumber" value="[% newcardnumber %]" class="required" required="required"> >+ [% ELSE %] >+ <input type="text" pattern="[A-Za-z1-9 ]+" title="Please only enter letters and numbers into the card number field"id="cardnumber" name="cardnumber" value="[% cardnumber %]" class="required" required="required"> >+ [% END %] > <span class="required">Required</span> > </li> > <li> >- <!--require a foreach loop to get all the values for the library that the user has either imported (in web installer) or created in the first step of this onboarding tool--> >+ >+ <!--require a foreach loop to get all the values for the library that the user has either imported (in web installer) or created in the first step of this onboarding tool--> > <label for="libraries" class="required"> Library: </label> > <select name="libraries" size="1" id="libraries"> > >@@ -152,19 +197,19 @@ $(document).ready(function(){ > <span class="required"> Required</span> > </li> > <li> >- <label for="categorycode_entry" class="required"> Patron Category</label> >+ <label for="categorycode_entry" class="required"> Patron category</label> > <select id="categorycode_entry" name="categorycode_entry" onchange="update_category_code(this);"> > [% FOREACH category IN categories %] > <option name="categorycode_entry" value = "[% category.categorycode %]">[%category.description %]</option> > [% END %] > </select> > <span class="required">Required</span><br><br> >- <b>Note:</b> If you installed sample patron categories please select the "Staff" option in the Patron Categories dropdown box. >+ <b>Note:</b> If you installed sample patron categories please select the "Staff" option in the patron categories dropdown box. > </li> > </ol> > > <ol> >- <h3> Patron permissions</h3> >+ <h3> Koha administrator patron permissions</h3> > <input type="hidden" name="newflags" value="1"/> > <li> > <input type="hidden" class="flag parent" id="flag-0" name="flag" value="superlibrarian"/> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep4.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep4.tt >index a970e4b..8f4780e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep4.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep4.tt >@@ -1,82 +1,68 @@ >-<!--Includes for creating item type--> >+<!-- includes for creating item type--> > [% INCLUDE 'doc-head-open.inc' %] >- >-[% IF ( finish ) %]<meta http-equiv="refresh" content="10; url=/cgi-bin/koha/mainpage.pl">[% END %] >+[% IF ( finish ) %]<meta http-equiv="refresh" content="10; url=/cgi-bin/koha/mainpage.pl">[% END%] > [% INCLUDE 'installer-doc-head-close.inc' %] >- > <head> >-<title>Create item type</title> >- >-<!--jQuery scripts for creating item type--> >- >- >- >+ <title>Create item type</title> > </head> >- > <div> >- <h1 align="center"> Welcome to Koha</h1> >- <h1 id="logo"><img alt="Koha" style="width:50%;margin:auto;display:block;align:center;" src="[% interface %]/[% theme %]/img/koha.org-logo.gif"/></h1> >+ <h1 id="logo"><img alt="Koha" src="[% interface %]/[% theme %]/img/koha.org-logo.gif"/> Welcome to Koha</h1> > </div> > >-[% IF (itemtypes && itemtypes.count > 0) %] >- <br> >- <h3 align="left">You do not need to create a item type as you have already installed the sample item type data previously</h3> >- <form name="skipitemtype" method="post" action="onboarding.pl"> >- <input type="hidden" name="step" value="5"/> >- <div> >- <input type="submit" name="start" value="Add a circulation rule"/> >- </div> >- </form> >+[% IF (itemtypes && itemtypes.count >1) %] > >+ <meta http-equiv="refresh" content="0; url=/cgi-bin/koha/installer/onboarding.pl?step=5"> > >-<!--Create a item type screen 2--> > [% ELSIF op == "add_validate" %] >- <!--New item type created--> > [% IF message != "error_on_insert" %] > <form name="createitemtype" method="post" action="onboarding.pl"> > <input type="hidden" name="step" value="5"/> > <h1 align="left"> New Item type </h1> >- > <div> > <p> Success: New item type created!</p> >- <p> To create another item type later and for more setttings <br> >+ <p> To create another item type later and for more settings <br> > go to: <br> > More -> Administration -> Item types <br> > </div> >- Next up: >- <input type="submit" value="Add a circulation rule"/> >+ Next up: >+ <input type="submit" value="Add a circulation rule"/> > </form> > [% ELSE %] >- <form name="retryitem" method="post" action="onboarding.pl"> >- <input type="hidden" name="step" value="4"/> >- <h1 align="left">Failed </h1> >- <div> >- <p>Item type was not successfully created. </br> >- Please try again or contact your system administrator. </p> >- </div> >- </form> >- <!--Implement a if statement to check if the item type was successfully created or not >---> [% END %] >+ <form name="retryitem" method="post" action="onboarding.pl"> >+ <input type="hidden" name="step" value="4"/> >+ <h1 align="left">Failed </h1> >+ <div> >+ <p>Item type was not successfully created. </br> >+ Please try again or contact your system administrator. >+ </p> >+ </div> >+ </form> >+ <!--Implement a if statement to check if the item type was successfully created or not --> >+ [% END %] > [% ELSE %] >-<!--Create a item type screen 1--> >- <h1 align="left"> Create a new Item type </h2> >+ <!--Create a item type screen 1--> >+ <h1 align="center"> Create a new Item type </h1> >+ <p> Item types are used to group related items. Examples of item types are books, cds, and DVDs. <br><br> When adding to your institutions catalogue you will create an item of a particular item type. <br><br> Importantly item types are what you apply circulation rules to. Circulation rules govern how your institution will lend its items, for example a circulation rule applied to the DVD item type may enforce a payment of $1.00 for borrowing any DVD.</p> > <form name="createitemform" method="post" action="onboarding.pl"> > <fieldset class="rows"> >- <input type="hidden" name="step" value="4"/> >- <input type="hidden" name="op" value="add_validate" /> >- <ol> >- <li> >- <label for="itemtype" class="required">Item type code: </label> >- <input type="text" name="itemtype" pattern="^[A-Za-z]{0,10}$" title="Please enter either 2 or 3 capital letters as the item type" id="itemtype" size="10" maxlength="10" class="required" required="required" /> >- <span class="required">Required</span> >- </li> >- <li> >- <label for="description" class="required">Description: </label> >- <input type="text" name="description" pattern="[A-Za-z1-9 ]+" title="Please only enter letters or numbers into this item type description" id="description" size="42" value="[% itemtype.description |html %]" class="required" required="required"> >- <span class="required">Required</span> >- </li> >- </ol> >- </fieldset><br> >- <input type="submit" class="action" value="Submit"/> >- </form> >+ <input type="hidden" name="step" value="4"/> >+ <input type="hidden" name="op" value="add_validate" /> >+ <ol> >+ <li> >+ <label for="itemtype" class="required">Item type code: </label> >+ <input type="text" name="itemtype" pattern="^[A-Za-z]{0,10}$" title="Please enter either 2 or 3 capital letters as the item type" id="itemtype" size="10" maxlength="10" class="required" required="required" /> >+ <span class="required">Required</span> >+ </li> >+ >+ <li> >+ <label for="description" class="required">Description: </label> >+ <input type="text" name="description" pattern="[A-Za-z1-9 ]+" title="Please only enter letters or numbers into this item type description" id="description" size="42" value="[% itemtype.description |html %]" class="required" required="required"> >+ <span class="required">Required</span> >+ </li> >+ </ol> >+ <br> >+ <input type="submit" class="action" value="Submit"/> >+ </fieldset> >+ </form> > [% END %] >+ >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep5.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep5.tt >index a57e2f5..1142124 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep5.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep5.tt >@@ -3,10 +3,8 @@ > [% IF ( finish ) %]<meta http-equiv="refresh" content="10; url=/cgi-bin/koha/mainpage.pl">[% END %] > [% INCLUDE 'installer-doc-head-close.inc' %] > >-</head> > <div> >- <h1 align="center"> Welcome to Koha</h1> >- <h1 id="logo"><img alt="Koha" style="width:50%;margin:auto;display:block;align:center;" src="[% interface %]/[% theme %]/img/koha.org-logo.gif"/></h1> >+ <h1 id="logo"><img alt="Koha" src="[% interface %]/[% theme %]/img/koha.org-logo.gif"/> Welcome to Koha</h1> > </div> > > [% IF (finish) %] >@@ -20,9 +18,9 @@ > <!--New circulation rule created--> > <form name="finish" method="post" action="onboarding.pl"> > <input type="hidden" name="op" value="finish" /> >- <h1 align="left"> New Circulation rule </h1> >+ <h1 align="left"> New circulation rule </h1> > <div> >- <p> Success: New circulation rule created!</p> >+ <p> Success: circulation rule created!</p> > <p> To create circulation rule, go to <br> > More -> Administration -> Circulation and Fine Rules > </div> >@@ -31,7 +29,7 @@ > </form> > [% ELSE %] > <!--Create a circulation rule screen 1--> >- <h1 align="left"> Create a new Circulation rule </h1> >+ <h1 align="left"> Create a new circulation rule </h1> > <form name="createcirculationrule" method="post" action="onboarding.pl"> > <fieldset class="rows"> > <input type="hidden" name="step" value="5"/> >@@ -39,30 +37,32 @@ > <ol> > <li> > <label for="branch" class="required"> Library branch</label> >- <select name="branch" id="branch" required="required"> >- <option value="*">All</option> >+ <select name="branch" id="branchname" required="required"> >+ <option value""> Choose</option> >+ <option value="*" selected="selected">All</option> > [% FOREACH library IN libraries %] >- <option name="branch" value="[% library.branchcode %]"> [% library.branchname %]</option> >+ <option id="branch" value="[% library.branchcode %]"> [% library.branchname %]</option> > [% END %] > </select> > <span class="required">Required</span> > </li> > <li> >- <label for="categorycode" class="required">Patron Category: </label> >- <select name="categorycode" id="categorycode" required="required" onchange = "update_categorycode(this);"> >- <!-- <option name="categorycode" value="All">All--> >- <option value="*">All</option> >- [% FOREACH category IN categories %] >- <option name="categorycode" value = "[% category.categorycode %]"> [%category.description %]</option> >- [%END%] >- </select> >+ <label for="categorycode" class="required">Patron category: </label> >+ <select name="categorycode" id="categorycodeselection" required="required" onchange = "update_categorycode(this);"> >+ <option value=""> Choose</option> >+ <option value="*" selected="selected">All</option> >+ [% FOREACH category IN categories %] >+ <option id="categorycode" value = "[% category.categorycode %]"> [%category.description %]</option> >+ [%END%] >+ </select> > <span class="required">Required</span> > </li> > > <li> > <label for="itemtype"> Item type: </label> > <select id="itemtype" name="itemtype" required="required"> >- <option value="*">All</option> >+ <option value""> Choose </option> >+ <option value="*" selected="selected">All</option> > [% FOREACH item IN itemtypes %] > <option name="itemtype" value = "[% item.itemtype %]"> [% item.itemtype %] > [%END%] >@@ -71,18 +71,19 @@ > </li> > <li> > <label for="maxissueqty" class="required">Current checkouts allowed: </label> >- <input type="number" min="0" name="maxissueqty" pattern="[1-9]+" title="Please only enter numbers" id="maxissueqty" size="10" maxlength="10" value="" class="required" required="required" /> >+ <input type="number" min="0" name="maxissueqty" title="Please only enter numbers" id="maxissueqty" size="10" max="10" value="" class="required" required="required" /> > <span class="required">Required</span> > </li> > > <li> >- <label for="issuelength" class="required">Loan Period: </label> >- <input type="number" min="0" name="issuelength" pattern="[1-9]+" title="Please only enter numbers" id="issuelength" size="10" maxlength="10" value="" class="required" required="required" /> >+ <label for="issuelength" class="required">Loan period: </label> >+ <input type="number" min="0" name="issuelength" title="Please only enter numbers" id="issuelength" size="10" max="10" value="" class="required" required="required" /> > <span class="required">Required</span> > </li> > <li> > <label for="lengthunit">Units: </label> > <select name="lengthunit" id="lengthunit" required="required"> >+ <option value=""> Choose </option> > [% SET units = 'days' %] > [% IF category %] > [% SET default_privacy = category.default_privacy %] >@@ -99,20 +100,21 @@ > </select> > </li> > <li> >- <label for="renewalsallowed" class="required">Renewals Allowed: </label> >- <input type="number"min="0" name="renewalsallowed" pattern="[1-9]+" title="Please only enter numbers" id="renewalsallowed" size="10" maxlength="10" value="" class="required" required="required" /> >+ <label for="renewalsallowed" class="required">Renewals allowed: </label> >+ <input type="number" min="0" name="renewalsallowed" title="Please only enter numbers" id="renewalsallowed" size="10" max="10" value="" class="required" required="required" /> > <span class="required">Required</span> > </li> > > <li> >- <label for="renewalperiod" class="required">Renewals Period: </label> >- <input type="number" min="0"name="renewalperiod" pattern="[1-9]+" title="Please only enter numbers" id="renewalperiod" size="10" maxlength="10" value="" class="required" required="required" /> >+ <label for="renewalperiod" class="required">Renewals period: </label> >+ <input type="number" min="0" name="renewalperiod" title="Please only enter numbers" id="renewalperiod" size="10" max="10" value="" class="required" required="required" /> > <span class="required">Required</span> > </li> > > <li> > <label for="onshelfholds">On shelf holds allowed: </label> > <select name="onshelfholds" id="onshelfholds" required="required"> >+ <option value="">Choose</option> > <option value="yes" selected="selected">Yes</option> > <option value="anyunavailable">If any unavailable</option> > <option value="allunavailable">If all unavailable</option> >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 17855
:
58657
|
58658
|
58659
|
58660
|
58661
|
58662
|
58663
|
58664
|
58665
|
58666
|
58667
|
58668
|
58669
|
58781
|
58782
|
58783
|
58784
|
58785
|
58792
|
58793
|
58794
|
58846
|
58860
|
58861
|
58862
|
58886
|
58892
|
58893
|
58894
|
58895
|
58896
|
58897
|
58898
|
58899
|
58900
|
58901
|
58902
|
58903
|
58904
|
58905
|
58906
|
58907
|
59037
|
59051
|
59140
|
59141
|
59174
|
59188
|
59277
|
59279
|
59280
|
59281
|
59628
|
59703
|
59705
|
59706
|
59707
|
59708
|
59709
|
59710
|
59711
|
59712
|
59742
|
59826
|
59830
|
59840
|
59841
|
59842
|
59856
|
59857
|
60092
|
61667
|
61668
|
61986
|
62186
|
62191
|
62192
|
62193
|
62220
|
62221
|
62222
|
62223
|
62231
|
62233
|
62234
|
62235
|
62236
|
62237
|
62238
|
62239
|
62240
|
62241
|
62242
|
62243
|
62251
|
62252
|
62253
|
62254
|
62255
|
62256
|
62257
|
62258
|
62259
|
62260
|
62261
|
62262
|
62263
|
62281
|
62282
|
62283
|
62284
|
62285
|
62286
|
62287
|
62288
|
62668
|
62669
|
62670
|
62671
|
62672
|
62673
|
62674
|
62675