Bugzilla – Attachment 59721 Details for
Bug 17942
Update style of the web installer with Bootstrap 3
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 17942 - Update style of the web installer with Bootstrap 3
SIGNED-OFF-Bug-17942---Update-style-of-the-web-ins.patch (text/plain), 135.81 KB, created by
Josef Moravec
on 2017-02-01 08:03:41 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 17942 - Update style of the web installer with Bootstrap 3
Filename:
MIME Type:
Creator:
Josef Moravec
Created:
2017-02-01 08:03:41 UTC
Size:
135.81 KB
patch
obsolete
>From 1965df153da7a890ab5b670faeeb0b644d913338 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Wed, 18 Jan 2017 16:07:40 +0000 >Subject: [PATCH] [SIGNED-OFF] Bug 17942 - Update style of the web installer > with Bootstrap 3 > >This patch makes style and markup changes to the web installer and new >onboarding tool (Bug 17855). > >- Markup has been corrected, improved, and in many places reindented. >- Some page titles have been made more specific. >- Some JavaScript and CSS have been moved to separate files. > >In the onboarding tool I have removed form validation from the markup >and JavaScript in many cases where the requirements were not matched >elsewhere in Koha. For instance, we shouldn't limit item type >descriptions to only letters because the database doesn't require such a >limit. > >To test, apply the patch and run the web installer with an empty >database. Confirm that the installation process completes correctly and >that each page looks good and works correctly. > >Signed-off-by: Josef Moravec <josef.moravec@gmail.com> >--- > koha-tmpl/intranet-tmpl/prog/css/installer.css | 229 ++++++++++ > .../prog/en/includes/installer-doc-head-close.inc | 79 +--- > .../prog/en/includes/installer-strings.inc | 7 + > .../prog/en/modules/installer/auth.tt | 93 ++-- > .../prog/en/modules/installer/step1.tt | 168 +++---- > .../prog/en/modules/installer/step2.tt | 129 +++--- > .../prog/en/modules/installer/step3.tt | 501 +++++++++----------- > .../prog/en/modules/onboarding/onboardingstep1.tt | 128 +++--- > .../prog/en/modules/onboarding/onboardingstep2.tt | 503 +++++---------------- > .../prog/en/modules/onboarding/onboardingstep3.tt | 346 ++++++-------- > .../prog/en/modules/onboarding/onboardingstep4.tt | 133 +++--- > .../prog/en/modules/onboarding/onboardingstep5.tt | 234 +++++----- > koha-tmpl/intranet-tmpl/prog/js/onboarding.js | 150 ++++++ > 13 files changed, 1342 insertions(+), 1358 deletions(-) > create mode 100644 koha-tmpl/intranet-tmpl/prog/css/installer.css > create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/installer-strings.inc > create mode 100644 koha-tmpl/intranet-tmpl/prog/js/onboarding.js > >diff --git a/koha-tmpl/intranet-tmpl/prog/css/installer.css b/koha-tmpl/intranet-tmpl/prog/css/installer.css >new file mode 100644 >index 0000000..374c56d >--- /dev/null >+++ b/koha-tmpl/intranet-tmpl/prog/css/installer.css >@@ -0,0 +1,229 @@ >+body { >+ background-color: #EEE; >+ text-align: left; >+ font-family: arial, verdana, helvetica, sans-serif; >+} >+ >+h1 { >+ font-size: 161.6%; >+ font-weight: bold; >+} >+ >+h2 { >+ background-color: #eee; >+ border-radius: 4px; >+ font-size: 146.5%; >+ font-weight: bold; >+ text-shadow: 1px 1px 0px #FFF; >+ padding: .5em; >+} >+ >+h3 { >+ color: #003366; >+ font-size: 131%; >+ font-weight: bold; >+} >+ >+hr { >+ margin-top: .5em; >+ margin-bottom: .5em; >+} >+ >+.installer-main { >+ background-color: #FFF; >+ border-radius: 5px; >+ margin-top: 3%; >+ margin-bottom: 3%; >+ padding: 1em; >+ -webkit-box-shadow: 0px 2px 2px 0px rgba(50, 50, 50, 0.5); >+ -moz-box-shadow: 0px 2px 2px 0px rgba(50, 50, 50, 0.5); >+ box-shadow: 0px 2px 2px 0px rgba(50, 50, 50, 0.5); >+} >+ >+ul, ol { padding: 5px 5px 5px 20px; } >+ >+#logo { >+ background: url(../img/koha-logo.gif) no-repeat top center; >+ margin-top: 0; >+ margin-bottom: .5em; >+} >+ >+#logo a { >+ display: block; >+ text-indent: -1000px; >+ height: 74px; >+ border-bottom: none; >+} >+ >+.bg-danger { >+ padding: .2em .4em; >+} >+ >+.step a, .step input { font-size: 2em; } >+ >+td input { font-size: 1.5em; } >+ >+.step, th { text-align: right; } >+ >+#bloc25, .bloc25 { >+ float:left; >+ border:1px solid #000000; >+ margin:0px; >+ padding:0px; >+ >+} >+ >+#footer { >+ text-align: center; >+ border-top: 1px solid #ccc; >+ padding-top: 1em; >+ font-style: italic; >+} >+ >+.update_error { >+ color: red; >+ font-weight: bold; >+} >+ >+.checkbox { >+ margin-bottom: 1em; >+} >+ >+fieldset.rows { >+ border-width: 0; >+ float: left; >+ font-size: 90%; >+ clear: left; >+ margin: .9em 0 0 0; >+ padding: 0; >+ width: 100%; >+} >+ >+fieldset.rows legend { >+ border: 0; >+ margin-left: 1em; >+ font-weight: bold; >+ font-size: 110%; >+ margin-bottom: 0; >+} >+ >+fieldset.rows label, >+fieldset.rows span.label { >+ float: left; >+ font-weight: bold; >+ width: 9em; >+ margin-right: 1em; >+ text-align: right; >+} >+ >+fieldset.rows span.label { >+ display: inline; >+ padding: .2em .6em .3em; >+ font-size: inherit; >+ font-weight: bold; >+ line-height: 1; >+ color: inherit; >+ text-align: right; >+ white-space: normal; >+ vertical-align: baseline; >+ border-radius: 0; >+} >+ >+fieldset.rows fieldset { >+ background-color: transparent; >+ border-width: 1px; >+ margin: 1em; >+ padding: .3em; >+} >+ >+fieldset.rows ol { >+ padding: 1em 1em 0 1em; >+ list-style-type: none; >+} >+ >+fieldset.rows li { >+ float: left; >+ clear: left; >+ padding-bottom: 1em; >+ list-style-type: none; >+ width: 100%; >+} >+ >+fieldset.rows .hint { >+ margin-left: 10.5em; >+ margin-right: 4em; >+ margin-top: .5em; >+ font-size: 96%; >+ color: #666; >+} >+ >+fieldset.rows label.error { >+ color: #cc0000; >+ float: none; >+ margin-left: 1em; >+ width: auto; >+} >+ >+fieldset.rows ol { >+ padding: 0 1em 0 1em; >+} >+ >+ >+label.required, >+span.required { >+ color : #C00; >+} >+ >+span.required { >+ font-style : italic; >+ margin-left : .5em; >+} >+ >+.breadcrumbs { >+ background-color: #e6f0f2; >+ margin: 1em 0; >+ padding: .4em 2em; >+} >+ >+/* Override core jQueryUI widgets */ >+.ui-widget-content { border: 1px solid #B9D8D9; background: #ffffff none; color: #222222; } >+.ui-widget-header { border: 1px solid #B9D8D9; background: #E6F0F2 none; color: #222222; font-weight: bold; } >+.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #B9D8D9; background: #F4F8F9 none; font-weight: normal; color: #555555; } >+.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #B9D8D9; background: #E6F0F2 none; font-weight: normal; color: #212121; } >+.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa; background: #ffffff none; font-weight: normal; color: #212121; } >+.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #FED22F; background: #FFF4C6; color: #363636; } >+.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #fef1ec; color: #cd0a0a; } >+ >+.ui-widget, >+.ui-widget input, >+.ui-widget select, >+.ui-widget textarea, >+.ui-widget button { >+ font-family : inherit; >+ font-size : inherit; >+} >+ >+/* jQuery UI Datepicker */ >+.ui-datepicker table { >+ width: 100%; >+ font-size: .9em; >+ border : 0; >+ border-collapse: collapse; >+ margin:0 0 .4em; >+} >+ >+.ui-datepicker th { >+ background : transparent none; >+ padding: .7em .3em; >+ text-align: center; >+ font-weight: bold; >+ border: 0; >+} >+ >+.ui-datepicker-trigger { >+ vertical-align: middle; >+ margin : 0 3px; >+} >+.ui-datepicker { >+ box-shadow: 1px 1px 3px 0 #666; >+} >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/installer-doc-head-close.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/installer-doc-head-close.inc >index 60d0e66..d62bfe6 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/installer-doc-head-close.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/installer-doc-head-close.inc >@@ -2,92 +2,15 @@ > <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" /> > <link rel="stylesheet" type="text/css" href="[% interface %]/lib/jquery/jquery-ui-1.11.4.min.css" /> > <link rel="stylesheet" type="text/css" href="[% interface %]/lib/bootstrap/bootstrap.min.css" /> >-<link rel="stylesheet" type="text/css" href="[% interface %]/lib/font-awesome/css/font-awesome.min.css" /> >-<link rel="stylesheet" type="text/css" media="print" href="[% interface %]/[% theme %]/css/print.css" /> >-<style type="text/css" media="screen"> >- >-[% IF ( login ) %] >- @import url([% interface %]/[% theme %]/css/login.css); >-[% END %] >- >-html { background: #eee; } >- >-body { >- background: #fff; >- color: #000; >- font-family: Georgia, "Times New Roman", Times, serif; >- margin-left: 20%; >- margin-right: 20%; >- padding: .2em 2em; >-} >- >-h1 { >- color: #006; >- font-size: 2em; >- font-weight: normal; >- vertical-align:middle; >-} >- >-h2 { font-size: 1.75em; } >- >-h3 { >- color: #006; >- font-size: 1.5em; >- font-weight: lighter; >-} >- >-p, li, dt { >- line-height: 140%; >- padding-bottom: 2px; >-} >- >-ul, ol { padding: 5px 5px 5px 20px; } >- >-#logo { margin-bottom: 2em; } >- >-.step a, .step input { font-size: 2em; } >- >-td input { font-size: 1.5em; } >- >-.step, th { text-align: right; } >- >-#bloc25, .bloc25 { >- float:left; >- border:1px solid #000000; >- margin:0px; >- padding:0px; >- >-} >- >-#footer { >- text-align: center; >- border-top: 1px solid #ccc; >- padding-top: 1em; >- font-style: italic; >-} >- >-.update_error { >- color: red; >- font-weight: bold; >-} >- >-</style> >+<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/installer.css" /> > > <script type="text/javascript" src="[% interface %]/lib/jquery/jquery-2.2.3.min.js"></script> > <script type="text/javascript" src="[% interface %]/lib/jquery/jquery-migrate-1.3.0.min.js"></script> > <script type="text/javascript" src="[% interface %]/lib/jquery/jquery-ui-1.11.4.min.js"></script> >-<script type="text/javascript" src="[% interface %]/lib/shortcut/shortcut.js"></script> >-<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.cookie.min.js"></script> >-<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.highlight-3.js"></script> > <script type="text/javascript" src="[% interface %]/lib/bootstrap/bootstrap.min.js"></script> > <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.validate.min.js"></script> >-<!-- koha core js --> >-<script type="text/javascript" src="[% interface %]/[% theme %]/js/staff-global.js"></script> >- > <script type="text/javascript"> > //<![CDATA[ > function _(s) { return s } // dummy function for gettext > //]]> > </script> >-</head> >-<body id="installer" class="installer"> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/installer-strings.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/installer-strings.inc >new file mode 100644 >index 0000000..21b8245 >--- /dev/null >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/installer-strings.inc >@@ -0,0 +1,7 @@ >+<script type="text/javascript"> >+ var MSG_LETTERS_ONLY=(_("Please only enter letters.")); >+ var MSG_PASSWORD_MISMATCH=(_("The entered passwords do not match")); >+ var MSG_ONE_ENROLLMENTPERIOD =(_("Please choose an enrollment period in months OR by date.")); >+ var MSG_ONLY_ONE_ENROLLMENTPERIOD=(_("Please only choose one enrollment period.")); >+ var MSG_LETTERS_NUMBERS_ONLY=(_("Please only enter letters or numbers.")); >+</script> >\ No newline at end of file >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/auth.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/installer/auth.tt >index c3509cd..28d95ea 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/auth.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/installer/auth.tt >@@ -1,52 +1,63 @@ > [% USE Koha %] > [% INCLUDE 'doc-head-open.inc' %] >-<title>Koha › >+<title>Koha › > [% IF ( nopermission ) %]Access denied[% END %] > [% IF ( timed_out ) %]Session timed out[% END %] > [% IF ( different_ip ) %]IP address change[% END %] > [% IF ( invalid_username_or_password ) %]Invalid username or password[% END %] >- [% IF ( loginprompt ) %]Log in to Koha[% END %] >+ [% IF ( loginprompt ) %]Log in to the Koha web installer[% END %] > </title> > > [% INCLUDE 'installer-doc-head-close.inc' %] >-<div id="login"> >-<h1><a>Koha [%- Koha.Version.release -%] installer</a></h1> >-[% IF ( nopermission ) %] >-<div id="login_error"><strong>Error: </strong>Unauthorized user <a href="/cgi-bin/koha/mainpage.pl?logout.x=1">click to log out</a></div> >-[% END %] >- >-[% IF ( timed_out ) %] >-<div id="login_error"><strong>Error: </strong>Session timed out, please log in again</div> >-[% END %] >- >-[% IF ( different_ip ) %] >-<div id="login_error"><strong>Error: </strong>IP address has changed, please log in again </div> >-[% END %] >- >-[% IF ( invalid_username_or_password ) %] >-<div id="login_error"><strong>Error: </strong>Invalid username or password</div> >-[% END %] >- >-[% IF ( loginprompt ) %] >-<!-- login prompt time--> >-<form action="/cgi-bin/koha/installer/install.pl" method="post" name="mainform" id="mainform"> >-[% FOREACH INPUT IN INPUTS %] >- <input type="hidden" name="[% INPUT.name |html %]" value="[% INPUT.value |html %]" /> >-[% END %] >-<h3>Welcome to the Koha web installer</h3> >-<p>Before we begin, please verify you have the correct credentials to continue. Please log in >-with the username and password given to you by your systems administrator and located in your >-<code>koha-conf.xml</code> configuration file.</p> >-<p>Please enter your username and password:</p> >-<p><label>Username:<br /> >-<input type="text" name="userid" id="userid" class="input" value="[% userid %]" size="20" tabindex="1" /></label> >-</p> >-<p><label>Password:<br /> >-<input type="password" name="password" id="password" class="input" value="" size="20" tabindex="2" /></label> >-</p> >-<p class="submit"><input id="submit" type="submit" value="Login" tabindex="4" /></p> >-</form> >- >-[% END %] > >+<div class="container-fluid"> >+ <div class="row"> >+ <div id="installer-login" class="installer-main col-sm-6 col-sm-offset-3 col-md-6 col-md-offset-3"> >+ >+ <h1 id="logo"><a href="#">Koha</a></h1> >+ >+ [% IF ( nopermission ) %] >+ <div id="login_error"><strong>Error: </strong>Unauthorized user <a href="/cgi-bin/koha/mainpage.pl?logout.x=1">click to log out</a></div> >+ [% END %] >+ >+ [% IF ( timed_out ) %] >+ <div id="login_error"><strong>Error: </strong>Session timed out, please log in again</div> >+ [% END %] >+ >+ [% IF ( different_ip ) %] >+ <div id="login_error"><strong>Error: </strong>IP address has changed, please log in again </div> >+ [% END %] >+ >+ [% IF ( invalid_username_or_password ) %] >+ <div id="login_error"><strong>Error: </strong>Invalid username or password</div> >+ [% END %] >+ >+ [% IF ( loginprompt ) %] >+ <h2>Welcome to the Koha [%- Koha.Version.release -%] web installer</h2> >+ >+ <p>Before we begin, please verify you have the correct credentials to continue. Please log in with the username and password given to you by your systems administrator and located in your <code>koha-conf.xml</code> configuration file.</p> >+ >+ <form action="[% url %]" method="post" role="form" id="mainform"> >+ [% FOREACH INPUT IN INPUTS %] >+ <input type="hidden" name="[% INPUT.name |html %]" value="[% INPUT.value |html %]" /> >+ [% END %] >+ >+ <fieldset> >+ <legend>Please enter your username and password</legend> >+ >+ <div class="form-group"> >+ <label>Username:</label> >+ <input type="text" class="form-control" name="userid" id="userid" value="[% userid %]" size="20" tabindex="1" /> >+ </div> >+ <div class="form-group"> >+ <label>Password:</label> >+ <input type="password" class="form-control" name="password" id="password" value="" size="20" tabindex="2" /> >+ </div> >+ <input id="submit" type="submit" class="btn btn-primary" value="Log in" tabindex="3" /></p> >+ </fieldset> >+ </form> >+ [% END %] >+ </div> >+ </div> >+</div> > [% INCLUDE 'intranet-bottom.inc' %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step1.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step1.tt >index 89da761..9647ae9 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step1.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step1.tt >@@ -1,82 +1,98 @@ > [% INCLUDE 'doc-head-open.inc' %] >-<title>Koha › Web installer › Step 1</title> >-[% INCLUDE 'installer-doc-head-close.inc' %] >-<div> >-<h1 id="logo"><img alt="Koha" src="[% interface %]/[% theme %]/img/koha.org-logo.gif" /> Web installer › Step 1</h1> >-[% UNLESS ( language ) %] >-<p>You are about to install Koha.</p> >- >-<p>Please pick your language from the following list. If your language is not >-listed, please inform your systems administrator.</p> >-<form name="language" method="post"> >-<select name="language"> >-[% IF ( installer_languages_loop ) %] >- [% FOREACH installer_languages_loo IN installer_languages_loop %] >- [% IF ( installer_languages_loo.plural ) %] >- <optgroup label="[% installer_languages_loo.language %]"> >- [% FOREACH sublanguages_loo IN installer_languages_loo.sublanguages_loop %] >- <option value="[% sublanguages_loo.rfc4646_subtag %]">[% IF ( sublanguages_loo.native_description ) %][% sublanguages_loo.native_description %][% ELSE %][% sublanguages_loo.rfc4646_subtag %][% END %]</option> >+<title>Koha › Web installer › >+ [% UNLESS ( language ) %] Choose your language [% END %] >+ [% IF ( language ) %] >+ [% UNLESS ( checkmodule ) %] >+ [% IF ( missing_modules ) %] >+ Perl modules missing > [% END %] >- </optgroup> >- [% ELSE %] >- <option value="[% installer_languages_loo.rfc4646_subtag %]">[% IF ( installer_languages_loo.native_description ) %][% installer_languages_loo.native_description %][% ELSE %][% installer_languages_loo.rfc4646_subtag %][% END %]</option> >+ [% IF ( problems ) %] >+ Perl version obsolete > [% END %] > [% END %] >-[% END %] >-</select> >-</p> >- >-<p> Click 'Next' to continue <input value="Next >>" type="submit" /></p> >-</form> >-[% END %] >-[% IF ( language ) %] >- [% IF ( checkmodule ) %] >- <p>All required Perl modules appear to be installed.<br /> >- [% ELSE %] >- [% IF ( missing_modules ) %] >- <p><b>Warning: </b>Some Perl modules are missing.<br />Modules in red must be installed before you may continue.<br /> >- <ul> >- [% FOREACH missing_module IN missing_modules %] >- [% IF ( missing_module.require ) %] >- <li style="color:#FF0000;font-weight:bold;">[% missing_module.name %] >- [% ELSE %] >- <li>[% missing_module.name %] >+ Check Perl dependencies > [% END %] >- <br /> Version: [% missing_module.version %] >- <br /> Usage: [% missing_module.usage %] >- </li> >- [% END %] >- [% END %] >- [% IF ( problems ) %] >- <p>I encountered some problems.</p> >- <ul> >- [% IF ( perlversion ) %] >- <li>Your Perl version seems to be obsolete. >- Please upgrade to a newer version of Perl (at least Version 5.10).</li> >- [% END %] >- </ul> >- [% END %] >- [% END %] >-<form name="checkmodules" action="install.pl"> >-[% IF ( checkmodule ) %] >-[% IF (op == 'noop') %] >-<input type="hidden" name="step" value="2" /> >-[% ELSE %] >-<input type="hidden" name="step" value="3" /> >-<input type="hidden" name="op" value="[% op %]" /> >-<input type="hidden" name="checkmodule" value="[% checkmodule %]"/> >-[% END %] >-<p> All dependencies installed.</p> >-<p>Please click 'Next' to continue <input value="Next >>" type="submit" /></p> >-[% ELSE %] >-[% IF (op == 'noop') %] >-<input type="hidden" name="step" value="1" /> >-[% ELSE %] >-<input type="hidden" name="step" value="1" /> >-<input type="hidden" name="op" value="[% op %]" /> >-[% END %] >-<p>Click to recheck dependencies <input value="Recheck" type="submit" /></p> >-[% END %] >-</form> >-[% END %] >+</title> >+[% INCLUDE 'installer-doc-head-close.inc' %] >+ >+<div class="container-fluid"> >+ <div class="row"> >+ <div id="installer-step1" class="installer-main col-sm-8 col-sm-offset-2 col-md-8 col-md-offset-2"> >+ >+ <h1 id="logo"><a href="#">Koha</a></h1> >+ >+ [% UNLESS ( language ) %] >+ <h2>Web installer › Choose your language</h2> >+ <p>You are about to install Koha.</p> >+ >+ <p>Please pick your language from the following list. If your language is not listed, please inform your system administrator.</p> >+ >+ <form name="language" role="form" method="post" action="install.pl"> >+ <div class="form-group"> >+ <label for="language">Select a language: </label> >+ <select id="language" name="language"> >+ [% IF ( installer_languages_loop ) %] >+ [% FOREACH installer_languages_loo IN installer_languages_loop %] >+ [% IF ( installer_languages_loo.plural ) %] >+ <optgroup label="[% installer_languages_loo.language %]"> >+ [% FOREACH sublanguages_loo IN installer_languages_loo.sublanguages_loop %] >+ <option value="[% sublanguages_loo.rfc4646_subtag %]">[% IF ( sublanguages_loo.native_description ) %][% sublanguages_loo.native_description %][% ELSE %][% sublanguages_loo.rfc4646_subtag %][% END %]</option> >+ [% END %] >+ </optgroup> >+ [% ELSE %] >+ <option value="[% installer_languages_loo.rfc4646_subtag %]">[% IF ( installer_languages_loo.native_description ) %][% installer_languages_loo.native_description %][% ELSE %][% installer_languages_loo.rfc4646_subtag %][% END %]</option> >+ [% END %] >+ [% END %] >+ [% END %] >+ </select> >+ </div> >+ >+ <p><input value="Continue to the next step" class="btn btn-primary" type="submit" /></p> >+ </form> >+ [% END %] >+ >+ [% IF ( language ) %] >+ [% UNLESS ( checkmodule ) %] >+ [% IF ( missing_modules ) %] >+ <h2>Web installer › Perl modules missing</h2> >+ <p>Some Perl modules are missing. <span class="label label-danger">Required</span> modules <b>must</b> be installed before you may continue.<br /> >+ <ul> >+ [% FOREACH missing_module IN missing_modules %] >+ <li><strong>[% missing_module.name %]</strong> [% IF ( missing_module.require ) %]<span class="label label-danger">Required</span>[% END %] >+ <br /> Version: [% missing_module.version %] >+ <br /> Usage: [% missing_module.usage %] >+ </li> >+ [% END %] >+ </ul> >+ [% END %] >+ >+ [% IF ( problems ) %] >+ <h2>Web installer › Perl version too old</h2> >+ <p>I encountered some problems.</p> >+ <ul> >+ [% IF ( perlversion ) %] >+ <li>Your Perl version is out of date. Please upgrade to a newer version of Perl (at least version 5.10).</li> >+ [% END %] >+ </ul> >+ [% END %] >+ >+ <form name="checkmodules" role="form" action="install.pl"> >+ <input type="hidden" name="step" value="1" /> >+ <p> <input value="Recheck dependencies" class="btn btn-primary" type="submit" /></p> >+ </form> >+ >+ [% ELSE # IF checkmodule %] >+ <h2>Web installer › Check Perl dependencies</h2> >+ <p>All required Perl modules appear to be installed.</p> >+ <p> All dependencies installed.</p> >+ >+ <form name="checkmodules" role="form" action="install.pl"> >+ <input type="hidden" name="step" value="2" /> >+ <p> <input value="Continue to the next step" class="btn btn-primary" type="submit" /> </p> >+ </form> >+ [% END # IF checkmodule%] >+ [% END # IF language %] >+ </div> >+ </div> >+ > [% INCLUDE 'intranet-bottom.inc' %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step2.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step2.tt >index d7194b9..aaea508 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step2.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step2.tt >@@ -1,63 +1,70 @@ >-[% INCLUDE 'doc-head-open.inc' %]<title>Koha › Web installer › Step 2</title> >+[% INCLUDE 'doc-head-open.inc' %]<title>Koha › Web installer › Database settings</title> > [% INCLUDE 'installer-doc-head-close.inc' %] >-<div> >-<h1 id="logo"><img alt="Koha" src="[% interface %]/[% theme %]/img/koha.org-logo.gif" /> Web installer › Step 2</h1> >-<h2 align="center">Database settings:</h2> >-<ul> >-<li><em>database type : </em>[% dbms %]</li> >-<li><em>database name : </em>[% dbname %]</li> >-<li><em>database host : </em>[% hostname %]</li> >-<li><em>database port : </em>[% port %] (probably OK if blank)</li> >-<li><em>database user : </em>[% user %]</li> >-</ul> >-<div> >-[% IF ( dbconnection ) %] >-<form name="checkdbparameters" type="post" action="install.pl"> >- [% IF ( checkdatabaseaccess ) %] >- <p>Connection established.</p> >- [% IF ( checkdatabasecreated ) %] >- <p>Database <code>[% dbname %]</code> exists.</p> >- [% IF ( checkgrantaccess ) %] >- <p>User <code>[% user %]</code> has all required privileges on database <code>[% dbname %]</code>.</p> >- [% ELSE %] >- <p class="error">user <code>[% user %]</code> doesn't have enough privilege on database <code>[% dbname %]</code></p> >- <p class="tip">Ask for or make a change in the user's privileges. Need help? See >- [% IF dbms == 'mysql' %]<a href="https://dev.mysql.com/doc/refman/5.5/en/grant.html"> >- [% ELSE %]<a href="http://www.postgresql.org/docs/8.2/interactive/sql-createrole.html"> >- [% END %]this page</a>. >- </p> >- <p class="tip"> >- User <code>[% user %]</code> must have USAGE, INSERT, UPDATE, DELETE, DROP and CREATE privileges on <code>[% dbname %]</code> >- </p> >- [% END %] >- [% ELSE %] >- <p class="error">No database named <code>[% dbname %]</code> detected.</p> >- <p class="tip">Please create the database before continuing.</p> >- [% END %] >- [% ELSE %] >- <div class="error">[% error %] : [% message %] >+ >+<div class="container-fluid"> >+ <div class="row"> >+ <div id="installer-step2" class="installer-main col-sm-8 col-sm-offset-2 col-md-8 col-md-offset-2"> >+ >+ <h1 id="logo"><a href="#">Koha</a></h1> >+ <h2>Web installer › Database settings</h2> >+ <h3>Database settings:</h3> >+ <ul> >+ <li><em>Database type : </em> <code>[% dbms %]</code></li> >+ <li><em>Database name : </em> <code>[% dbname %]</code></li> >+ <li><em>Database host : </em> <code>[% hostname %]</code></li> >+ <li><em>Database port : </em> <code>[% port %]</code> (probably okay if blank)</li> >+ <li><em>Database user : </em> <code>[% user %]</code></li> >+ </ul> >+ >+ [% IF ( dbconnection ) %] >+ <form name="checkdbparameters" role="form" type="post" action="install.pl"> >+ [% IF ( checkdatabaseaccess ) %] >+ <div class="alert alert-success" role="alert"><p>Connection established.</p></div> >+ [% IF ( checkdatabasecreated ) %] >+ <ul> >+ <li>Database <code>[% dbname %]</code> exists.</li> >+ [% IF ( checkgrantaccess ) %] >+ <li>User <code>[% user %]</code> has all required privileges on database <code>[% dbname %]</code>.</li> >+ </ul> >+ [% ELSE %] >+ </ul> >+ <p class="error">user <code>[% user %]</code> doesn't have enough privilege on database <code>[% dbname %]</code> </p> >+ <p class="tip"> Ask for or make a change in the user's privileges. Need help? See [% IF ( mysql ) %] >+ <a href="http://dev.mysql.com/doc/refman/4.1/en/grant.html"> >+ [% ELSE %] >+ <a href="http://www.postgresql.org/docs/8.2/interactive/sql-createrole.html"> >+ [% END %] >+ this page</a>. User <code>[% user %]</code> must have USAGE, INSERT, UPDATE, DELETE, DROP and CREATE privileges on <code>[% dbname %]</code> >+ </p> >+ [% END %] >+ [% ELSE %] >+ <div class="alert alert-danger" role="alert"><p>No database named <code>[% dbname %]</code> detected.</p></div> >+ <p>Please create the database before continuing.</p> >+ [% END %] >+ [% ELSE %] >+ <div class="alert alert-warning" role="alert">[% error %] : [% message %]</div> >+ <div class="tip"> >+ <ul> >+ <li>Check that your database is running.</li> >+ <li>Check your database settings in <code>koha-conf.xml</code>. </li> >+ <li>Check the hostname setting in <code>koha-conf.xml</code>. >+ Some database servers require <code>127.0.0.1</code> rather than <code>localhost</code>.</li> >+ </ul> >+ </div> >+ <p>Please correct these errors and <a href="/cgi-bin/koha/installer/install.pl">start the installer</a> again. >+ [% END %] >+ [% UNLESS ( error ) %] >+ <input type="hidden" name="step" value="3" /> >+ <p> <input value="Continue to the next step" class="btn btn-primary" type="submit" /> </p> >+ [% END %] >+ </form> >+ [% ELSE %] >+ <form name="checkinformation" role="form" type="post" action="install.pl"> >+ <input type="hidden" name="step" value="2" /> >+ <input type="hidden" name="checkdb" value="1" /> >+ <p> <input value="Continue to the next step" class="btn btn-primary" type="submit" /> </p> >+ </form> >+ [% END %] >+ </div> > </div> >- <div class="tip"> >- <ul> >- <li>Check that your database is running.</li> >- <li>Check your database settings in <code>koha-conf.xml</code>. </li> >- <li>Check the hostname setting in <code>koha-conf.xml</code>. >- Some database servers require <code>127.0.0.1</code> rather than <code>localhost</code>.</li> >- </div> >- <p>Please correct these errors and <a href="/cgi-bin/koha/installer/install.pl">start the installer</a> again. >- [% END %] >- [% IF ( error ) %][% ELSE %] >-<input type="hidden" name="step" value="3" /> >-<p> Click 'Next' to continue <input value="Next >>" type="submit" /></p> >-[% END %] >-</form> >-[% ELSE %] >-<form name="checkinformation" type="post" action="install.pl"> >-<input type="hidden" name="step" value="2" /> >-<input type="hidden" name="checkdb" value="1" /> >-<p> Please click 'Next' to continue if this information is correct <input value="Next >>" type="submit" /></p> >-</form> >-[% END %] >-</div> >-</body> >-</html> >+[% INCLUDE 'intranet-bottom.inc' %] >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 4ea9580..b6458fd 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt >@@ -1,311 +1,250 @@ >-[% INCLUDE 'doc-head-open.inc' %]<title>Koha › Web installer › Step 3</title> >-[% IF ( finish ) %]<meta http-equiv="refresh" content="10; url=/cgi-bin/koha/installer/onboarding.pl">[% END %] >+[% INCLUDE 'doc-head-open.inc' %] >+<title>Koha › Web installer › >+ [% IF ( proposeimport ) %] >+ Set up database >+ [% END %] >+ [% IF ( importdatastructure ) %] >+ [% IF ( error ) %] >+ Error creating database tables >+ [% ELSE %] >+ Database tables created >+ [% END %] >+ [% END %] >+ [% IF ( default ) %] >+ [% IF ( upgrading ) %] >+ Update database >+ [% ELSE %] >+ Install basic configuration settings >+ [% END %] >+ [% END %] >+ [% IF ( choosemarc ) %] >+ Select your MARC flavor >+ [% END %] >+ [% IF ( selectframeworks ) %] >+ Selecting default settings >+ [% END %] >+</title> >+[% IF ( finish ) %]<meta http-equiv="refresh" content="5; url=/cgi-bin/koha/installer/onboarding.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 ); >-} >+<div class="container-fluid"> >+ <div class="row"> >+ <div id="installer-step3" class="installer-main col-sm-8 col-sm-offset-2 col-md-8 col-md-offset-2"> > >-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; >+ <h1 id="logo"><a href="#">Koha</a></h1> > >- 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' ; >-} >+ [% IF ( finish ) %] >+ <h2>Web installer › Installation complete</h2> >+ <h3>Congratulations, installation complete</h3> >+ <p> >+ If this page does not redirect in 5 seconds, <a href="/cgi-bin/koha/installer/onboarding.pl">Start onboarding process</a>. >+ </p> >+ [% END %] > >-//]]> >-</script> >-[% END %] > >+ [% IF ( choosemarc ) %] >+ <h2>Choose your setup</h2> >+ <p>Basic setup selects recommended settings by default.</p> >+ <form name="frameworkselection" method="post" action="install.pl"> >+ <input type="hidden" name="step" value="3" /> >+ <input type="hidden" name="op" value="selectframeworks"/> >+ >+ <p> >+ <label><input type="radio" name="setup" value="Basic" checked="checked" /> Basic</label> >+ </p> >+ <p> >+ <label><input type="radio" name="setup" value="Advanced"/> Advanced</label> >+ </p> >+ >+ <h2>Select your MARC flavor</h2> >+ <p>MARC stands for Machine Readable Cataloging, containing information about a bibliographic record. MARC21 is used globally, whereas UNIMARC tends to be used in Europe. </p> >+ >+ [% FOREACH flavourloo IN flavourloop %] >+ [% IF ( flavourloo.label == "Unimarc") %] >+ <p> >+ <label><input type="radio" name="marcflavour" value="[% flavourloo.code %]" /> [% flavourloo.label %]</label> >+ </p> >+ [% ELSE %] >+ <p> >+ <label><input type="radio" name="marcflavour" value="[% flavourloo.code %]" checked="checked" /> [% flavourloo.label %]</label> >+ </p> >+ [% END %] >+ [% END %] >+ <p><input value="Continue to the next step" class="btn btn-primary" type="submit" /> </p> >+ </form> >+ [% END # / IF choosemarc %] > >-[% IF ( finish ) %] >- <h1>Congratulations, installation complete</h1> >- <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 %] >+ [% IF ( selectframeworks ) %] >+ <h2>Web installer › [% setup %] setup › Selecting default settings</h2> > >+ [% IF setup == "Advanced" %] >+ <p id="selectall"><a href="#">Select all sample data</a></p> >+ [% END %] > >-[% IF ( choosemarc ) %] >- <h2 align="center">Choose your setup</h2> >- <p>Basic setup selects recommended settings by default.</p> >- <form name="frameworkselection" method="post" action="install.pl"> >- <input type="hidden" name="step" value="3" /> >- <input type="hidden" name="op" value="selectframeworks"/> >+ <form name="frameworkselection" method="post" action="install.pl"> >+ <input type="hidden" name="step" value="3" /> >+ <input type="hidden" name="op" value="addframeworks" /> >+ [% IF ( frameworksloop ) %] >+ <h3>MARC frameworks: [% marcflavour %]</h3> >+ [% 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 %] >+ <h4>[% frameworksloo.label %]</h4> >+ [% FOREACH framework IN frameworksloo.frameworks %] >+ <div class="checkbox"> >+ <label> >+ [% 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 %] >+ [% framework.fwkdescription %] >+ <em>([% framework.fwkname %])</em> >+ </label> >+ </div> >+ <hr /> >+ [% END # / FOREACH framework %] >+ [% END # / FOREACH frameworksloo %] >+ [% END # / IF frameworkdsloop %] >+ >+ <h2>Other data</h2> >+ >+ [% 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 %] > >- <div> >- <input type="radio" name="setup" value="Basic" checked="checked">Basic<br/> >- <input type="radio" name="setup" value="Advanced"/>Advanced<br/> >- </div> >+ [% FOREACH levelloo IN levelloop %] >+ <h4>[% levelloo.label %]</h4> > >- <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> >+ [% IF (setup == "Basic" && levelloo.label == "Optional") %] >+ <p id="selectall"><a href="#">Select all sample data</a></p> >+ [% END %] > >- [% FOREACH flavourloo IN flavourloop %] >- <div> >- [% IF ( flavourloo.label == "Unimarc") %] >- <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 %] >+ [% FOREACH framework IN levelloo.frameworks %] >+ <div class="checkbox"> >+ <label for="[% framework.fwkname %]"> >+ [% 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 %] >+ [% framework.fwkdescription %] >+ <em>([% framework.fwkname %])</em> >+ </label> >+ </div> <!-- /div.checkbox --> >+ [% END # / FOREACH framework %] >+ [% END # / FOREACH levelloo %] > >- <p>Click 'Next' to continue <input value="Next >>" type="submit" /></p> >+ <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> > >- </form> >+ <p><input type="submit" value="Import" class="btn btn-primary" /></p> >+ </form> >+ [% END # / IF selectframeworks %] > >-[% END %] >+ [% IF ( addframeworks ) %] >+ <h2>Web installer › Default data loaded</h2> > >-[% IF ( selectframeworks ) %] >- <h2 align= "center"> [% setup %] setup</h2> >- <h2 align="center">Selecting Default Settings</h2> >+ [% FOREACH lis IN list %] >+ <h3>[% lis.level FILTER ucfirst %] data added</h3> > >- [% 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> >+ <ul> >+ [% FOREACH fwklis IN lis.fwklist %] > <li> >- <label for="[% framework.fwkname %]"> >- [% framework.fwkdescription %] >- <em>([% framework.fwkname %])</em> >- </label> >+ [% fwklis.fwkname %] >+ [% IF ( fwklis.error ) %]<p class="bg-danger">[% fwklis.error %]</p>[% END %] > </li> >- </ul> >- </td> >- [% ELSE %] >- <td> >- <label for= "[% framework.fwkname %]"> >- [% framework.fwkdescription %] >- <em>([% framework.fwkname %])</em> >- </label> >- </td> >- [% END %] >- </tr> >- </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> >- >- [% 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 %] >- >- [% 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 %] >+ </ul> > [% 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> >+ >+ <h3>All done!</h3> >+ <p>Installation complete.</p> >+ <form action="/cgi-bin/koha/installer/install.pl" method="post" name="finish"> >+ <input type="hidden" name="step" value="3" /> >+ <input type="hidden" name="op" value="finish" /> >+ <p> <input value="Set up some of Koha's basic requirements" class="btn btn-primary" type="submit" /> </p> >+ </form> >+ >+ [% END # / IF addframeworks %] >+ >+ [% IF ( importdatastructure ) %] >+ [% IF ( error ) %] >+ <p>The following error occurred while importing the database structure:</p> >+ <div class="alert alert-warning"><p>[% error %] </p></div> >+ <p>Please contact your system administrator</p> > [% ELSE %] >- <td> >- <label for= "[% framework.fwkname %]"> >- [% framework.fwkdescription %] >- <em>([% framework.fwkname %])</em> >- </label> >- </td> >+ <h2>Web installer › Success</h2> >+ <div class="alert alert-success"><p>Database tables created</p></div> >+ <form action="install.pl" method="post"> >+ <input type="hidden" name="step" value="3" /> >+ <p> <input value="Continue to the next step" class="btn btn-primary" type="submit" /> </p> >+ </form> > [% END %] >- </tr> >- </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 '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 up Koha with the onboarding tool"/> >- </form> >- </p> >- </p> >-[% END %] >- >+ [% 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 ) %] >+ <h2>Web installer › Set up database</h2> >+ <p>Now we're ready to create the database tables and fill them with some default data.</p> >+ <form action="install.pl" method="post"> >+ <input type="hidden" name="step" value="3" /> >+ <input type="hidden" name="op" value="importdatastructure" /> >+ <p><input value="Continue to the next step" class="btn btn-primary" type="submit" /></p> >+ </form> >+ [% END %] > >+ [% IF ( default ) %] >+ [% IF ( upgrading ) %] >+ <h2>Web installer › Update database</h2> >+ <p>We are upgrading from Koha [% dbversion %] to [% kohaversion %]</p> >+ <p><a href="install.pl?step=3&op=updatestructure" class="btn btn-primary">Update your database</a></p> >+ [% ELSE %] >+ <h2>Web installer › Install basic configuration settings</h2> >+ <p>We are ready to do some basic configuration.</p> >+ <p> <a href="install.pl?step=3&op=choosemarc" class="btn btn-primary">Continue to the next step</a> </p> >+ [% 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 ( updatestructure ) %] >+ <h2>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 ( default ) %] >- [% IF ( upgrading ) %] >- <p> >- We are upgrading from Koha [% dbversion %] to [% kohaversion %], you must update your database. >- <br> >- <a href="install.pl?step=3&op=updatestructure" class="button"><button>Update Database</button></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> >+ [% 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 %] > >- [% END %] >-[% END %] >+ [% UNLESS ( has_update_errors ) %] >+ <p>Everything went okay. Update done.</p> >+ [% END %] >+ <p><a href="install.pl?step=3&op=finished" class="btn btn-primary">Continue to log in to Koha</a></p> >+ [% END # / IF updatestructure %] >+ </div> >+</div> > >-[% 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=choosemarc" class="button"><button>Back to Installation</button></a> >- </div> >+[% IF ( selectframeworks ) %] >+ <script type="text/javascript"> >+ $(document).ready(function(){ >+ $("#selectall").on("click",function(e){ >+ e.preventDefault(); >+ $("input:checkbox").prop("checked", true); >+ }); >+ }); >+ </script> > [% END %] > >-</div> >-</body> >-</html> >+[% INCLUDE 'intranet-bottom.inc' %] >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 b295fc9..0c74249 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep1.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep1.tt >@@ -1,81 +1,71 @@ > <!--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' %] >- > [% IF (libraries && libraries.count > 1) %] > <meta http-equiv="refresh" content="0; url=/cgi-bin/koha/installer/onboarding.pl?step=2"> >+[% END %] >+<title>Koha › Web installer › Create a library</title> >+[% INCLUDE 'installer-doc-head-close.inc' %] >+</head> > >-[% ELSIF (op == "add_validate_library") %] >- <head> >- <title>Welcome › to › Koha</title> >- </head> >+<body id="installer" class="installer"> >+ <div class="container-fluid"> >+ <div class="row"> >+ <div id="installer-step3" class="installer-main col-sm-8 col-sm-offset-2 col-md-8 col-md-offset-2"> > >- <!--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> >+ <h1 id="logo"><a href="#">Koha</a></h1> >+ >+ [% IF (op == "add_validate_library") %] > >-<!--New Library created--> >- [% IF message == "success_on_insert" %] >- <form name="createlibrary" method="post" action="onboarding.pl" > >- <input type="hidden" name="step" value="2"/> >- <h1 align="left"> New library</h1> >- <div> >- <p> Success: library created! >- </p> >- <p> To add another library and for more settings, <br> >- go to:<br> >- More -> Administration -> Libraries and groups<br> >- </p> >- </div> >- Next up: >- <input type="submit" name="start" value="Minimal patron category setup"/> >- </form> >+ <!--New Library created--> > >- [%ELSE %] >- <form name="retrylibrary" method="post" action="onboarding.pl"> >- <input type="hidden" name="step" value="1"/> >- <h1 align="left">Failed </h1> >- <div> >- <p> Library was not successfully created</br> >- Please try again or contact your system administrator. </p> >- </div> >- <input type="submit" value="Try again"/> >- </form> >- [%END%] >+ [% IF message == "success_on_insert" %] >+ <h2>Web installer › Library created</h2> > >-[% ELSE %] >- <head> >- <title>Welcome › to › Koha</title> >- </head> >+ <form name="createlibrary" method="post" action="onboarding.pl" > >+ <input type="hidden" name="step" value="2" /> >+ <div class="alert alert-success">Success: Library created!</div> >+ <p> To add another library and for more settings, go to: </p> >+ <div class="breadcrumbs"> Administration <b>›</b> Libraries and groups </div> >+ <input type="submit" name="start" class="btn btn-primary" value="Continue to the next step"/> >+ </form> >+ [% ELSE %] >+ <h2>Web installer › Library creation failed</h2> > >- <!--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> >+ <form name="retrylibrary" method="post" action="onboarding.pl"> >+ <input type="hidden" name="step" value="1"/> >+ <div class="alert alert-danger">Library was not successfully created</div> >+ <p>Please try again or contact your system administrator.</p> >+ <input type="submit" class="btn btn-primary" value="Try again"/> >+ </form> >+ [% END %] >+ >+ [% ELSE %] >+ >+ <!--Create a library screen 1--> >+ <h2>Web installer › Create a library</h2> >+ >+ <form name="LibraryCreation" method="post" action="onboarding.pl"> >+ <fieldset class="rows" > >+ <input type="hidden" name="step" value="1"/> >+ <input type="hidden" name="op" value="add_validate_library"/> >+ <ol> >+ <li> >+ <label for="branchcode" class="required">Library code: </label> >+ <input type="text" pattern="^[A-Za-z]{0,10}$" title="Please enter 3 capital letters" name="branchcode" id="branchcode" size="3" maxlength="10" class="required" required="required" /> >+ <span class="required">Required</span> >+ </li> >+ <li> >+ <label for="branchname" class="required">Name: </label> >+ <input type="text" name="branchname" id="branchname" size="42" class="required" required="required"> >+ <span class="required">Required</span> >+ </li> >+ </ol> >+ <input type="submit" class="btn btn-primary" value="Submit" /> >+ </fieldset> >+ </form> >+ >+ [% END # / IF add_validate_library %] > </div> >+</div> > >-<!--Create a library screen 1--> >- <form name="LibraryCreation" method="post" action="onboarding.pl"> >- <fieldset class="rows" > >- <h2>Create a library</h2> >- <input type="hidden" name="step" value="1"/> >- <input type="hidden" name="op" value="add_validate_library"/> >- <ol> >- <li> >- <label for="branchcode" class="required">Library code: </label> >- <input type="text" pattern="[0-9A-Za-z]{1,10}" title="Please enter up to 10 letters and/or numbers" name="branchcode" id="branchcode" size="10" maxlength="10" value="[% library.branchcode |html %]" class="required" required="required" /> >- <span class="required">Required</span> >- </li> >- <li> >- <label for="branchname" class="required">Name: </label> >- <input type="text" name="branchname" id="branchname" title="Please enter the name of your institution" size="42" value="[% library.branchname |html %]" class=" required" required="required" style="width:200px;"> >- <span class="required">Required</span> >- </li> >- </ol> >- <br> >- <input type="submit" class="action" value="Submit"/> >- </fieldset> >- </form> >-[% END %] >+[% INCLUDE 'intranet-bottom.inc' %] >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 86b68f2..e41c2ea 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep2.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep2.tt >@@ -3,394 +3,137 @@ > [% USE KohaDates %] > [% USE Price %] > [% INCLUDE 'doc-head-open.inc' %] >-<title> Add a patron category</title> >+<title>Koha › Web installer › Add a patron category</title> >+[% 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 %] >+ <meta http-equiv="refresh" content="0; url=/cgi-bin/koha/installer/onboarding.pl?step=3"> >+[% END %] > [% INCLUDE 'installer-doc-head-close.inc' %] > [% INCLUDE 'calendar.inc' %] >- >-<script type="text/javascript"> >-//<![CDATA[ >- >-var debug = ""; >-var dformat = "us"; >-var sentmsg = 0; >-if (debug > 1) {alert("dateformat: " + dformat + "\ndebug is on (level " + debug + ")");} >-var MSG_PLEASE_ENTER_A_VALID_DATE = (_("Please enter a valid date (should match %s).")); >- >-function is_valid_date(date) { >- // An empty string is considered as a valid date for convenient reasons. >- if ( date === '' ) return 1; >- var dateformat = dateformat_str = 'us'; >- if ( dateformat == 'us' ) { >- if ( date.search(/^\d{2}\/\d{2}\/\d{4}($|\s)/) == -1 ) return 0; >- dateformat = 'mm/dd/yy'; >- } else if ( dateformat == 'metric' ) { >- if ( date.search(/^\d{2}\/\d{2}\/\d{4}($|\s)/) == -1 ) return 0; >- dateformat = 'dd/mm/yy'; >- } else if (dateformat == 'iso' ) { >- if ( date.search(/^\d{4}-\d{2}-\d{2}($|\s)/) == -1 ) return 0; >- dateformat = 'yy-mm-dd'; >- } else if ( dateformat == 'dmydot' ) { >- if ( date.search(/^\d{2}\.\d{2}\.\d{4}($|\s)/) == -1 ) return 0; >- dateformat = 'dd.mm.yy'; >- } >- try { >- $.datepicker.parseDate(dateformat, date); >- } catch (e) { >- return 0; >- }; >- return 1; >-}function get_dateformat_str(dateformat) { >- var dateformat_str; >- if ( dateformat == 'us' ) { >- dateformat_str = 'mm/dd/yyyy'; >- } else if ( dateformat == 'metric' ) { >- dateformat_str = 'dd/mm/yyyy'; >- } else if (dateformat == 'iso' ) { >- dateformat_str = 'yyyy-mm-dd'; >- } else if ( dateformat == 'dmydot' ) { >- dateformat_str = 'dd.mm.yyyy'; >- } >- return dateformat_str; >-} >- >-function validate_date (dateText, inst) { >- if ( !is_valid_date(dateText) ) { >- var dateformat_str = get_dateformat_str( 'us' ); >- alert(MSG_PLEASE_ENTER_A_VALID_DATE.format(dateformat_str)); >- $('#'+inst.id).val(''); >- } >-} >-function Date_from_syspref(dstring) { >- var dateX = dstring.split(/[-/.]/); >- if (debug > 1 && sentmsg < 1) {sentmsg++; alert("Date_from_syspref(" + dstring + ") splits to:\n" + dateX.join("\n"));} >- if (dformat === "iso") { >- return new Date(dateX[0], (dateX[1] - 1), dateX[2]); // YYYY-MM-DD to (YYYY,m(0-11),d) >- } else if (dformat === "us") { >- return new Date(dateX[2], (dateX[0] - 1), dateX[1]); // MM/DD/YYYY to (YYYY,m(0-11),d) >- } else if (dformat === "metric") { >- return new Date(dateX[2], (dateX[1] - 1), dateX[0]); // DD/MM/YYYY to (YYYY,m(0-11),d) >- } else if (dformat === "dmydot") { >- return new Date(dateX[2], (dateX[1] - 1), dateX[0]); // DD.MM.YYYY to (YYYY,m(0-11),d) >- } else { >- if (debug > 0) {alert("KOHA ERROR - Unrecognized date format: " +dformat);} >- return 0; >- } >-} >- >-function DateTime_from_syspref(date_time) { >- var parts = date_time.split(" "); >- var date = parts[0]; >- var time = parts[1]; >- parts = time.split(":"); >- var hour = parts[0]; >- var minute = parts[1]; >- if ( hour < 0 || hour > 23 ) { >- return 0; >- } >- if ( minute < 0 || minute > 59 ) { >- return 0; >- } >- var datetime = Date_from_syspref( date ); >- if ( isNaN( datetime.getTime() ) ) { >- return 0; >- } >- datetime.setHours( hour ); >- datetime.setMinutes( minute ); >- return datetime; >-} >- >-/* Instead of including multiple localization files as you would normally see with >- jQueryUI we expose the localization strings in the default configuration */ >-jQuery(function($){ >- $.datepicker.regional[''] = { >- closeText: _("Done"), >- prevText: _("Prev"), >- nextText: _("Next"), >- currentText: _("Today"), >- monthNames: [_("January"),_("February"),_("March"),_("April"),_("May"),_("June"), >- _("July"),_("August"),_("September"),_("October"),_("November"),_("December")], >- monthNamesShort: [_("Jan"), _("Feb"), _("Mar"), _("Apr"), _("May"), _("Jun"), >- _("Jul"), _("Aug"), _("Sep"), _("Oct"), _("Nov"), _("Dec")], >- dayNames: [_("Sunday"), _("Monday"), _("Tuesday"), _("Wednesday"), _("Thursday"), _("Friday"), _("Saturday")], >- dayNamesShort: [_("Sun"), _("Mon"), _("Tue"), _("Wed"), _("Thu"), _("Fri"), _("Sat")], >- dayNamesMin: [_("Su"),_("Mo"),_("Tu"),_("We"),_("Th"),_("Fr"),_("Sa")], >- weekHeader: _("Wk"), >- dateFormat: "mm/dd/yy", >- firstDay: 0, >- isRTL: false, >- showMonthAfterYear: false, >- yearSuffix: ''}; >- $.datepicker.setDefaults($.datepicker.regional['']); >- }); >- >-$(document).ready(function(){ >- $.datepicker.setDefaults({ >- showOn: "both", >- changeMonth: true, >- changeYear: true, >- buttonImage: '/[% interface %]/prog/img/famfamfam/silk/calendar.png', >- buttonImageOnly: true, >- showButtonPanel: true, >- showOtherMonths: true, >- selectOtherMonths: true >- }); >- $( ".datepicker" ).datepicker({ >- onClose: function(dateText, inst) { >- validate_date(dateText, inst); >- }, >- }).on("change", function(e, value) { >- if ( ! is_valid_date( $(this).val() ) ) {$(this).val("");} >- }); >- // http://jqueryui.com/demos/datepicker/#date-range >- var dates = $( ".datepickerfrom, .datepickerto" ).datepicker({ >- changeMonth: true, >- numberOfMonths: 1, >- onSelect: function( selectedDate ) { >- var option = this.id == "from" ? "minDate" : "maxDate", >- instance = $( this ).data( "datepicker" ); >- date = $.datepicker.parseDate( >- instance.settings.dateFormat || >- $.datepicker._defaults.dateFormat, >- selectedDate, instance.settings ); >- dates.not( this ).datepicker( "option", option, date ); >- }, >- onClose: function(dateText, inst) { >- validate_date(dateText, inst); >- }, >- }).on("change", function(e, value) { >- if ( ! is_valid_date( $(this).val() ) ) {$(this).val("");} >- }); >-}); >-//]]> >-</script> >- >- >-<script type="text/javascript"> >- var MSG_CATEGORYCODE_CHARS=(_("Please only enter letters into this field.")); >- var MSG_ONE_ENROLLMENTPERIOD =(_("Please choose an enrollment period in months OR by date.")); >- var MSG_ONLY_ONE_ENROLLMENTPERIOD=(_("Please only choose one enrolment period.")); >-</script> >- >-<script type="text/javascript"> >-jQuery.validator.addMethod( "category_code_check", function(value,element){ >- var patt = /[0-9A-Za-z]{1,10}$/g; >- if (patt.test(element.value)) { >- return true; >- } else { >- return false; >- } >- }, MSG_CATEGORYCODE_CHARS >-); >- >-jQuery.validator.addMethod( "enrollment_period", function(){ >- enrolmentperiod = $("#enrolmentperiod").val(); >- enrolmentperioddate = $("#enrolmentperioddate").val(); >- if (( $("#enrolmentperiod").val() == "" && $("#enrolmentperioddate").val() == "") || ($("#enrolmentperiod").val() !== "" && $("#enrolmentperioddate").val() !== "")) { >- return false; >- } else { >- return true; >- } >- }, MSG_ONLY_ONE_ENROLLMENTPERIOD >-); >- >-$(document).ready(function() { >- $("#enrolmentperioddate").datepicker({ >- minDate: 1 >- }); // Require that "until date" be in the future >- if ($("#branches option:selected").length < 1) { >- $("#branches option:first").attr("selected", "selected"); >- } >- $("#categorycode").on("blur",function(){ >- toUC(this); >- }); >- $("#category_form").validate({ >- rules: { >- categorycode: { >- required: true, >- category_code_check: true >- }, >- description: { >- required:true, >- }, >- enrolmentperiod: { >- required: function(element){ >- return $("#enrolmentperioddate").val() === ""; >- }, >- digits: true, >- enrollment_period: true, >- }, >- enrolmentperioddate: { >- required: function(element){ >- return $("#enrolmentperiod").val() === ""; >- }, >- enrollment_period: true, >- }, >- dateofbirthrequired: { >- digits: true >- }, >- upperagelimit: { >- digits: true >- }, >- enrolmentfee: { >- number: true >- }, >- reservefee: { >- number: true >- }, >- category_type: { >- required: true >- } >- }, >- messages: { >- categorycode: { >- required: MSG_CATEGORYCODE_CHARS >- }, >- enrolmentperiod: { >- required: MSG_ONE_ENROLLMENTPERIOD >- }, >- enrolmentperioddate: { >- required: MSG_ONE_ENROLLMENTPERIOD >- } >- } >- }); >-}); >- >-</script> >+[% INCLUDE 'validator-strings.inc' %] >+[% INCLUDE 'installer-strings.inc' %] >+<script type="text/javascript" src="[% interface %]/[% theme %]/js/onboarding.js"></script> > </head> > >-[% 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--> >- >- >- <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--> >- >- <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> To add another patron category and for more settings<br> >- go to:<br> >- More -> Administration -> Patron categories<br> >- </div> >- Next up:<br> >- <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 %] >- <form name="retrypatcat" method="post" action="onboarding.pl"> >- Message is [% message %] >- <input type="hidden" name="step" value="2"/> >- <h1 align="left">Failed</h1> >- <div>Patron category was not successfully created.</br> >- Please try again or contact your system administrator.</p> >- </div> >- <input type="submit" value="Try again"/> >- </form> >- [% END %] >- >- >-[% ELSE %] <!--Else display create patron category screen 1 where the user can input values to create their first patron category--> >- <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="op" value="add_validate_category" /> >- <ol> >- <li> >- <label for="categorycode" class="required">Category code: </label> >- <input type="text" pattern="[0-9A-Za-z]{1,10}" title="Please enter up to 10 letters and/or numbers" id="categorycode" 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" title="Please enter a description of the category" 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" value="overduenoticerequired"> >- [% IF category.overduenoticerequired %] >- <option value="0">No</option> >- <option value="1" selected="selected">Yes</option> >- [% ELSE %] >+<body id="installer" class="installer"> >+ >+ <div class="container-fluid"> >+ <div class="row"> >+ <div id="installer-step3" class="installer-main col-sm-8 col-sm-offset-2 col-md-8 col-md-offset-2"> >+ >+ <h1 id="logo"><a href="#">Koha</a></h1> >+ >+ [% IF (op == "add_validate_category") >+ # 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 %] >+ >+ [% IF message != "error_on_insert" %] >+ >+ <h2>Web installer › Patron category created</h2> >+ >+ <form name="createcat" method="post" action="onboarding.pl"> >+ <input type="hidden" name="step" value="3"/> >+ <div class="alert alert-success">Success: Patron category created! </div> >+ <p> To add another patron category and for more settings go to:</p> >+ <div class="breadcrumbs"> Administration <b>›</b> Patron categories</div> >+ <input type="submit" class="btn btn-primary" name="start" value="Continue to the next step" /> >+ </form> >+ [% ELSE %] >+ >+ <h2>Web installer › Patron category creation failed</h2> >+ >+ <form name="retrypatcat" method="post" action="onboarding.pl"> >+ <input type="hidden" name="step" value="2"/> >+ <div class="alert alert-danger"> >+ Patron category was not successfully created. >+ Message is [% message %] >+ </div> >+ <p>Please try again or contact your system administrator.</p> >+ <input type="submit" class="btn btn-primary" value="Try again" /> >+ </form> >+ [% END %] >+ >+ >+ [% ELSE >+ # Else display create patron category screen 1 where the user >+ # can input values to create their first patron category %] >+ >+ <h2>Web installer › Create a patron category</h2> >+ >+ <p> The patron category you create will be used by the <span class="bg-info">administrator account</span>.</p> >+ >+ <form id="category_form" method="post" action="onboarding.pl"> >+ <fieldset class="rows"> >+ <input type="hidden" name="step" value="2"/> >+ <input type="hidden" name="op" value="add_validate_category" /> >+ <ol> >+ <li> >+ <label for="categorycode" class="required">Category code: </label> >+ <input type="text" id="categorycode" name="categorycode" 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" id="description" name="description" size="40" class="required" required="required" /> >+ <span class="required">Required</span> >+ </li> >+ >+ <li> >+ <label for="overduenoticerequired">Overdue notice required: </label> >+ <select name="overduenoticerequired" id="overduenoticerequired"> > <option value="0" selected="selected">No</option> > <option value="1">Yes</option> >- [% END %] >- </select> >- </li> >- >- <li> >- <label for="category_type" class="required">Category type: </label> >- <select name="category_type" value="category_type" class='required' required='required'> >- [% IF category and category.category_type == 'S' %] >- <option value="S" selected="selected">Staff</option> >- [% ELSE %] >- <option value="S">Staff</option> >- [% END %] >- </select> >- <span class="required">Required</span> >- </li> >- >- <li> >- <label for="default_privacy">Default privacy: </label> >- <select value="default_privacy" name="default_privacy" required="required"> >- [% SET default_privacy = 'default' %] >- >- [% IF category %] >- [% SET default_privacy = category.default_privacy %] >- [% END %] >- >- [% SWITCH default_privacy %] >- [% CASE 'forever' %] >- <option value="default">Default</option> >- <option value="never">Never</option> >- <option value="forever" selected="selected">Forever</option> >- [% CASE 'never' %] >- <option value="default">Default</option> >- <option value="never" selected="selected">Never</option> >- <option value="forever">Forever</option> >- [% CASE %] >+ </select> >+ </li> >+ >+ <li> >+ <span class="label">Category type: </span> >+ <input type="hidden" name="category_type" value="S" /> >+ Staff >+ </li> >+ >+ <li> >+ <label for="default_privacy">Default privacy: </label> >+ <select id="default_privacy" name="default_privacy" required="required"> > <option value="default" selected="selected">Default</option> > <option value="never">Never</option> > <option value="forever">Forever</option> >- [% END %] >- </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> >- <legend>Choose one</legend> >- <ol> >- <li> >- <label for="enrolmentperiod" style="width:6em;">In months: </label> >- <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> >- <input type="text" class="enrolmentperioddate datepicker" name="enrolmentperioddate" id="enrolmentperioddate" value="[% category.enrolmentperioddate | $KohaDates %]" /> >- </li> >- </ol> >- </fieldset> >- <br> >- <input type="submit" class="action" value="Submit" /> >- </fieldset> >- </form> >-[% END %] >+ </select> >+ <div class="hint">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 <code>batch_anonymise.pl</code> which should be set up by your system administrator.</div> >+ </li> >+ <li> >+ <span class="label">Enrolment period: </span> >+ <fieldset class="rows"> >+ <ol> >+ <li> >+ <span class="label"> </span><strong>Choose one</strong> >+ </li> >+ <li> >+ <label for="enrolmentperiod">In months: </label> >+ <input type="number" name="enrolmentperiod" id="enrolmentperiod" size="3" /> months >+ </li> >+ <li> >+ <label for="enrolmentperioddate">Until date: </label> >+ <input type="text" name="enrolmentperioddate" id="enrolmentperioddate" /> >+ <div class="hint">[% INCLUDE 'date-format.inc' %]</div> >+ </li> >+ </ol> >+ </fieldset> >+ </li> >+ </ol> >+ <input type="submit" class="btn btn-primary" value="Submit" /> >+ </fieldset> >+ </form> >+ [% END %] >+ </div> >+</div> > > [% INCLUDE 'intranet-bottom.inc' %] >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 a484835..af571c1 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep3.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep3.tt >@@ -1,206 +1,156 @@ > <!--Includes for creating patron--> >-[% USE Koha %] >-[% USE KohaDates %] >-[% USE Price %] > [% INCLUDE 'doc-head-open.inc' %] > [% IF ( finish ) %]<meta http-equiv="refresh" content="10; url=/cgi-bin/koha/mainpage.pl">[% END%] >+<title>Koha › Web installer › Create Koha administrator patron</title> > [% INCLUDE 'installer-doc-head-close.inc' %] >-[% INCLUDE 'calendar.inc' %] >-[% INCLUDE 'datatables.inc' %] >- >-<head> >-<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"> >- var MSG_PASSWORD_MISMATCH=(_("The entered passwords do not match, please rewrite them")); >-</script> >- >- >- >-<script type="text/javascript"> >-jQuery.validator.addMethod( "password_match", function(value,element){ >- var MSG_PASSWORD_MISMATCH = (_("The passwords entered do not match")); >- var password = document.getElementById('password').value >- var confirmpassword = document.getElementById('password2').value >- >- if ( password != confirmpassword ){ >- return false; >- } >- else{ >- return true >- } >- }, MSG_PASSWORD_MISMATCH >-); >- >-$(document).ready(function(){ >- >- $("#Submit").click(function(){ >- $("#createpatron").validate({ >- rules: { >- surname: { >- required: true, >- }, >- firstname: { >- required: true, >- }, >- cardnumber: { >- required: true, >- }, >- password: { >- password_match:true >- } >- }, >- messages: { >- password: { >- required: MSG_PASSWORD_MISMATCH >- }, >- } >- >- }); >-}); >-}); >-</script> >+[% INCLUDE 'validator-strings.inc' %] >+[% INCLUDE 'installer-strings.inc' %] >+<script type="text/javascript" src="[% interface %]/[% theme %]/js/onboarding.js"></script> > </head> > >-<div> >- <h1 id="logo"><img alt="Koha" src="[% interface %]/[% theme %]/img/koha.org-logo.gif"/> Welcome to Koha</h1> >-</div> >+<body id="installer" class="installer"> >+ >+ <div class="container-fluid"> >+ <div class="row"> >+ <div id="installer-step3" class="installer-main col-sm-8 col-sm-offset-2 col-md-8 col-md-offset-2"> >+ >+ <h1 id="logo"><a href="#">Koha</a></h1> >+ >+ [% IF (nok) %] >+ >+ <h2>Web installer › Administrator patron creation failed</h2> >+ >+ <form id="errors" method="post" action="onboarding.pl"> >+ <input type="hidden" name="step" value="3"/> >+ <div class="alert alert-danger"> >+ <ul> >+ [% IF errorloginexists %] >+ <li id="ERROR_login_exist">Username/password already exists.</li> >+ [% END %] >+ [% IF errorcardnumberexists %] >+ <li id="ERROR_cardnumber">Cardnumber already in use.</li> >+ [% END %] >+ [% IF errorcardnumberlength %] >+ <li id="ERROR_cardnumber">Cardnumber length is incorrect</li> >+ [% END %] >+ [% IF errorshortpassword %] >+ <li id="ERROR_short_password">Password length is incorrect, must be at least [% minPasswordLength %] characters long.</li> >+ [% END %] >+ [% IF errorpasswordmismatch %] >+ <li id="ERROR_password_mismatch">Passwords do not match.</li> >+ [% END %] >+ </ul> >+ </div> >+ <input type="submit" class="btn btn-primary" name="step" value="Try again"/> >+ </form> >+ >+ [% ELSIF op == 'add_validate' # New patron created %] >+ >+ <h2>Web installer › Koha administrator patron created</h2> >+ >+ <form id="patrondone" method="post" action="onboarding.pl"> >+ <input type="hidden" name="step" value="4"/> >+ <div class="alert alert-success">Success: Administrator patron created! </div> >+ <p> To create another patron, go to: </p> >+ <div class="breadcrumbs">Patrons › New patron</div> >+ <input type="submit" class="btn btn-primary" name="start" value="Continue to the next step" /> >+ </form> >+ >+ [% ELSE %] >+ >+ <h2>Web installer › Create Koha administrator patron</h2> >+ >+ <p> >+ Now we will create a patron with superlibrarian permissions. Login with this to access Koha as a staff member with all permissions. >+ </p> >+ >+ <form id="createpatron" method="post" action="onboarding.pl"> >+ <fieldset class="rows"> >+ <input type="hidden" name="step" value="3"/> >+ <input type="hidden" name="op" value="add_validate" /> >+ <h3>Administrator identity</h3> >+ <ol> >+ <li> >+ <label for="surname" class="required">Surname: </label> >+ <input type="text" id="surname" name="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="20" class="required" required="required"> >+ <span class="required">Required</span> >+ </li> >+ </ol> >+ >+ <ol> >+ <li> >+ <label for="cardnumber" class="required">Card number: </label> >+ [% IF patrons && patrons > 1 %] >+ <input type="text" id="cardnumber" class="noEnterSubmit valid required" name="cardnumber" required="required"> >+ [% ELSE %] >+ <input type="text" id="cardnumber" name="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--> >+ <label for="libraries" class="required"> Library: </label> >+ <select name="libraries" size="1" id="libraries"> >+ >+ [% FOREACH library IN libraries %] >+ <option name="libraries" value="[% library.branchcode %]"> [% library.branchname %] >+ [% END %] >+ >+ </select> >+ <span class="required"> Required</span> >+ </li> >+ <li> >+ <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. >+ </li> >+ </ol> >+ >+ <h3>Administrator account permissions</h3> >+ <ol> >+ <li> >+ <input type="hidden" name="newflags" value="1"/> >+ <input type="hidden" class="flag parent" id="flag-0" name="flag" value="superlibrarian"/> >+ <code>superlibrarian</code> >+ </li> >+ </ol> >+ >+ <h3>Administrator login</h3> >+ <ol> >+ <li> >+ <input type="hidden" name="BorrowerMandatoryField" value = [% BorrowerMandatoryField %] /> >+ <label for="userid" class="required">Username: </label> >+ <input type="text" name="userid" id ="userid" pattern="[A-Za-z1-9 ]+" title="Please only enter letters or numbers into this username field" size="20" 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="20" class="required" required="required"> >+ <span class="required">Required</span> >+ </li> >+ <li> >+ <label for="password2" class="required">Confirm password: </label> >+ <input type="password" id="password2" name="password2" size="20" class="required" required="required"> >+ <span class="required">Required</span> >+ </li> >+ </ol> >+ </fieldset> >+ <input type="submit" class="btn btn-primary" value="Submit" /> >+ </form> > >- >-[% IF (nok) %] >- <form name="errors" method="post" action="onboarding.pl"> >- <input type="hidden" name="step" value="3"/> >- <h1 align="left">There was an error</h1> >- <p>Try again </p> >- <div> >- <ul> >- [% IF errorloginexists %] >- <li id="ERROR_login_exist">Username/password already exists.</li> >- [% END %] >- [% IF errorcardnumberexists %] >- <li id="ERROR_cardnumber">Cardnumber already in use.</li> >- [% END %] >- [% IF errorcardnumberlength %] >- <li id="ERROR_cardnumber">Cardnumber length is incorrect</li> > [% END %] >- [% IF errorshortpassword %] >- <li id="ERROR_short_password">Password length is incorrect, must be at least [% minPasswordLength %] characters long.</li> >- [% END %] >- [% IF errorpasswordmismatch %] >- <li id="ERROR_password_mismatch">Passwords do not match.</li> >- [% END %] >- </ul> >- >- </div> >- <input type="submit" name="step" value="Try again"/> >- </form> >- >- >-<!--Create a patron screen 2--> >-[% ELSIF op == 'add_validate' %] >- <!--New patron created--> >- <form name="patrondone" method="post" action="onboarding.pl"> >- <input type="hidden" name="step" value="4"/> >- <h1 align="left"> Koha administrator patron </h1> >- <div> >- <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> >- Next up: >- <input type="submit" name="start" value="Minimal item type setup"/> >- </form> >-[% ELSE %] >-<!--Create a patron screen 1--> >- <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> >- <form name="createpatron" id="createpatron" method="post" action="onboarding.pl"> >- <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> >- <ol> >- <h3>Patron identity</h3> >- <li> >- <label for="surname" class="required">Surname: </label> >- <input type="text" id="surname" name="surname" title="Please only enter letters in the surname field" value="[% surname |html %]" class="required" required="required" /> >- <span class="required">Required</span> >- </li> >- <li> >- <label for="firstname" class="required">First name: </label> >- <input type="text" name="firstname" title="Please only enter letters in the first name field" id="firstname" size="20" value="[% firstname |html %]" class="required" required="required"> >- <span class="required">Required</span> >- </li> >- </ol> >- >- <ol> >- <li> >- <label for="cardnumber" class="required">Card number: </label> >- [% IF patrons && patrons > 1 %] >- <input type="text" id="cardnumber" title="Please enter a cardnumber" class="noEnterSubmit valid" name="cardnumber" value="[% newcardnumber | html %]" class="required" required="required"> >- [% ELSE %] >- <input type="text" id="cardnumber" title="Please enter a cardnumber" name="cardnumber" value="[% cardnumber | html %]" 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--> >- <label for="libraries" class="required"> Library: </label> >- <select name="libraries" size="1" id="libraries"> >- >- [% FOREACH library IN libraries %] >- <option name="libraries" value="[% library.branchcode %]"> [% library.branchname %] >- [% END %] >- >- </select> >- <span class="required"> Required</span> >- </li> >- <li> >- <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. >- </li> >- </ol> >- >- <ol> >- <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"/> >- <label name="permissioncode" for="flag-0"> superlibrarian</label> >- </li> >- </ol> >- <ol> >- <h3>OPAC/Staff Login</h3> >- <li> >- <input type="hidden" name="BorrowerMandatoryField" value = [% BorrowerMandatoryField %] /> >- <label for="userid" class="required">Username: </label> >- <input type="text" name="userid" id ="userid" size="20" title="Please only enter a username of letters and numbers" value="[% userid |html %]" class="required" required="required" /> >- <span class="required">Required</span> >- </li> >- <li> >- <label for="passwordlabel" class="required">Password: </label> >- <input type="password" name="password" id="password" size="20" value="[% member.password |html %]" class="required" required="required"> >- <span class="required">Required</span> >- </li> >- <li> >- <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><br> >- <input type="submit" id="Submit" class="action" value="Submit"/> >- </form> >-[% END %] >+ </div> >+ </div> >+ >+[% INCLUDE 'intranet-bottom.inc' %] >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 6176fb4..5a2c597 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep4.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep4.tt >@@ -1,67 +1,82 @@ > <!-- 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" /> >+[% ELSIF ( op != "add_validate" && itemtypes && itemtypes.count > 1 ) %] >+ <meta http-equiv="refresh" content="0; url=/cgi-bin/koha/installer/onboarding.pl?step=5" /> >+[% END %] >+<title>Koha › Web installer › Create a new item type </title> > [% INCLUDE 'installer-doc-head-close.inc' %] >-<head> >- <title>Create item type</title> >+[% INCLUDE 'validator-strings.inc' %] >+[% INCLUDE 'installer-strings.inc' %] >+<script type="text/javascript" src="[% interface %]/[% theme %]/js/onboarding.js"></script> > </head> >-<div> >- <h1 id="logo"><img alt="Koha" src="[% interface %]/[% theme %]/img/koha.org-logo.gif"/> Welcome to Koha</h1> >-</div> > >-[% IF (itemtypes && itemtypes.count >1) %] >+<body id="installer" class="installer"> > >- <meta http-equiv="refresh" content="0; url=/cgi-bin/koha/installer/onboarding.pl?step=5"> >+ <div class="container-fluid"> >+ <div class="row"> >+ <div id="installer-step3" class="installer-main col-sm-8 col-sm-offset-2 col-md-8 col-md-offset-2"> > >-[% ELSIF op == "add_validate" %] >- [% 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 settings <br> >- go to: <br> >- More -> Administration -> Item types <br> >- </div> >- 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 %] >-[% ELSE %] >- <!--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="[0-9A-Za-z]{1,10}" title="Please enter up to 10 letters and/or numbers" id="itemtype" size="10" maxlength="10" class="required" required="required" value="[% itemtype.itemtype |html %]" /> >- <span class="required">Required</span> >- </li> >+ <h1 id="logo"><a href="#">Koha</a></h1> > >- <li> >- <label for="description" class="required">Description: </label> >- <input type="text" name="description" id="description" title="Please only enter letters and/or numbers into this item type 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 %] >+ [% IF op == "add_validate" %] >+ [% IF message != "error_on_insert" %] >+ >+ <h2>Web installer › Item type created</h2> >+ >+ <form id="createitemtype" method="post" action="onboarding.pl"> >+ <input type="hidden" name="step" value="5"/> >+ <div class="alert alert-success"> Success: New item type created!</div> >+ <p> To create another item type later and for more settings go to: </p> >+ <div class="breadcrumbs"> Administration › Item types </div> >+ <input type="submit" class="btn btn-primary" value="Continue to the next step"/> >+ </form> >+ [% ELSE %] >+ >+ <h2>Web installer › Item type creation failed</h2> >+ >+ <form id="retryitem" method="post" action="onboarding.pl"> >+ <input type="hidden" name="step" value="4"/> >+ <h1 align="left">Failed </h1> >+ <div class="alert alert-danger"> >+ <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--> >+ <h2>Web installer › Create a new item type </h2> >+ >+ <p> Item types are used to group related items. Examples of item types might be books, CDs, or DVDs.</p> >+ <p> When adding to your institution's catalog you will create an item of a particular item type.</p> >+ <p> Importantly item types are what you apply circulation rules to. Circulation rules govern how your institution will lend its items: Checkout length, renewal policy, hold policy, etc. For example a circulation rule applied to the DVD item type may enforce a payment of $1.00 for checking out any DVD.</p> >+ >+ <form id="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" 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" id="description" size="42" class="required" required="required"> >+ <span class="required">Required</span> >+ </li> >+ </ol> >+ <input type="submit" class="btn btn-primary" value="Submit"/> >+ </fieldset> >+ </form> >+ [% END %] >+ </div> >+ </div> >+ >+[% INCLUDE 'intranet-bottom.inc' %] >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 81ba89c..e4366fa 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep5.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep5.tt >@@ -1,127 +1,131 @@ > [% INCLUDE 'doc-head-open.inc' %] >-<title>Create Circulation rule</title> >+<title>Koha › Web installer › Create circulation rule</title> > [% IF ( finish ) %]<meta http-equiv="refresh" content="10; url=/cgi-bin/koha/mainpage.pl">[% END %] > [% INCLUDE 'installer-doc-head-close.inc' %] >+[% INCLUDE 'validator-strings.inc' %] >+[% INCLUDE 'installer-strings.inc' %] >+<script type="text/javascript" src="[% interface %]/[% theme %]/js/onboarding.js"></script> >+</head> > >-<div> >- <h1 id="logo"><img alt="Koha" src="[% interface %]/[% theme %]/img/koha.org-logo.gif"/> Welcome to Koha</h1> >-</div> >+<body id="installer" class="installer"> > >-[% IF (finish) %] >-<h1>Congratulations you have finished and ready to use Koha</h1> >-<a href="/cgi-bin/koha/mainpage.pl">Start using Koha</a> >+ <div class="container-fluid"> >+ <div class="row"> >+ <div id="installer-step3" class="installer-main col-sm-8 col-sm-offset-2 col-md-8 col-md-offset-2"> > >-[% END %] >+ <h1 id="logo"><a href="#">Koha</a></h1> > >-<!--Create a circulation rule screen 2--> >-[% 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 circulation rule </h1> >- <div> >- <p> Success: circulation rule created!</p> >- <p> To create circulation rule, go to <br> >- More -> Administration -> Circulation and Fine Rules >- </div> >- Next up: >- <input type="submit" name="op" value="Finish"/> >- </form> >-[% ELSE %] >-<!--Create a circulation rule screen 1--> >- <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"/> >- <input type="hidden" name="op" value="add_validate" /> >- <ol> >- <li> >- <label for="branch" class="required"> Library branch</label> >- <select name="branch" id="branchname" required="required"> >- <option value""> Choose</option> >- <option value="*" selected="selected">All</option> >- [% FOREACH library IN libraries %] >- <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="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> >+ [% IF (finish) %] > >- <li> >- <label for="itemtype"> Item type: </label> >- <select id="itemtype" name="itemtype" required="required"> >- <option value""> Choose </option> >- <option value="*" selected="selected">All</option> >- [% FOREACH item IN itemtypes %] >- <option name="itemtype" value = "[% item.itemtype %]"> [% item.itemtype %] >- [%END%] >- </select> >- <span class="required"> Required</span> >- </li> >- <li> >- <label for="maxissueqty" class="required">Current checkouts allowed: </label> >- <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> >+ <h2>Web installer › Complete</h2> >+ <h3>Congratulations you have finished and ready to use Koha</h3> >+ <a class="btn btn-success" href="/cgi-bin/koha/mainpage.pl">Start using Koha</a> > >- <li> >- <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 %] >- [% END %] >+ [% END %] > >- [% SWITCH units %] >- [% CASE 'days' %] >- <option value="days" selected="selected">Days</option> >- <option value="hours">Hours</option> >- [% CASE 'hours' %] >- <option value="days">Days</option> >- <option value="hours" selected="selected">Hours</option> >- [% END %] >- </select> >- </li> >- <li> >- <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> >+ <!--Create a circulation rule screen 2--> > >- <li> >- <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> >+ [% IF op == "add_validate" %] >+ <!--New circulation rule created--> >+ <h2>Web installer › New circulation rule created</h2> >+ <form id="finish" method="post" action="onboarding.pl"> >+ <input type="hidden" name="op" value="finish" /> >+ <div class="alert alert-success"> >+ Success: circulation rule created! >+ </div> >+ <p> To create more circulation rules, go to: </p> >+ <div class="breadcrumbs">Administration › Circulation and fine rules</div> >+ <input type="submit" class="btn btn-primary" value="Finish" /> >+ </form> >+ [% ELSE %] > >- <li> >- <label for="onshelfholds">On shelf holds allowed: </label> >- <select name="onshelfholds" id="onshelfholds" required="required"> >- <option value="">Choose</option> >- <option value="1" selected="selected">Yes</option> >- <option value="0">If any unavailable</option> >- <option value="2">If all unavailable</option> >- </select> >- </li> >- </ol> >- </fieldset><br> >- <input type="submit" class="action" value="Submit"/> >- </form> >-[% END %] >+ <!--Create a circulation rule screen 1--> >+ <h2>Web installer › Create a new circulation rule </h2> >+ <form id="createcirculationrule" method="post" action="onboarding.pl"> >+ <fieldset class="rows"> >+ <input type="hidden" name="step" value="5"/> >+ <input type="hidden" name="op" value="add_validate" /> >+ <ol> >+ <li> >+ <label for="branchname" class="required"> Library branch</label> >+ <select name="branch" id="branchname" required="required"> >+ <option value=""> Choose</option> >+ <option value="*" selected="selected">All</option> >+ [% FOREACH library IN libraries %] >+ <option id="branch" value="[% library.branchcode %]"> [% library.branchname %]</option> >+ [% END %] >+ </select> >+ <span class="required">Required</span> >+ </li> >+ <li> >+ <label for="categorycodeselection" class="required">Patron category: </label> >+ <select name="categorycode" id="categorycodeselection" required="required"> >+ <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=""> Choose </option> >+ <option value="*" selected="selected">All</option> >+ [% FOREACH item IN itemtypes %] >+ <option value = "[% item.itemtype %]"> [% item.itemtype %]</option> >+ [%END%] >+ </select> >+ <span class="required"> Required</span> >+ </li> >+ <li> >+ <label for="maxissueqty" class="required">Current checkouts allowed: </label> >+ <input type="number" min="0" name="maxissueqty" title="Please only enter numbers" id="maxissueqty" size="10" 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" title="Please only enter numbers" id="issuelength" size="10" 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> >+ <option value="days" selected="selected">Days</option> >+ <option value="hours">Hours</option> >+ </select> >+ </li> >+ <li> >+ <label for="renewalsallowed" class="required">Renewals allowed: </label> >+ <input type="number" min="0" name="renewalsallowed" title="Please only enter numbers" id="renewalsallowed" size="10" 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" title="Please only enter numbers" id="renewalperiod" size="10" 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="1" selected="selected">Yes</option> >+ <option value="0">If any unavailable</option> >+ <option value="2">If all unavailable</option> >+ </select> >+ </li> >+ </ol> >+ </fieldset> >+ <input type="submit" class="btn btn-primary" value="Submit" /> >+ </form> >+ [% END %] >+ </div> >+ </div> >+ >+[% INCLUDE 'intranet-bottom.inc' %] >diff --git a/koha-tmpl/intranet-tmpl/prog/js/onboarding.js b/koha-tmpl/intranet-tmpl/prog/js/onboarding.js >new file mode 100644 >index 0000000..9b1d13d >--- /dev/null >+++ b/koha-tmpl/intranet-tmpl/prog/js/onboarding.js >@@ -0,0 +1,150 @@ >+function _(s) { return s; } // dummy function for gettext >+ >+jQuery.validator.addMethod( "category_code_check", function(value,element){ >+ var patt = /^[A-Za-z]{0,10}$/g; >+ if (patt.test(element.value)) { >+ return true; >+ } else { >+ return false; >+ } >+ }, MSG_LETTERS_ONLY >+); >+ >+jQuery.validator.addMethod( "letters_only", function(value,element){ >+ var patt =/^[A-Za-z ]{0,30}$/g; >+ if (patt.test(element.value)){ >+ return true; >+ } else { >+ return false; >+ } >+ }, MSG_LETTERS_ONLY >+); >+ >+jQuery.validator.addMethod( "enrollment_period", function(){ >+ enrolmentperiod = $("#enrolmentperiod").val(); >+ enrolmentperioddate = $("#enrolmentperioddate").val(); >+ if (( $("#enrolmentperiod").val() === "" && $("#enrolmentperioddate").val() === "") || ($("#enrolmentperiod").val() !== "" && $("#enrolmentperioddate").val() !== "")) { >+ return false; >+ } else { >+ return true; >+ } >+ }, MSG_ONLY_ONE_ENROLLMENTPERIOD >+); >+ >+jQuery.validator.addMethod( "password_match", function(value,element){ >+ var MSG_PASSWORD_MISMATCH = ( MSG_PASSWORD_MISMATCH ); >+ var password = document.getElementById('password').value; >+ var confirmpassword = document.getElementById('password2').value; >+ >+ if ( password != confirmpassword ){ >+ return false; >+ } >+ else{ >+ return true; >+ } >+ }, MSG_PASSWORD_MISMATCH >+); >+ >+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_LETTERS_NUMBERS_ONLY >+); >+ >+function toUC(f) { >+ var x=f.value.toUpperCase(); >+ f.value=x; >+ return true; >+} >+ >+$(document).ready(function() { >+ if ($("#branches option:selected").length < 1) { >+ $("#branches option:first").attr("selected", "selected"); >+ } >+ $("#categorycode").on("blur",function(){ >+ toUC(this); >+ }); >+ >+ $("#enrolmentperioddate").datepicker({ >+ minDate: 1 >+ }); // Require that "until date" be in the future >+ >+ $("#category_form").validate({ >+ rules: { >+ categorycode: { >+ required: true, >+ category_code_check: true >+ }, >+ description: { >+ required:true >+ }, >+ enrolmentperiod: { >+ required: function(element){ >+ return $("#enrolmentperioddate").val() === ""; >+ }, >+ digits: true, >+ enrollment_period: true, >+ }, >+ enrolmentperioddate: { >+ required: function(element){ >+ return $("#enrolmentperiod").val() === ""; >+ }, >+ enrollment_period: true, >+ // is_valid_date ($(#"enrolementperioddate").val()); >+ }, >+ dateofbirthrequired: { >+ digits: true >+ }, >+ upperagelimit: { >+ digits: true >+ }, >+ enrolmentfee: { >+ number: true >+ }, >+ reservefee: { >+ number: true >+ }, >+ category_type: { >+ required: true >+ } >+ }, >+ messages: { >+ enrolmentperiod: { >+ required: MSG_ONE_ENROLLMENTPERIOD >+ }, >+ enrolmentperioddate: { >+ required: MSG_ONE_ENROLLMENTPERIOD >+ } >+ } >+ }); >+ >+ $("#createpatron").validate({ >+ rules: { >+ surname: { >+ required: true >+ }, >+ firstname: { >+ required: true >+ }, >+ cardnumber: { >+ required: true >+ }, >+ password: { >+ password_match: true >+ } >+ }, >+ messages: { >+ password: { >+ required: MSG_PASSWORD_MISMATCH >+ }, >+ } >+ >+ }); >+ >+ $("#createitemform").validate(); >+ $("#createcirculationrule").validate(); >+}); >-- >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 17942
:
59275
|
59623
|
59624
|
59625
|
59627
|
59721
|
60098
|
60099
|
60100
|
60101
|
60527
|
60710
|
62856
|
62857
|
62861
|
62862
|
63013
|
63019
|
63020
|
63021
|
63022