1 <!--Includes for creating patron-->
5 [% INCLUDE 'doc-head-open.inc' %]
6 [% IF ( finish ) %]<meta http-equiv="refresh" content="10; url=/cgi-bin/koha/mainpage.pl">[% END%]
7 [% INCLUDE 'installer-doc-head-close.inc' %]
8 [% INCLUDE 'calendar.inc' %]
9 [% INCLUDE 'datatables.inc' %]
10 [% INCLUDE 'js_includes.inc' %]
13 <title>Create Koha administrator patron</title>
14 <!--jQuery scripts for creating patron-->
15 <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.fixFloat.js"></script>
16 <script type="text/javascript">
17 var MSG_PASSWORD_MISMATCH=(_("The entered passwords do not match, please rewrite them"));
18 jQuery.validator.addMethod( "password_match", function(value,element){
19 var password = document.getElementById('password').value
20 var confirmpassword = document.getElementById('password2').value
21 if ( password != confirmpassword ){
27 }, MSG_PASSWORD_MISMATCH
30 $(document).ready(function(){
31 $("#Submit").click(function(){
32 $("#createpatron").validate({
49 required: MSG_PASSWORD_MISMATCH
59 <h1 id="logo"><img alt="Koha" src="[% interface %]/[% theme %]/img/koha.org-logo.gif"/> Welcome to Koha</h1>
64 <form name="errors" method="post" action="onboarding.pl">
65 <input type="hidden" name="step" value="3"/>
66 <h1 align="left">There was an error</h1>
70 [% IF errorloginexists %]
71 <li id="ERROR_login_exist">Username/password already exists.</li>
73 [% IF errorcardnumberexists %]
74 <li id="ERROR_cardnumber">Cardnumber already in use.</li>
76 [% IF errorcardnumberlength %]
77 <li id="ERROR_cardnumber">Cardnumber length is incorrect</li>
79 [% IF errorshortpassword %]
80 <li id="ERROR_short_password">Password length is incorrect, must be at least [% minPasswordLength %] characters long.</li>
82 [% IF errorpasswordmismatch %]
83 <li id="ERROR_password_mismatch">Passwords do not match.</li>
88 <input type="submit" name="step" value="Try again"/>
92 <!--Create a patron screen 2-->
93 [% ELSIF op == 'add_validate' %]
94 <!--New patron created-->
95 <form name="patrondone" method="post" action="onboarding.pl">
96 <input type="hidden" name="step" value="4"/>
97 <h1 align="left"> Koha administrator patron </h1>
99 <p> Success: administrator patron created!</p>
100 <p> To create another patron, go to Patrons -> New Patron. <br>
101 More -> Set Permissions in a user page to gain superlibrarian permissions.
104 <input type="submit" name="start" value="Minimal item type setup"/>
107 <!--Create a patron screen 1-->
108 <h1 align="left"> Create koha administrator patron</h1>
110 Now we will create a patron with superlibrarian permissions. Login with this to access Koha as a staff member will all permissions.
112 <form name="createpatron" id="createpatron" method="post" action="onboarding.pl">
113 <fieldset class="rows">
114 <input type="hidden" name="step" value="3"/>
115 <input type="hidden" name="op" value="add_validate" />
116 <legend id="library_management_lgd">Library management</legend>
118 <h3>Patron identity</h3>
120 <label for="surname" class="required">Surname: </label>
121 <input type="text" id="surname" name="surname" title="Please only enter letters in the surname field" value="[% surname |html %]" class="required" required="required" />
122 <span class="required">Required</span>
125 <label for="firstname" class="required">First name: </label>
126 <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">
127 <span class="required">Required</span>
133 <label for="cardnumber" class="required">Card number: </label>
134 [% IF patrons && patrons > 1 %]
135 <input type="text" id="cardnumber" title="Please enter a cardnumber" class="noEnterSubmit valid" name="cardnumber" value="[% newcardnumber | html %]" class="required" required="required">
137 <input type="text" id="cardnumber" title="Please enter a cardnumber" name="cardnumber" value="[% cardnumber | html %]" class="required" required="required">
139 <span class="required">Required</span>
143 <!--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-->
144 <label for="libraries" class="required"> Library: </label>
145 <select name="libraries" size="1" id="libraries">
147 [% FOREACH library IN libraries %]
148 <option name="libraries" value="[% library.branchcode %]"> [% library.branchname %]
152 <span class="required"> Required</span>
155 <label for="categorycode_entry" class="required"> Patron category</label>
156 <select id="categorycode_entry" name="categorycode_entry" onchange="update_category_code(this);">
157 [% FOREACH category IN categories %]
158 <option name="categorycode_entry" value = "[% category.categorycode %]">[%category.description %]</option>
161 <span class="required">Required</span><br><br>
162 <b>Note:</b> If you installed sample patron categories please select the "Staff" option in the patron categories dropdown box.
167 <h3> Koha administrator patron permissions</h3>
168 <input type="hidden" name="newflags" value="1"/>
170 <input type="hidden" class="flag parent" id="flag-0" name="flag" value="superlibrarian"/>
171 <label name="permissioncode" for="flag-0"> superlibrarian</label>
175 <h3>OPAC/Staff Login</h3>
177 <input type="hidden" name="BorrowerMandatoryField" value = "[% BorrowerMandatoryField %]" />
178 <label for="userid" class="required">Username: </label>
179 <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" />
180 <span class="required">Required</span>
183 <label for="passwordlabel" class="required">Password: </label>
184 <input type="password" name="password" id="password" size="20" value="[% member.password |html %]" class="required" required="required">
185 <span class="required">Required</span>
188 <label for="password2" class="required">Confirm password: </label>
189 <input type="password" id="password2" name="password2" size="20" value="" class="required" required="required">
190 <span class="required">Required</span>
194 <input type="submit" id="Submit" class="action" value="Submit"/>