Index: main/waeup.sirp/trunk/src/waeup/sirp/students/browser.py
===================================================================
--- main/waeup.sirp/trunk/src/waeup/sirp/students/browser.py	(revision 6756)
+++ main/waeup.sirp/trunk/src/waeup/sirp/students/browser.py	(revision 6758)
@@ -151,13 +151,11 @@
     title = ''
     label = 'Set password for first-time login'
-    acprefix = 'PWD'
+    ac_prefix = 'PWD'
     pnav = 0
 
     def update(self, SUBMIT=None):
-        self.reg_number = self.request.form.get('form.reg_number', None)
-        # We must not use form.ac_series and form.ac_number in forms since these
-        # are interpreted as applicant credentials in the applicants package
-        self.acseries = self.request.form.get('form.acseries', None)
-        self.acnumber = self.request.form.get('form.acnumber', None)
+        self.reg_number = self.request.form.get('reg_number', None)
+        self.ac_series = self.request.form.get('ac_series', None)
+        self.ac_number = self.request.form.get('ac_number', None)
 
         if SUBMIT is None:
@@ -174,5 +172,5 @@
         self.student_id = student.student_id
         student_pw = student.password
-        pin = '%s-%s-%s' % (self.acprefix,self.acseries,self.acnumber)
+        pin = '%s-%s-%s' % (self.ac_prefix, self.ac_series, self.ac_number)
         code = get_access_code(pin)
         if not code:
@@ -197,5 +195,5 @@
             #import pdb; pdb.set_trace()
             invalidate_accesscode(pin,comment)
-            IUserAccount(student).setPassword(self.acnumber)
+            IUserAccount(student).setPassword(self.ac_number)
         self.flash('Password has been set. Your Student Id is %s'
             % self.student_id)
@@ -657,5 +655,4 @@
     form_fields = grok.AutoFields(
         IStudentClearanceEdit).omit('clearance_locked')
-    #grok.template('clearanceeditpage')
     label = 'Edit clearance data'
     title = 'Clearance Data'
Index: main/waeup.sirp/trunk/src/waeup/sirp/students/browser_templates/setpassword.pt
===================================================================
--- main/waeup.sirp/trunk/src/waeup/sirp/students/browser_templates/setpassword.pt	(revision 6756)
+++ main/waeup.sirp/trunk/src/waeup/sirp/students/browser_templates/setpassword.pt	(revision 6758)
@@ -1,29 +1,33 @@
-<h2 i18n:translate=""  tal:condition="view/label"  tal:content="view/label">Label</h2>
+<h2 i18n:translate=""  tal:condition="view/label"
+    tal:content="view/label">Label</h2>
 <form method="POST">
-  <input type="hidden" name="form.acprefix"  value="" tal:attributes="value view/acprefix" />
   <table>
     <tbody>
-      <tr> <td>
-          <label for="form.reg_number">Registration Number:
+      <tr><td>
+          <label for="reg_number">Registration Number:
           </label></td> <td>
-          <input name="form.reg_number" type="text" size="15" maxlength="15"  value="" tal:attributes="value view/reg_number"/> </td>
+          <input name="reg_number" type="text" size="15" maxlength="15"
+                 value="" tal:attributes="value view/reg_number"/>
+      </td></tr>
+      <tr>
+        <td>
+          <label for="ac_series">Access Code:
+          </label></td> <td>
+          <span tal:replace="view/ac_prefix">PIN Prefix
+          </span> -
+          <input name="ac_series" type="text" size="3" maxlength="3"
+                 value="" tal:attributes="value view/ac_series"/> -
+          <input name="ac_number" type="text" size="10" maxlength="10"
+                 value="" tal:attributes="value view/ac_number" /> </td>
       </tr>
       <tr>
-        <tr> <td>
-            <label for="form.acseries">Access Code:
-            </label></td> <td>
-            <span tal:replace="view/acprefix">PIN Prefix
-            </span> -
-            <input name="form.acseries" type="text" size="3" maxlength="3"  value="" tal:attributes="value view/acseries"/> -
-            <input name="form.acnumber" type="text" size="10" maxlength="10"  value="" tal:attributes="value view/acnumber" /> </td>
-        </tr>
-        <tr>
-          <td colspan="2">
-            <input type="submit" name="SUBMIT" value="Show Student Id and set password" /> </td>
-        </tr>
+        <td colspan="2">
+        <input type="submit" name="SUBMIT"
+               value="Show Student Id and set password" /> </td>
+      </tr>
     </tbody>
   </table>
 </form>
-<div> <h3>Instructions:</h3>
+<div><h3>Instructions:</h3>
   <ul class="list">
     <li> Acquire a password access code (PWD).
@@ -31,8 +35,10 @@
     <li> Enter your (JAMB) registration number and the access code.
     </li>
-    <li> After pressing the button, your Student Id will be displayed and your password set.
-        The 10-digit part of the access code just used is your new password.
+    <li> After pressing the button, your Student Id will be displayed
+    and your password set. The 10-digit part of the access code just
+    used is your new password.
     </li>
-    <li> Go to the <strong><a href="login">general login page</a></strong> and enter your new credentials.
+    <li> Go to the <strong><a href="login">general login
+    page</a></strong> and enter your new credentials.
     </li>
   </ul>
Index: main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_browser.py
===================================================================
--- main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_browser.py	(revision 6756)
+++ main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_browser.py	(revision 6758)
@@ -311,7 +311,7 @@
         student_path = 'http://localhost/app/students/%s' % test_student_id
         self.browser.open(setpassword_path)
-        self.browser.getControl(name="form.acseries").value = self.existing_series
-        self.browser.getControl(name="form.acnumber").value = self.existing_number
-        self.browser.getControl(name="form.reg_number").value = '123456'
+        self.browser.getControl(name="ac_series").value = self.existing_series
+        self.browser.getControl(name="ac_number").value = self.existing_number
+        self.browser.getControl(name="reg_number").value = '123456'
         self.browser.getControl("Show").click()
         self.assertMatches('...Password has been set. Your Student Id is...',
@@ -320,5 +320,6 @@
         self.browser.open(self.login_path)
         self.browser.getControl(name="form.login").value = test_student_id
-        self.browser.getControl(name="form.password").value = self.existing_number
+        self.browser.getControl(
+            name="form.password").value = self.existing_number
         self.browser.getControl("Login").click()
         self.assertEqual(self.browser.url, student_path)
