Bugzilla – Attachment 58661 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 - Create library, patron category, and item type backends working successfully inserting into the database.
Bug-17855---Create-library-patron-category-and-ite.patch (text/plain), 63.87 KB, created by
Alex Buckley
on 2017-01-08 23:27:20 UTC
(
hide
)
Description:
Bug 17855 - Create library, patron category, and item type backends working successfully inserting into the database.
Filename:
MIME Type:
Creator:
Alex Buckley
Created:
2017-01-08 23:27:20 UTC
Size:
63.87 KB
patch
obsolete
>From cadca15b3ab0f5e8ca6e2034794a2dca3e9cc6e7 Mon Sep 17 00:00:00 2001 >From: Alex Buckley <alexbuckley@catalyst.net.nz> >Date: Wed, 14 Dec 2016 00:03:58 +0000 >Subject: [PATCH] Bug 17855 - Create library, patron category, and item type > backends working successfully inserting into the database. > >Dropdown boxes of create circulation rule >screen are now populated with values. > >Patron and circulation rule not yet inserting >into the database. > >Bug 17855 - Checking if library, >patron category, and item type have already >been inserted into the database and if >they have then the step to create them >in the onboarding tool is skipped. > >Create a patron onboarding page now has populated >dropdown boxes. > >Successful insertion of library and >patron category from onboarding.pl (onboarding >tool). > >Patron, item type and circulation rule not >yet inserting into the database from onboarding.pl >(onboarding tool). > >Bug 17855 - Fixed merge conflict in >onboardstep0.tt. Library and patron category >are being successfully inserted into >the database from onboarding.pl, same as the previous >patch. > >Bug 17855 - Finished front end >of onboarding tool. Initial two screens of >onboarding tool also have successful insertion into >the database. > >Successfully working backend of create library and patron >category pages. Thus library and patron cataegory are being >inserted into the database from the onboarding.pl script > >Working front end of the onboarding tool with the >correct button names and header names. And finished web installer > >Increased font size in summary page > >Working backend of the create library. With a >check to determine if the library already exists >before allowing the user to create a library. With finished web >installer > >Created backend of patron category. >Moved files around from default to optional for configuration >settings. > >Fixed merge commit with onboardstep0.tt file > >Working library, and patron category checks and >inserts into the koha database in the koha onboarding tool > >Working checks on the library, patron category, >and item type with working library and patron category >insertion to the database > >Drop downs are correctly showing existing information when >creating a new patron. Still working on backend to add the >patron to the database. > >Item type backend created and working as expected. > >Added drop down boxes in create circulation rule. > >Working on creating a circulation rule. Not yet complete. >--- > .../en/{default => optional}/patron_categories.sql | 0 > .../en/{default => optional}/patron_categories.txt | 0 > .../en/{default => optional}/sample_itemtypes.sql | 0 > .../en/{default => optional}/sample_itemtypes.txt | 0 > installer/onboarding.pl | 430 ++++++++++++++++----- > .../prog/en/modules/onboarding/onboardingstep0.tt | 54 +++ > .../prog/en/modules/onboarding/onboardingstep1.tt | 42 +- > .../prog/en/modules/onboarding/onboardingstep2.tt | 79 ++-- > .../prog/en/modules/onboarding/onboardingstep3.tt | 92 ++--- > .../prog/en/modules/onboarding/onboardingstep4.tt | 37 +- > .../prog/en/modules/onboarding/onboardingstep5.tt | 168 ++------ > koha-tmpl/intranet-tmpl/prog/en/modules/summary.tt | 2 +- > 12 files changed, 554 insertions(+), 350 deletions(-) > rename installer/data/mysql/en/{default => optional}/patron_categories.sql (100%) > rename installer/data/mysql/en/{default => optional}/patron_categories.txt (100%) > rename installer/data/mysql/en/{default => optional}/sample_itemtypes.sql (100%) > rename installer/data/mysql/en/{default => optional}/sample_itemtypes.txt (100%) > create mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep0.tt > >diff --git a/installer/data/mysql/en/default/patron_categories.sql b/installer/data/mysql/en/optional/patron_categories.sql >similarity index 100% >rename from installer/data/mysql/en/default/patron_categories.sql >rename to installer/data/mysql/en/optional/patron_categories.sql >diff --git a/installer/data/mysql/en/default/patron_categories.txt b/installer/data/mysql/en/optional/patron_categories.txt >similarity index 100% >rename from installer/data/mysql/en/default/patron_categories.txt >rename to installer/data/mysql/en/optional/patron_categories.txt >diff --git a/installer/data/mysql/en/default/sample_itemtypes.sql b/installer/data/mysql/en/optional/sample_itemtypes.sql >similarity index 100% >rename from installer/data/mysql/en/default/sample_itemtypes.sql >rename to installer/data/mysql/en/optional/sample_itemtypes.sql >diff --git a/installer/data/mysql/en/default/sample_itemtypes.txt b/installer/data/mysql/en/optional/sample_itemtypes.txt >similarity index 100% >rename from installer/data/mysql/en/default/sample_itemtypes.txt >rename to installer/data/mysql/en/optional/sample_itemtypes.txt >diff --git a/installer/onboarding.pl b/installer/onboarding.pl >index 78cf2e5..aac1705 100755 >--- a/installer/onboarding.pl >+++ b/installer/onboarding.pl >@@ -6,31 +6,61 @@ use diagnostics; > > > use Modern::Perl; >+ >+#External modules > use CGI qw ( -utf8 ); >+use List::MoreUtils qw/uniq/; >+use Digest::MD5 qw(md5_base64); >+use Encode qw( encode ); >+ >+#Internal modules > use C4::Koha; > use C4::Auth; > use C4::Context; > use C4::Output; >+use C4::Members; >+use C4::Members::Attributes; >+use C4::Members::AttributeTypes; >+use C4::Log; >+use C4::Letters; >+use C4::Form::MessagingPreferences; >+use Koha::AuthorisedValues; >+use Koha::Patron::Debarments; >+use Koha::Cities; > use Koha::Patrons; > use Koha::Items; > use Koha::Libraries; > use Koha::LibraryCategories; >- >- >-#use POSIX; >-#use C4::Templates; >-#use C4::Languages qw(getAllLanguages getTranslatedLanguages); >-#use C4::Installer; >-#use Koha; >+use Koha::Database; >+use Koha::DateUtils; >+use Koha::Patron::Categories; >+use Koha::ItemTypes; >+use Koha::Patron::HouseboundRole; >+use Koha::Patron::HouseboundRoles; >+use Koha::Token; >+use Email::Valid; >+use Module::Load; >+ >+#Imports for item types step 4 >+use Koha::ItemTypes; >+use Koha::Localizations; >+ >+#Imports for circulation rule step 5 >+use Koha::IssuingRule; >+use Koha::IssuingRules; >+use Koha::Logger; >+use Koha::RefundLostItemFeeRule; >+use Koha::RefundLostItemFeeRules; > > #Setting variables > my $input = new CGI; > my $query = new CGI; > my $step = $query->param('step'); > >+#Getting the appropriate template to display to the user--> > my ( $template, $loggedinuser, $cookie) = get_template_and_user( > { >- template_name => "/onboarding/onboardingstep" . ( $step ? $step : 1 ) . ".tt", >+ template_name => "/onboarding/onboardingstep" . ( $step ? $step : 0 ) . ".tt", > query => $query, > type => "intranet", > authnotrequired => 0, >@@ -57,124 +87,348 @@ 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 = $query->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 $query->redirect("/cgi-bin/koha/mainpage.pl"); >+ exit; >+} > >- my $op = $query->param('op'); >- $template->param('op'=>$op); >- warn $op; >- if ( $op && $op eq 'finish' ) { >- print $query->redirect("/cgi-bin/koha/mainpage.pl"); >- exit; >- } >- >- >- >-#Performing each step of the onboarding tool >-if ( $step && $step == 1 ) { >-#This is the Initial step of the onboarding tool to create a library >- >- >- my $createlibrary = $query->param('createlibrary'); >- $template->param('createlibrary'=>$createlibrary); > >-#store inputted parameters in variables >+#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 starting the onboarding tool process >+my $start = $query->param('start'); >+$template->param('start'=>$start); #Hand the start variable back to the template >+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' } ) ], >+ }, >+ ] >+ ); >+ >+ >+#Select any library records from the database and hand them back to the template in the libraries variable. >+}elsif ( $start && $start eq 'Add a patron category' ){ >+ >+#Select all the patron category records in the categories database table and store them in the newly declared variable $categories >+ my $categories = Koha::Patron::Categories->search(); >+ $template->param( >+ categories => $categories, >+ ); #Hand the variable categories back to the template >+ >+}elsif ( $start && $start eq 'Add an item type' ){ >+ my $itemtypes = Koha::ItemTypes->search(); >+ warn $itemtypes; >+ $template->param( >+ itemtypes => $itemtypes, >+ ); >+ >+#Check if the $step variable equals 1 i.e. the user has clicked to create a library in the create library screen 1 >+}elsif ( $step && $step == 1 ) { >+ >+ my $createlibrary = $query->param('createlibrary'); #Store the inputted library branch code and name in $createlibrary >+ $template->param('createlibrary'=>$createlibrary); # Hand the library values back to the template in the createlibrary variable >+ >+ #store inputted parameters in variables > my $branchcode = $input->param('branchcode'); > my $categorycode = $input->param('categorycode'); > my $op = $input->param('op') || 'list'; > my @messages; > my $library; > >-#Find branchcode if it exists >- if ( $op eq 'add_form' ) { >- if ($branchcode) { >- $library = Koha::Libraries->find($branchcode); >- } >+ #Take the text 'branchname' and store it in the @fields array >+ my @fields = qw( >+ branchname >+ ); > >- $template->param( >- library => $library, >- categories => [ Koha::LibraryCategories->search( {}, { order_by => [ 'categorytype', 'categoryname' ] } ) ], >- $library ? ( selected_categorycodes => [ map { $_->categorycode } $library->get_categories ] ) : (), >- ); >- } elsif ( $op eq 'add_validate' ) { >- my @fields = qw( >- branchname >- ); >+ $branchcode =~ s|\s||g; # Use a regular expression to check the value of the inputted branchcode > >- my $is_a_modif = $input->param('is_a_modif'); >- >- my @categories; >- for my $category ( Koha::LibraryCategories->search ) { >- push @categories, $category >- if $input->param( "selected_categorycode_" . $category->categorycode ); >- } >- if ($is_a_modif) { >- my $library = Koha::Libraries->find($branchcode); >- for my $field (@fields) { >- $library->$field( scalar $input->param($field) ); >- } >- $library->update_categories( \@categories ); >+ #Create a new library object and store the branchcode and @fields array values in this new library object >+ my $library = Koha::Library->new( >+ { branchcode => $branchcode, >+ ( map { $_ => scalar $input->param($_) || undef } @fields ) >+ } >+ ); > >- eval { $library->store; }; >+ eval { $library->store; }; #Use the eval{} function to store the library object > >- if ($@) { >- push @messages, { type => 'alert', code => 'error_on_update' }; >- } else { >- push @messages, { type => 'message', code => 'success_on_update' }; >- } >- } else { >- $branchcode =~ s|\s||g; >- my $library = Koha::Library->new( >- { branchcode => $branchcode, >- ( map { $_ => scalar $input->param($_) || undef } @fields ) >- } >- ); >- eval { $library->store; }; >- $library->add_to_categories( \@categories ); >- if ($@) { >- push @messages, { type => 'alert', code => 'error_on_insert' }; >- } else { >- push @messages, { type => 'message', code => 'success_on_insert' }; >- } >- } >- $op = 'list'; >+ #If there are values in the $@ then push the values type => 'alert', code => 'error_on_insert' into the @messages array el se push the values type => 'message', code => 'success_on_insert' to that array >+ if ($@) { >+ push @messages, { type => 'alert', code => 'error_on_insert' }; >+ } else { >+ push @messages, { type => 'message', code => 'success_on_insert' }; > } > >- >+#Check if the $step vairable 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 $createpatroncategory = $query->param('createpatroncategory'); >- $template->param('createpatroncategory'=>$createpatroncategory); >+ #Initialising values >+ my $input = new CGI; >+ my $searchfield = $input->param('description') // q||; >+ my $categorycode = $input->param('categorycode'); >+ my $op = $input->param('op') // 'list'; >+ my @messages; > >+ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( >+ { >+ template_name => "/onboarding/onboardingstep2.tt", >+ query => $input, >+ type => "intranet", >+ authnotrequired => 0, >+ flagsrequired => { parameters => 'parameters_remaining_permissions' }, >+ debug => 1, >+ } >+ ); >+ #When the user first arrives on the page >+ if ( $op eq 'add_form' ) { >+ my $category; >+ if ($categorycode) { >+ $category = Koha::Patron::Categories->find($categorycode); >+ } >+ >+ $template->param( >+ category => $category, >+ ); >+ >+ if ( C4::Context->preference('EnhancedMessagingPreferences') ) { >+ C4::Form::MessagingPreferences::set_form_values( >+ { categorycode => $categorycode }, $template ); >+ } >+ } >+ #Once the user submits the page, this code validates the input and adds it >+ #to the database as a new patron category >+ elsif ( $op eq 'add_validate' ) { >+ my $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, >+ } >+ ); >+ } >+ #Adds to the database >+ my $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; >+ }; >+ >+ #Error messages >+ if($@){ >+ push @messages, {type=> 'error', code => 'error_on_insert'}; >+ }else{ >+ push @messages, {type=> 'message', code => 'success_on_insert'}; >+ } >+ } >+#Create a patron > }elsif ( $step && $step == 3 ){ > >- my $createpatron = $query->param('createpatron'); >- $template->param('createpatron'=>$createpatron); >+ 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' } ) ], >+ }, >+ ] >+ ); >+ >+ my $categories; >+ $categories= Koha::Patron::Categories->search(); >+ $template->param( >+ categories => $categories, >+ ); > >-}elsif ( $step && $step == 4){ > >- my $createitemtype = $query->param('createitemtype'); >- $template->param('createitemtype'=>$createitemtype); > >-}elsif ( $step && $step == 5){ >+ my $input = new CGI; >+ my $op = $input->param('op'); >+ my @messages; > >- my $createcirculationrule = $query->param('createcirculationrule'); >- $template->param('createcirculationrule'=>$createcirculationrule); >+ my ($template, $loggedinuser, $cookie) >+ = get_template_and_user({ >+ template_name => "/onboarding/onboardingstep3.tt", >+ query => $input, >+ type => "intranet", >+ authnotrequired => 0, >+ flagsrequired => {borrowers => 1}, >+ debug => 1, >+ }); > >+ if($op eq 'add_form'){ >+ my $member; >+ $template->param( >+ member => $member, >+ ); > >-} > >+ } >+ elsif($op eq 'add_validate'){ >+ my $surname => $input->param('surname'); >+ my $firstname => $input->param('firstname'); >+ my $cardnumber => $input->param('cardnumber'); >+ my $libraries => $input->param('libraries'); >+ my $categorycode_entry => $input->param('categorycode_entry'); >+ my $userid => $input->param('userid'); >+ my $password => $input->param('password'); >+ my $password2 =>$input->param('password2'); >+ >+ my $member = Koha::Patron->new({ >+ surname => $surname, >+ firstname => $firstname, >+ cardnumber => $cardnumber, >+ libraries => $libraries, >+ categorycode_entry => $categorycode_entry, >+ userid => $userid, >+ password => $password, >+ password2 => $password2, >+ }); >+ eval { >+ $member->store; >+ }; >+ if($@){ >+ push @messages, {type=> 'error', code => 'error_on_insert'}; >+ }else{ >+ push @messages, {type=> 'message', code => 'success_on_insert'}; >+ } >+ >+ } > >+#Create item type >+}elsif ( $step && $step == 4){ >+ my $input = new CGI; >+ my $itemtype_code = $input->param('itemtype'); >+ my $op = $input->param('op') // 'list'; >+ my @messages; > >+ my( $template, $borrowernumber, $cookie) = get_template_and_user( >+ { template_name => "/onboarding/onboardingstep4.tt", >+ query => $input, >+ type => "intranet", >+ authnotrequired => 0, >+ flagsrequired => { parameters => 'parameters_remaining_permissions'}, >+ debug => 1, >+ } >+ ); >+ >+ if($op eq 'add_form'){ >+ my $itemtype = Koha::ItemTypes->find($itemtype_code); >+ template->param(itemtype=>$itemtype,); >+ }elsif($op eq 'add_validate'){ >+ my $itemtype = Koha::ItemTypes->find($itemtype_code); >+ my $description = $input->param('description'); >+ >+ #store the input from the form - only 2 fields >+ my $itemtype= Koha::ItemType->new( >+ { itemtype => $itemtype_code, >+ description => $description, >+ } >+ ); >+ eval{ $itemtype->store; }; >+ #Error messages >+ if($@){ >+ push @messages, {type=> 'error', code => 'error_on_insert'}; >+ }else{ >+ push @messages, {type=> 'message', code => 'success_on_insert'}; >+ } >+ } > >+}elsif ( $step && $step == 5){ >+ #Fetching all the existing categories to display in a drop down box >+ my $categories; >+ $categories= Koha::Patron::Categories->search(); >+ $template->param( >+ categories => $categories, >+ ); >+ >+ my $itemtypes; >+ $itemtypes= Koha::ItemTypes->search(); >+ $template->param( >+ itemtypes => $itemtypes, >+ ); >+ >+ my $input = CGI->new; >+ my($template, $loggedinuser, $cookie) =get_template_and_user({ >+ template_name => "/onboarding/onboardingstep5.tt", >+ query => $input, >+ type => "intranet", >+ authnotrequired=>0, >+ flagsrequired=> {parameters => 'manage_circ_rules'}, >+ debug =>1, >+ }); >+ >+ my $type = $input->param('type'); >+ my $branch = $input->param('branch'); >+ >+ >+ >+ if($op eq 'add_form'){ > > > >-output_html_with_http_headers $input, $cookie, $template->output; >+ } >+ elsif($op eq 'add_validate'){ >+ my $bor = $input->param('categorycode'); >+ my $itemtype = $input->param('itemtype'); >+ my $maxissueqty = $input->param('maxissueqty'); >+ my $issuelength = $input->param('issuelength'); >+ #$issuelength = $issuelength eq q{} ? undef : $issuelength; >+ my $lengthunit = $input->param('lengthunit'); >+ my $renewalsallowed = $input->param('renewalsallowed'); >+ my $renewalperiod = $input->param('renewalperiod'); >+ my $onshelfholds = $input->param('onshelfholds'); >+ >+ my $params ={ >+ categorycode => $bor, >+ itemtype => $itemtype, >+ maxissueqty => $maxissueqty, >+ renewalsallowed => $renewalsallowed, >+ renewalperiod => $renewalperiod, >+ lengthunit => $lengthunit, >+ onshelfholds => $onshelfholds, >+ }; >+ my $issuingrule = Koha::IssuingRules->find({categorycode => $bor, itemtype => $itemtype}); >+ if($issuingrule){ >+ $issuingrule->set($params)->store(); >+ }else{ >+ Koha::IssuingRule->new()->set($params)->store(); >+ } > >+ >+ } >+ > > > >+} > > > > >+output_html_with_http_headers $input, $cookie, $template->output; > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep0.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep0.tt >new file mode 100644 >index 0000000..8eed408 >--- /dev/null >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep0.tt >@@ -0,0 +1,54 @@ >+<!-- Includes for creating library--> >+[% INCLUDE 'doc-head-open.inc' %] >+[% INCLUDE 'installer-doc-head-close.inc' %] >+ >+ >+<head> >+<title>Welcome › to › Koha</title> >+ >+<!--jQuery code for create library--> >+<script type="text/javascript" src="[% interface %]/lib/tiny_mce/tiny_mce.js"></script> >+<script type="text/javascript"> >+ //<![CDATA[ >+ $(document).ready(function() { >+ $("#branchest").dataTable($.extend(true, {}, dataTablesDefaults, { >+ "aoColumnDefs": [ >+ { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false }, >+ ], >+ "iDisplayLength": 10, >+ "sPaginationType": "four_button" >+ })); >+ >+ [% UNLESS library %] >+ $("#Aform").on("submit", function( event ) { >+ if ( $("#branchcode").val().match(/\s/) ) { >+ event.preventDefault(); >+ alert(_("The library code entered contains whitespace characters. Please remove any whitespace characters from the library code")); >+ return false; >+ } else { >+ return true; >+ } >+ }); >+ [% END %].. >+ }); >+ //]]> >+ </script> >+ </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 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 36e31ba..92f741b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep1.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep1.tt >@@ -1,7 +1,5 @@ > <!--Includes for creating library--> > [% INCLUDE 'doc-head-open.inc' %] >- >-[% IF ( finish ) %]<meta http-equiv="refresh" content="10; url=/cgi-bin/koha/mainpage.pl">[% END %] > [% INCLUDE 'installer-doc-head-close.inc' %] > > <head> >@@ -31,41 +29,49 @@ > } > }); > [% END %].. >- }); >- //]]> >+ }); >+//]]> > </script> > </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> We're just going to set up a few things</h2> > </div> >- >-<!--Create a library screen 2--> >-[% IF (createlibrary) %] >+ [% IF 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="Add a patron category"/> >+ </div> >+ </form> >+ >+ <!--Create a library screen 2--> >+[% ELSIF (createlibrary) %] > <!--New Library created--> > <form name="createlibrary" method="post" action="onboarding.pl"> > <input type="hidden" name="step" value="2"/> > <h1 align="left"> New Library</h1> >- >- <div> >+ <div> > <p> Success: Library created!</p> > <p> To add another library and for more settings, <br> > go to Tools->Administration->Libraries and Groups > </div> > Next up: >- <input type="submit" value="Add a patron category"/> >+ <input type="submit" name="start" value="Add a patron category"/> > </form> >- >+ > <!--Implement if statement to determine if library was succesfully created here....- > <div> > <p> Library was not successfully created</p> > </div> > --> >-[% ELSE %] >- >- <h1 align="left"> New Library</h2> >+[% ELSE %] >+<!--Create a library screen 1--> >+ <h2>Create a Library</h2> > <form name="LibraryCreation" method="post" action="onboarding.pl"> > <fieldset class="rows"> > <input type="hidden" name="step" value="1"/> >@@ -85,9 +91,11 @@ > </ol> > </fieldset> > <br> >- <input type="submit" class="action" value="Next >>"/> >+ <input type="submit" class="action" value="Submit"/> > </form> >-[% END %] >+[% 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 52fb182..ebad7d3 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep2.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep2.tt >@@ -4,8 +4,6 @@ > [% USE Price %] > > [% INCLUDE 'doc-head-open.inc' %] >- >-[% IF ( finish ) %]<meta http-equiv="refresh" content="10; url=/cgi-bin/koha/mainpage.pl">[% END %] > [% INCLUDE 'installer-doc-head-close.inc' %] > [% INCLUDE 'calendar.inc' %] > [% INCLUDE 'datatables.inc' %] >@@ -13,7 +11,6 @@ > > <head> > <title> Add a patron category</title> >- > <!--JQuery scripts for create patron category--> > <script type="text/javascript"> > var MSG_CATEGORYCODE_CHARS = _("Category code can only contain the following characters: letters, numbers, - and _."); >@@ -21,53 +18,60 @@ > var MSG_ONE_ENROLLMENTPERIOD = ("Please choose an enrollment period in months OR by date."); > </script> > <script type="text/javascript" src="[% themelang %]/js/categories.js"></script> >- > </head> > >-<div> >+<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> > >-<!--Create a patron category screen 2--> >-[% IF (createpatroncategory) %] >- >+ >+[% IF 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> >+ >+<!--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 op == 'add_validate' %] > <form name="createpatroncategory" method="post" action="onboarding.pl"> > <input type="hidden" name="step" value="3"/> >- <h1 align="left"> New patron category</h1> >+ <h1 align="left"> New patron category</h1> > <div> > <p> Success: Patron category created!</p> > <p> To add another patron category and for more settings<br> > go to More->Administration->Patrons & Circulation->Patron Categories</p> > </div> > Next up:<br> >- <input type="submit" value="Add a patron"> >+ <input type="submit" name="start" value="Add a patron"><!-- When the user clicks on this button then redirect them to step 3 of the onboarding tool--> > </form> > >-[% ELSE %] >- <h1 align="left"> New Patron Category</h2> >- >+[% 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</h2> > <form id="category_form" method="post" action="onboarding.pl"> >- <fieldset class="rows"> >+ <fieldset class="rows"> > <input type="hidden" name="step" value="2"/> > <input type="hidden" name="op" value="add_validate" /> >- <input type="hidden" name="createpatroncategory" value="createpatroncategory"/> > <ol> > <li> > <label for="categorycode" class="required">Category code: </label> >- <input type="text" name="categorycode" id="categorycode" size="10" maxlength="10" class="required" required="required" /> >+ <input type="text" name="categorycode" value="[% category.categorycode |html %]" 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" id="description" size="40" maxlength="80" class="required" required="required" value="[% category.description |html %]" /> >+ <input type="text" name="description" size="40" maxlength="80" class="required" required="required" value="[% category.description |html %]" /> > <span class="required">Required</span> > </li> > > <li> > <label for="overduenoticerequired">Overdue notice required: </label> >- <select name="overduenoticerequired" id="overduenoticerequired"> >+ <select name="overduenoticerequired" value="overduenoticerequired"> > [% IF category.overduenoticerequired %] > <option value="0">No</option> > <option value="1" selected="selected">Yes</option> >@@ -80,7 +84,7 @@ > > <li> > <label for="category_type" class="required">Category type: </label> >- <select name="category_type" id="category_type"> >+ <select name="category_type" value="category_type" class='required' required='required'> > [% UNLESS category %] > <option value="" selected="selected">Select a category type</option> > [% ELSE %] >@@ -128,7 +132,7 @@ > > <li> > <label for="default_privacy">Default privacy: </label> >- <select id="default_privacy" name="default_privacy" required="required"> >+ <select value="default_privacy" name="default_privacy" required="required"> > [% SET default_privacy = 'default' %] > > [% IF category %] >@@ -153,46 +157,25 @@ > <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> > >- <span class="label">Enrollment period: </span> >+ <span class="label">Enrolment period: </span> >+ </br> > <fieldset> >- <legend>Choose one</legend> >+ <legend>Choose one</legend> > <ol> > <li> > <label for="enrolmentperiod" style="width:6em;">In months: </label> >- <input type="text" class="enrollmentperiod" name="enrolmentperiod" id="enrolmentperio d" size="3" maxlength="1" value="[% IF category.enrolmentperiod %][% category.enrolmentperiod %][% END %]" /> months >+ <input type="text" name="enrolmentperiod" size="3" maxlength="1" value="[% IF category.enrolmentperiod %][% category.enrolmentperiod %][% END %]" /> months > </li> > <li> > <label for="enrolmentperioddate" style="width:6em;">Until date: </label> >- <input type="text" class="enrollmentperiod" name="enrolmentperioddate" id="enrolmentp erioddate" value="[% category.enrolmentperioddate | $KohaDates %]" /> >+ <input type="text" name="enrolmentperioddate" value="[% category.enrolmentperioddate | $KohaDates %]" /> > </li> > </ol> > </fieldset> >- <br> >- <input type="submit" class="action" value="Create Patron Category" /> >+ <br> >+ <input type="submit" class="action" value="Submit" /> > </form> > [% END %] >- >- >- <!--Onboarding tool step 2-Create a patron category screen 1 >- <div id="doc3" class="yui-t2"> >- <div id="bd"> >- <div id="yui-main"> >- <div class="yui-b"> >- [% FOR m IN messages %] >- <div class="dialog [% m.type %]"> >- [% SWITCH m.code %] >- [% CASE 'error_on_insert' %] >- An error occurred when inserting this patron category. The patron category might already exist. >- [% CASE 'success_on_insert' %] >- Patron category inserted successfully. >- [% CASE 'already_exists' %] >- This patron category already exists. >- [% CASE %] >- [% m.code %] >- [% END %] >- </div> >- [% END %] >-</body>--> > > > >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 0ed1886..37ffda8 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep3.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep3.tt >@@ -1,27 +1,33 @@ >-<!--Includes for creating patron--> >+<!--Includes for creating patron--> >+[% USE Koha %] >+[% USE KohaDates %] >+[% USE Price %] >+<!--[% USE Branches %]--> > [% 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' %] >+[% INCLUDE 'calendar.inc' %] >+[% INCLUDE 'datatables.inc' %] >+ > > <head> > <title>Create Patron</title> > > <!--jQuery scripts for creating patron--> >- >- >- >+<!--<script type="text/javascript" src="[% interface %]/[% theme %]/js/members.js"></script> >+--> > </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> > </div> >- > <!--Create a patron screen 2--> >-[% IF (createpatron) %] >+[% IF op == 'add_validate' %] > <!--New patron created--> >- <form name="createpatron" method="post" action="onboarding.pl"> >+ <form name="patrondone" method="post" action="onboarding.pl"> > <input type="hidden" name="step" value="4"/> > <h1 align="left"> New Patron </h1> > >@@ -31,82 +37,82 @@ > More > Set Permissions in a user page to gain superlibrarian permissions. > </div> > Next up: >- <input type="submit" value="Add an item type"/> >+ <input type="submit" name="start" value="Add an item type"/> > </form> >- <div> >+ <!--Implement a if statement to check if the patron was successfully created >+ <div> > <p> Oh no! Patron was not created</p> >- </div> >+ </div>--> > [% ELSE %] > <!--Create a patron screen 1--> >- <h1 align="left"> New Patron </h2> >- <form name="PatronCreation" method="post" action="onboarding.pl"> >+ <h1 align="left"> Create a new Patron </h2> >+ <form name="createpatron" method="post" action="onboarding.pl"> > <fieldset class="rows"> > <input type="hidden" name="step" value="3"/> > <input type="hidden" name="op" value="add_validate" /> >- <input type="hidden" name="createpatron" value="createpatron"/> > <ol> > <h3>Patron Identity</h3> > <li> > <label for="surname" class="required">Surname: </label> >- <input type="text" name="surname" id="surname" size="10" maxlength="10" value="[% library.branchcode |html %]" class="required" required="required" /> >+ <input style="text-transform:uppercase;" type="text" id="surname" name="surname" size="0" value="[% surname %]" class="required" required="required" /> > <span class="required">Required</span> > </li> > <li> > <label for="firstname" class="required">First Name: </label> >- <input type="text" name="firstname" id="firstname" size="80" value="[% library.branchname |html %]" class=" required" required="required" style="width:200px;"> >+ <input style= "text-transform:uppercase;" type="text" name="firstname" id="firstname" size="20" value="[% firstname |html %]" class="required" required="required"> > <span class="required">Required</span> > </li> > </ol> >+ >+ <legend id="library_management_lgd">Library Management</legend> > <ol> >- <h3>Library Management</h3> > <li> >- <label for="cardnum" class="required">Card Number: </label> >- <input type="text" name="cardnum" id="cardnum" size="10" maxlength="20" value="/" class="required" required="required"> >+ <label for="cardnumber" class="required">Card Number: </label> >+ <input type="text" id="cardnumber" name="cardnumber" size="10" maxlength="20" value="[% cardnumber | html %]" class="required"> > <span class="required">Required</span> > </li> > <li> >- <div class="dropdown"> >- <button onclick="myFunction()" class="dropbtn">Library: </button> >- <div id="myDropdown" class="dropdown-content"> >- <a href="#">Centreville</a> >- <a href="#">Centre City</a> >- <a href="#">Centre of the Earth</a> >- </div> >- </div> >+ <!--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="branchcode" size="1" id="libraries"> >+ >+ [% FOREACH library IN libraries %] >+ <option value="[% library.branchcode %]"> [% library.branchname %] >+ [% END %] >+ >+ </select> >+ <span class="required"> Required</span> > </li> > <li> >- <div class="dropdown"> >- <button onclick="myFunction()" class="dropbtn">Category: </button> >- <div id="myDropdown" class="dropdown-content"> >- <a href="#">Adult</a> >- <a href="#">Infant</a> >- <a href="#">Pet Horse</a> >- </div> >- </div> >+ <label for="categorycode_entry" class="required"> Patron Category</label> >+ <select id="categorycode_entry" name="categorycode" onchange="update_category_code(this);"> >+ [% FOREACH category IN categories %] >+ <option value = "[% category.description %]"> [%category.description %] >+ [% END %] >+ </select> >+ <span class="required">Required</span> > </li> > </ol> > <ol> > <h3>OPAC/Staff Login</h3> > <li> >- <label for="username" class="required">Username: </label> >- <input type="text" name="username" id="username" size="10" maxlength="10" value="[% library.branchcode |html %]" class="required" required="required" /> >+ <label for="userid" class="required">Username: </label> >+ <input type="text" name="userid" id ="userid" size="20" value="[% userid %]" class="required" required="required" /> > <span class="required">Required</span> > </li> > <li> > <label for="password" class="required">Password: </label> >- <input type="password" name="password" id="password" size="80" value="[% library.branchname |html %]" class=" required" required="required" style="width:200px;"> >+ <input type="password" name="password" id="password" size="20" value="[% password %]" class="required" required="required"> > <span class="required">Required</span> > </li> > <li> >- <label for="password" class="required">Confirm password: </label> >- <input type="password" name="password" id="password" size="80" value="[% library.branchname |html %]" class=" required" required="required" style="width:200px;"> >+ <label for="password2" class="required">Confirm password: </label> >+ <input type="password" id="password2" name="password2" size="20" value="" class="required" required="required"> > <span class="required">Required</span> > </li> > </ol> >- </fieldset> >- <fieldset> >+ </fieldset><br> > <input type="submit" class="action" value="Submit"/> >- </fieldset> > </form> > [% END %] > >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 914d66a..a4f0dab 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep4.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep4.tt >@@ -17,13 +17,23 @@ > <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 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> >+ >+ > <!--Create a item type screen 2--> >-[% IF (createitemtype) %] >+[% ELSIF op == "add_validate" %] > <!--New item type created--> > <form name="createitemtype" method="post" action="onboarding.pl"> > <input type="hidden" name="step" value="5"/> >- <input type="hidden" name="step" value="1"/> > <h1 align="left"> New Item type </h1> > > <div> >@@ -32,38 +42,33 @@ > go to More->Administration->Item types > </div> > Next up: >- <input type="submit" value="Add an circulation rule"/> >- <br> >- Or: >- <input type="submit" value="Return to Home"/> >+ <input type="submit" value="Add a circulation rule"/> > </form> >+ <!--Implement a if statement to check if the item type was successfully created or not > <div> > <p> Oh no! Patron was not created</p> >- </div> >+ </div>--> > [% ELSE %] > <!--Create a item type screen 1--> >- <h1 align="left"> New Item type </h2> >- <form name="ItemTypeCreation" method="post" action="onboarding.pl"> >+ <h1 align="left"> Create a new Item type </h2> >+ <form name="createitemtype" method="post" action="onboarding.pl"> > <fieldset class="rows"> > <input type="hidden" name="step" value="4"/> > <input type="hidden" name="op" value="add_validate" /> >- <input type="hidden" name="createitemtype" value="createitemtype"/> > <ol> > <li> > <label for="itemtype" class="required">Item type: </label> >- <input type="text" name="surname" id="surname" size="10" maxlength="10" value="" class="required" required="required" /> >+ <input type="text" name="itemtype" 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="firstname" id="firstname" size="80" value="" class="required" required="required" style="width:200px;"> >+ <input type="text" name="description" id="description" size="80" value="[% itemtype.description |html %]" class="required" required="required"> > <span class="required">Required</span> > </li> > </ol> >- </fieldset> >- <fieldset> >+ </fieldset><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 856437e..5d78334 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep5.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep5.tt >@@ -25,12 +25,12 @@ > [% END %] > > <!--Create a circulation rule screen 2--> >-[% IF (createcirculationrule) %] >+[% IF op == "add_validate" %] > <!--New circulation rule created--> > <form name="finish" method="post" action="onboarding.pl"> > <input type="hidden" name="op" value="finish" /> > >- <h1 align="left"> New Item type </h1> >+ <h1 align="left"> New Circulation rule </h1> > > <div> > <p> Success: New circulation rule created!</p> >@@ -38,145 +38,58 @@ > More->Administration->Circulation and Fine Rules > </div> > Next up: >- <input type="submit" name="op" value="finish"/> >+ <input type="submit" name="op" value="Finish"/> > </form> >- <div> >+ <!-- <div> > <p> Oh no! Circulation Rule was not created</p> >- </div> >+ </div> --> > > > [% ELSE %] > <!--Create a circulation rule screen 1--> >- <h1 align="left"> New Circulation rule </h2> >- <form name="CirculationRuleCreation" method="post" action="onboarding.pl"> >+ <h1 align="left"> Create a new Circulation rule </h2> >+ >+ <form name="createcirculationrule" method="post" action="onboarding.pl"> > <fieldset class="rows"> > <input type="hidden" name="step" value="5"/> > <input type="hidden" name="op" value="add_validate" /> >- <input type="hidden" name="createcirculationrule" value="createcirculationrule"/> > <ol> >- <li> >- <label for="patron_category" class="required">Patron Category: </label> >- <select name="patron_category" id="patron_category"> >- [% UNLESS category %] >- <option value="" selected="selected">Select a patron category type</option> >- [% ELSE %] >- <option value="">Select a patron category type</option> >- [% END %] >- >- [% IF category and category.category_type == 'A' %] >- <option value="A" selected="selected">Adult</option> >- [% ELSE %] >- <option value="A">Adult</option> >- [% END %] >- >- [% IF category and category.category_type == 'C' %] >- <option value="C" selected="selected">Child</option> >- [% ELSE %] >- <option value="C">Child</option> >- [% END %] >- >- [% IF category and category.category_type == 'S' %] >- <option value="S" selected="selected">Staff</option> >- [% ELSE %] >- <option value="S">Staff</option> >- [% END %] >- >- [% IF category and category.category_type == 'I' %] >- <option value="I" selected="selected">Organization</option> >- [% ELSE %] >- <option value="I">Organization</option> >- [% END %] >- >- [% IF category and category.category_type == 'P' %] >- <option value="P" selected="selected">Professional</option> >- [% ELSE %] >- <option value="P">Professional</option> >- [% END %] >- >- [% IF category and category.category_type == 'X' %] >- <option value="X" selected="selected">Statistical</option> >- [% ELSE %] >- <option value="X">Statistical</option> >- [% END %] >- </select> >+ <li> >+ <label for="categorycode" class="required">Patron Category: </label> >+ <select name="categorycode" id="categorycode" required="required" onchange = "update_categorycode(this);"> >+ >+ [% FOREACH category IN categories %] >+ <option name="categorycode" value = "[% category.description %]"> [%category.description %] >+ [%END%] >+ </select> > <span class="required">Required</span> > </li> > > <li> >- <label for="item_type"> Item type: </label> >- <select id="item_type" name="item_type" required="required"> >- [% UNLESS item_type %] >- <option value="" selected="selected">Select a item type</option> >- [% ELSE %] >- <option value="">Select a category type</option> >- [% END %] >- >- [% IF item_type and item.item_type == 'Books' %] >- <option value="Books" selected="selected">Books</option> >- [% ELSE %] >- <option value="Books">Books</option> >- [% END %] >- >- [% IF item_type and item.item_type == 'Computer Files' %] >- <option value="Computer Files" selected="selected">Computer Files</option> >- [% ELSE %] >- <option value="Computer Files">Computer Files</option> >- [% END %] >- >- [% IF item_type and item.item_type == 'Continuing Resources' %] >- <option value="Continuing Resources" selected="selected">Continuing Resources</option> >- [% ELSE %] >- <option value="Continuing Resources">Continuing Resources</option> >- [% END %] >- >- [% IF item_type and item.item_type == 'Maps' %] >- <option value="Maps" selected="selected">Maps</option> >- [% ELSE %] >- <option value="Maps">Maps</option> >- [% END %] >- >- [% IF item_type and item.item_type == 'Mixed Materials' %] >- <option value="Mixed Materials" selected="selected">Mixed Materials</option> >- [% ELSE %] >- <option value="Mixed Materials">Mixed Materials</option> >- [% END %] >- >- [% IF item_type and item.item_type == 'Music' %] >- <option value="Music" selected="selected">Music</option> >- [% ELSE %] >- <option value="Music">Music</option> >- [% END %] >- >- [% IF item_type and item.item_type == 'Reference' %] >- <option value="Reference" selected="selected">Reference</option> >- [% ELSE %] >- <option value="Reference">Reference</option> >- [% END %] >- >- [% IF item_type and item.item_type == 'Visual Materials' %] >- <option value="Visual Materials" selected="selected">Visual Materials</option> >- [% ELSE %] >- <option value="Visual Materials">Visual Materials</option> >- [% END %] >+ <label for="itemtype"> Item type: </label> >+ <select id="itemtype" name="itemtype" required="required"> >+ [% FOREACH item IN itemtypes %] >+ <option name="itemtype" value = "[% item.itemtype %]"> [% item.itemtype %] >+ [%END%] > </select> > <span class="required"> Required</span> > </li> > > <li> >- <label for="currentcheckoutsallowed" class="required">Current checkouts allowed: </label> >- <input type="text" name="currentcheckoutsallowed" id="currentcheckoutsallowed" size="10" maxlength="10" value="" class="required" required="required" /> >+ <label for="maxissueqty" class="required">Current checkouts allowed: </label> >+ <input type="text" name="maxissueqty" id="maxissueqty" size="10" maxlength="10" value="" class="required" required="required" /> > <span class="required">Required</span> > </li> > > <li> >- <label for="loanperiod" class="required">Loan Period: </label> >- <input type="text" name="loanperiod" id="loanperiod" size="10" maxlength="10" value="" class="required" required="required" /> >+ <label for="issuelength" class="required">Loan Period: </label> >+ <input type="text" name="issuelength" id="issuelength" size="10" maxlength="10" value="" class="required" required="required" /> > <span class="required">Required</span> > </li> > > <li> >- <label for="units">Units: </label> >- <select name="units" id="units"> >+ <label for="lengthunit">Units: </label> >+ <select name="lengthunit" id="lengthunit" required="required"> > [% SET units = 'days' %] > > [% IF category %] <!--Check if category is the correct value name in the context of units of days that a loan period is for in the item borrowing script--> >@@ -208,34 +121,15 @@ > > <li> > <label for="onshelfholds">On shelf holds allowed: </label> >- <select name="onshelfholds" id="onshelfholds"> >- [% SET onshelfholdsallowed = 'yes' %] >- >- [% IF category %] >- [% SET onshelfholdsallowed = category.onshelfholdsallowed %] >- [% END %] >- >- [% SWITCH onshelfholdsallowed %] >- [% CASE 'yes' %] >+ <select name="onshelfholds" id="onshelfholds" required="required"> > <option value="yes" selected="selected">Yes</option> > <option value="anyunavailable">If any unavailable</option> >- <option value="allunavailable">If all unavailable</option> >- [% CASE 'anyunavailable' %] >- <option value="yes">Yes</option> >- <option value="anyunavailable" selected="selected">If any unavailable</option> >- <option value="allunavailable">If all unavailable</option> >- [% CASE 'allunavailable' %] >- <option value="yes">Yes</option> >- <option value="anyunavailable">If any unavailable</option> >- <option value="allunavailable" selected="selected">If all unavailable</option> >- [% END %] >+ <option value="allunavailable">If all unavailable</option> > </select> > </li> > </ol> >- </fieldset> >- <fieldset> >- <input type="submit" class="action" value="Submit"/> >- </fieldset> >+ </fieldset><br> >+ <input type="submit" class="action" value="Submit"/> > </form> > [% END %] > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/summary.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/summary.tt >index a4ef904..7c4882c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/summary.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/summary.tt >@@ -13,7 +13,7 @@ > <div id="bd"> > <div id="yui-main" class="sysprefs"> > <div class="yui-g"><h1>Tutorial Summary Page</h1></div> >- <fieldset> >+ <fieldset style="font-size:120%"> > <h2>Library</h2> > <p> To add another library and for more settings, go to </br> > More > Administration > Libraries and Groups </p> >-- >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