Bug 19514: Add client-side check
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / onboarding / onboardingstep3.tt
1 [% USE Koha %]
2 [% INCLUDE 'doc-head-open.inc' %]
3 <title>Koha &rsaquo; Web installer &rsaquo; Create Koha administrator patron</title>
4 [% INCLUDE 'installer-doc-head-close.inc' %]
5 [% INCLUDE 'validator-strings.inc' %]
6 [% INCLUDE 'installer-strings.inc' %]
7 <script type="text/javascript" src="[% interface %]/[% theme %]/js/onboarding.js"></script>
8 </head>
9
10 <body id="installer" class="installer">
11     <div class="container-fluid">
12         <div class="row">
13             <div id="onboarding-step3" class="installer-main col-sm-8 col-sm-offset-2 col-md-8 col-md-offset-2">
14                 <h1 id="logo"><a href="#">Koha</a></h1>
15                 <h2>Web installer &rsaquo; Create Koha administrator patron</h2>
16
17                 [% INCLUDE 'onboarding_messages.inc' %]
18
19                 <p>
20                 Now we will create a patron with superlibrarian permissions. Log in with this to access Koha as a staff member with all permissions.
21                 </p>
22                 <form name="createpatron" id="createpatron" method="post" action="onboarding.pl">
23                     <fieldset class="rows">
24                         <input type="hidden" name="step" value="3" />
25                         <input type="hidden" name="op" value="add_validate_patron" />
26                         <h3>Administrator identity</h3>
27                         <ol>
28                             <li>
29                                 <label for="surname" class="required">Surname: </label>
30                                 <input type="text" id="surname" name="surname" value="[% surname |html %]" class="required" required="required" />
31                                 <span class="required">Required</span>
32                             </li>
33                             <li>
34                                 <label for="firstname" class="required">First name: </label>
35                                 <input  type="text" name="firstname" id="firstname" size="20" value="[% firstname |html %]" class="required" required="required">
36                                 <span class="required">Required</span>
37                             </li>
38                         </ol>
39
40                         <ol>
41                             <li>
42                                 <label for="cardnumber" class="required">Card number: </label>
43                                 [% IF patrons && patrons > 1 %]
44                                     <input type="text" id="cardnumber" class="noEnterSubmit valid" name="cardnumber" value="[% newcardnumber | html %]" class="required" required="required">
45                                 [% ELSE %]
46                                     <input type="text" id="cardnumber" name="cardnumber" value="[% cardnumber | html %]" class="required" required="required">
47                                 [% END %]
48                                 <span class="required">Required</span>
49                             </li>
50                             <li>
51
52                                 <!--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-->
53                                 <label for="libraries" class="required"> Library: </label>
54                                 <select name="libraries" size="1" id="libraries">
55                                     [% FOREACH library IN libraries %]
56                                         <option value="[% library.branchcode %]"> [% library.branchname %] </option>
57                                     [% END %]
58                                 </select>
59                                 <span class="required"> Required</span>
60                             </li>
61                             <li>
62                                 <label for="categorycode_entry" class="required"> Patron category</label>
63                                 <select id="categorycode_entry" name="categorycode_entry">
64                                     [% FOREACH category IN categories %]
65                                         <option value = "[% category.categorycode %]">[%category.description %]</option>
66                                     [% END %]
67                                 </select>
68                                 <span class="required">Required</span><br><br>
69                                 <b>Note:</b> If you installed sample patron categories please select the "Staff" option in the patron categories dropdown box.
70                             </li>
71                         </ol>
72
73                             <h3>Administrator account permissions</h3>
74                         <ol>
75                             <li>
76                                 <input type="hidden" name="newflags" value="1" />
77                                 <input type="hidden" class="flag parent" id="flag-0" name="flag" value="superlibrarian" />
78                                 <code> superlibrarian</code>
79                             </li>
80                         </ol>
81
82                             <h3>Administrator login</h3>
83                         <ol>
84                             <li>
85                                 <label for="userid" class="required">Username: </label>
86                                 <input type="text" name="userid" id ="userid" size="20" value="[% userid |html %]" class="required" required="required" />
87                                 <span class="required">Required</span>
88                             </li>
89                             <li>
90                                 <label for="password" class="required">Password: </label>
91                                 <input type="password" name="password" id="password" size="20" value="[% member.password |html %]" class="required" required="required">
92                                 <span class="required">Required</span>
93                             </li>
94                             <li>
95                                 <label for="password2" class="required">Confirm password: </label>
96                                 <input type="password" id="password2" name="password2" size="20" value="" class="required" required="required">
97                                 <span class="required">Required</span>
98                             </li>
99                         </ol>
100                         <p>
101                             To create another patron, go to:
102                             <span class="breadcrumbs">Patrons &rsaquo; New patron</span>
103                         </p>
104                         <p>
105                             To give the new patron superlibrarian permissions go to:
106                             <span class="breadcrumbs">More &rsaquo; Set permissions</span>
107                         </p>
108                     </fieldset>
109
110                     <input type="submit" class="btn btn-primary" value="Submit" />
111                 </form>
112             </div> <!-- / #onboarding-step3 -->
113         </div> <!-- / .row -->
114
115 [% INCLUDE 'intranet-bottom.inc' %]
116 [% PROCESS 'password_check.inc' %]
117 [% PROCESS 'add_password_check' new_password => 'password' %]