Bugzilla – Attachment 62424 Details for
Bug 18462
Implemented bootstrap styling on the web installer and onboarding tool
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17942 - Update style of the web installer with Bootstrap 3
Bug-17942---Update-style-of-the-web-installer-with.patch (text/plain), 52.68 KB, created by
Alex Buckley
on 2017-04-20 01:11:35 UTC
(
hide
)
Description:
Bug 17942 - Update style of the web installer with Bootstrap 3
Filename:
MIME Type:
Creator:
Alex Buckley
Created:
2017-04-20 01:11:35 UTC
Size:
52.68 KB
patch
obsolete
>From 26236d7ada78e38c4b5f91fb101ce67597dc8c38 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Wed, 18 Jan 2017 16:07:40 +0000 >Subject: [PATCH] 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> >Signed-off-by: Liz Rea <liz@catalyst.net.nz> > >https://bugs.koha-community.org/show_bug.cgi?id=18462 >--- > 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 | 199 ++++++++++-------- > .../prog/en/modules/onboarding/onboardingstep2.tt | 33 ++- > .../prog/en/modules/onboarding/onboardingstep3.tt | 56 +---- > .../prog/en/modules/onboarding/onboardingstep4.tt | 8 +- > .../prog/en/modules/onboarding/onboardingstep5.tt | 8 +- > koha-tmpl/intranet-tmpl/prog/js/onboarding.js | 150 ++++++++++++++ > 12 files changed, 731 insertions(+), 428 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 2f8f46a..84f40e2 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt >@@ -1,74 +1,85 @@ >-[% 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[ >+<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"> > >-var surl = unescape(window.location.pathname); >+ <h1 id="logo"><a href="#">Koha</a></h1> > >-function doLoad() >-{ >- // the timeout value should be the same as in the "refresh" meta-tag >- setTimeout( "refresh()", 2*1000 ); >-} >- >-function refresh(value) >-{ >- // The argument to the location.reload function determines >- // if the browser should retrieve the document from the >- // web-server. In our example all we need to do is cause >- // the JavaScript block in the document body to be >- // re-evaluated. If we needed to pull the document from >- // the web-server again (such as where the document contents >- // change dynamically) we would pass the argument as 'true'. >- // >- surl=surl+'?step=3&op=selectframeworks&fwklanguage='+value; >- >- window.location.replace( surl ); >-} >+ [% 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 %] > >-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; >-} >+ [% 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"/> > >-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' ; >-} >+ <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> > >-//]]> >-</script> >-[% END %] >+ <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">Select your MARC flavor</h2> >@@ -191,33 +202,38 @@ function Hide(link) > </p> > [% 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 ( 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 ( 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 ) %] >@@ -232,8 +248,13 @@ function Hide(link) > <br> > <a href="install.pl?step=3&op=choosemarc" class="button">Install basic configuration settings</a> > >- [% 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> >@@ -260,6 +281,4 @@ function Hide(link) > </div> > [% END %] > >-</div> >-</body> >-</html> >+[% 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 0d682bc..673cbb9 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep2.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep2.tt >@@ -2,31 +2,22 @@ > [% 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' %] > [% INCLUDE 'js_includes.inc' %] >-[% INCLUDE 'datatables.inc' %] >-<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.")); >- >-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_ONE_ENROLLMENTPERIOD >-); >-</script> >-<script type="text/javascript" src="[% themelang %]/js/categories.js"></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> >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 dc94b0f..1f04a98 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep3.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep3.tt >@@ -1,63 +1,13 @@ > <!--Includes for creating patron--> >-[% USE Koha %] >-[% USE KohaDates %] >-[% USE Price %] > [% INCLUDE 'doc-head-open.inc' %] > [% INCLUDE 'installer-doc-head-close.inc' %] >-[% INCLUDE 'calendar.inc' %] >-[% INCLUDE 'datatables.inc' %] > [% INCLUDE 'js_includes.inc' %] >+[% INCLUDE 'validator-strings.inc' %] >+[% INCLUDE 'installer-strings.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")); >- jQuery.validator.addMethod( "password_match", function(value,element){ >- 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> > </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"> > [% INCLUDE 'onboarding_messages.inc' %] > > <h1 align="left"> Create koha administrator patron</h1> >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 2ca3ef4..4a32f9d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep4.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep4.tt >@@ -1,12 +1,10 @@ > <!-- includes for creating item type--> > [% INCLUDE 'doc-head-open.inc' %] > [% 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> > > [% INCLUDE 'onboarding_messages.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 9701e62..8e3519b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep5.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep5.tt >@@ -1,10 +1,12 @@ > [% INCLUDE 'doc-head-open.inc' %] > <title>Create Circulation rule</title> > [% 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"> > > [% INCLUDE 'onboarding_messages.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 18462
:
62424
|
62425
|
62426
|
62427
|
62428
|
62429
|
62430
|
62513
|
62683
|
62684
|
62685
|
62686
|
62687
|
62688
|
62711
|
62712
|
62713
|
62714
|
62715
|
62716
|
62737