Bug 17855: Simplify the onboarding tool
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / onboarding / onboardingstep3.tt
1 <!--Includes for creating patron-->
2 [% USE Koha %]
3 [% USE KohaDates %]
4 [% USE Price %]
5 [% INCLUDE 'doc-head-open.inc' %]
6 [% INCLUDE 'installer-doc-head-close.inc' %]
7 [% INCLUDE 'calendar.inc' %]
8 [% INCLUDE 'datatables.inc' %]
9 [% INCLUDE 'js_includes.inc' %]
10
11 <head>
12 <title>Create Koha administrator patron</title>
13 <!--jQuery scripts for creating patron-->
14 <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.fixFloat.js"></script>
15 <script type="text/javascript">
16      var MSG_PASSWORD_MISMATCH=(_("The entered passwords do not match, please rewrite them"));
17      jQuery.validator.addMethod( "password_match", function(value,element){
18         var password = document.getElementById('password').value
19         var confirmpassword = document.getElementById('password2').value
20         if ( password != confirmpassword ){
21                 return false;
22         }
23         else{
24                 return true
25         }
26      },  MSG_PASSWORD_MISMATCH
27 );
28
29 $(document).ready(function(){
30    $("#Submit").click(function(){
31       $("#createpatron").validate({
32         rules: {
33             surname: {
34                 required: true,
35             },
36             firstname: {
37                 required: true,
38             },
39             cardnumber: {
40                 required: true,
41             },
42             password: {
43                  password_match:true
44             }
45         },
46         messages: {
47            password: {
48                  required: MSG_PASSWORD_MISMATCH
49            },
50         }
51       });
52    });
53 });
54 </script>
55 </head>
56
57 <div>
58     <h1 id="logo"><img alt="Koha" src="[% interface %]/[% theme %]/img/koha.org-logo.gif"/> Welcome to Koha</h1>
59 </div>
60
61 [% INCLUDE 'onboarding_messages.inc' %]
62
63 <h1 align="left"> Create koha administrator patron</h1>
64 <p>
65 Now we will create a patron with superlibrarian permissions. Login with this to access Koha as a staff member will all permissions.
66 </p>
67 <form name="createpatron" id="createpatron" method="post" action="onboarding.pl">
68     <fieldset class="rows">
69          <input type="hidden" name="step" value="3"/>
70          <input type="hidden" name="op" value="add_validate_patron" />
71             <legend id="library_management_lgd">Library management</legend>
72             <ol>
73             <h3>Patron identity</h3>
74                 <li>
75                     <label for="surname" class="required">Surname: </label>
76                     <input type="text" id="surname" name="surname" title="Please only enter letters in the surname field" value="[% surname |html %]" class="required" required="required" />
77                     <span class="required">Required</span>
78                 </li>
79                 <li>
80                     <label for="firstname" class="required">First name: </label>
81                     <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">
82                     <span class="required">Required</span>
83                 </li>
84             </ol>
85
86             <ol>
87                 <li>
88                     <label for="cardnumber" class="required">Card number: </label>
89                     [% IF patrons && patrons > 1 %]
90                         <input type="text" id="cardnumber" title="Please enter a cardnumber" class="noEnterSubmit valid" name="cardnumber" value="[% newcardnumber | html %]" class="required" required="required">
91                     [% ELSE %]
92                         <input type="text" id="cardnumber" title="Please enter a cardnumber" name="cardnumber" value="[% cardnumber | html %]" class="required" required="required">
93                     [% END %]
94                     <span class="required">Required</span>
95                 </li>
96                 <li>
97
98                 <!--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-->
99                     <label for="libraries" class="required"> Library: </label>
100                     <select name="libraries" size="1" id="libraries">
101
102                      [% FOREACH library IN libraries %]
103                           <option name="libraries" value="[% library.branchcode %]"> [% library.branchname %]
104                      [% END %]
105
106                         </select>
107                     <span class="required"> Required</span>
108                 </li>
109                 <li>
110                     <label for="categorycode_entry" class="required"> Patron category</label>
111                     <select id="categorycode_entry" name="categorycode_entry" onchange="update_category_code(this);">
112                     [% FOREACH category IN categories %]
113                         <option name="categorycode_entry" value = "[% category.categorycode %]">[%category.description %]</option>
114                     [% END %]
115                     </select>
116                     <span class="required">Required</span><br><br>
117                     <b>Note:</b> If you installed sample patron categories please select the "Staff" option in the patron categories dropdown box.
118                 </li>
119             </ol>
120
121             <ol>
122                     <h3> Koha administrator patron permissions</h3>
123                     <li>
124                         <label> superlibrarian</label>
125                     </li>
126             </ol>
127             <ol>
128             <h3>OPAC/Staff Login</h3>
129                 <li>
130                     <label for="userid" class="required">Username: </label>
131                     <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" />
132                     <span class="required">Required</span>
133                 </li>
134                 <li>
135                     <label for="passwordlabel" class="required">Password: </label>
136                     <input type="password" name="password" id="password" size="20" value="[% member.password |html %]" class="required" required="required">
137                     <span class="required">Required</span>
138                 </li>
139                 <li>
140                     <label for="password2" class="required">Confirm password: </label>
141                     <input type="password" id="password2" name="password2" size="20" value="" class="required" required="required">
142                     <span class="required">Required</span>
143                 </li>
144             </ol>
145         <p>
146             To create another patron, go to Patrons -> New Patron. <br>
147             More -> Set Permissions in a user page to gain superlibrarian permissions.
148         </p>
149     </fieldset>
150     <br>
151     <input type="submit" id="Submit" class="action" value="Submit"/>
152 </form>