Index: /main/waeup.sirp/trunk/src/waeup/sirp/students/browser.py
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/students/browser.py	(revision 6700)
+++ /main/waeup.sirp/trunk/src/waeup/sirp/students/browser.py	(revision 6701)
@@ -339,20 +339,20 @@
     @grok.action('Save')
     def save(self, **data):
+        form = self.request.form
+        ob_class = self.__implemented__.__name__.replace('waeup.sirp.','')
+        if form.has_key('password') and form['password']:
+            if form['password'] != form['control_password']:
+                self.flash('Passwords do not match.')
+                return
+            IUserAccount(self.context).setPassword(form['password'])
+            self.context.loggerInfo(ob_class, 'password changed')
         changed_fields = self.applyData(self.context, **data)
         changed_fields = changed_fields.values()
         fields_string = '+'.join(' + '.join(str(i) for i in b) for b in changed_fields)
         self.context._p_changed = True
-        form = self.request.form
         if form.has_key('transition') and form['transition']:
             transition_id = form['transition']
             self.wf_info.fireTransition(transition_id)
-        if form.has_key('password') and form['password']:
-            IUserAccount(self.context).setPassword(form['password'])
-            if fields_string:
-                fields_string += ' + password'
-            else:
-                fields_string = 'password'
         self.flash('Form has been saved.')
-        ob_class = self.__implemented__.__name__.replace('waeup.sirp.','')
         if fields_string:
             self.context.loggerInfo(ob_class, 'saved: % s' % fields_string)
@@ -554,17 +554,17 @@
     @grok.action('Save')
     def save(self, **data):
+        form = self.request.form
+        ob_class = self.__implemented__.__name__.replace('waeup.sirp.','')
+        if form.has_key('password') and form['password']:
+            if form['password'] != form['control_password']:
+                self.flash('Passwords do not match.')
+                return
+            IUserAccount(self.context).setPassword(form['password'])
+            self.context.loggerInfo(ob_class, 'password changed')
         changed_fields = self.applyData(self.context, **data)
         changed_fields = changed_fields.values()
         fields_string = '+'.join(' + '.join(str(i) for i in b) for b in changed_fields)
         self.context._p_changed = True
-        form = self.request.form
-        if form.has_key('password') and form['password']:
-            IUserAccount(self.context).setPassword(form['password'])
-            if fields_string:
-                fields_string += ' + password'
-            else:
-                fields_string = 'password'
         self.flash('Form has been saved.')
-        ob_class = self.__implemented__.__name__.replace('waeup.sirp.','')
         if fields_string:
             self.context.loggerInfo(ob_class, 'saved: % s' % fields_string)
Index: /main/waeup.sirp/trunk/src/waeup/sirp/students/browser_templates/baseeditpage.pt
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/students/browser_templates/baseeditpage.pt	(revision 6700)
+++ /main/waeup.sirp/trunk/src/waeup/sirp/students/browser_templates/baseeditpage.pt	(revision 6701)
@@ -44,4 +44,10 @@
         </td>
       </tr>
+      <tr>
+        <td class="label"><label>Retype password:</label></td>
+        <td>
+          <input name="control_password" type="password" />
+        </td>
+      </tr>
     </tbody>
   </table>
Index: /main/waeup.sirp/trunk/src/waeup/sirp/students/browser_templates/basemanagepage.pt
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/students/browser_templates/basemanagepage.pt	(revision 6700)
+++ /main/waeup.sirp/trunk/src/waeup/sirp/students/browser_templates/basemanagepage.pt	(revision 6701)
@@ -45,4 +45,10 @@
       </tr>
       <tr>
+        <td class="label"><label>Retype password:</label></td>
+        <td>
+          <input name="control_password" type="password" />
+        </td>
+      </tr>
+      <tr>
         <td class="label"><label>Registration Transition:</label></td>
         <td>
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 6700)
+++ /main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_browser.py	(revision 6701)
@@ -207,9 +207,8 @@
         self.browser.getControl(name="form.reg_number").value = '123'
         self.browser.getControl(name="password").value = 'secret'
+        self.browser.getControl(name="control_password").value = 'secret'
         self.browser.getControl("Save").click()
         self.assertMatches('...Form has been saved...',
                            self.browser.contents)
-        #self.assertTrue('Form has been saved' in self.browser.contents)
-
         self.browser.open(self.student_path)
         self.browser.getLink("Clearance Data").click()
@@ -266,4 +265,5 @@
         self.browser.getLink("Change password").click()
         self.browser.getControl(name="password").value = 'new_password'
+        self.browser.getControl(name="control_password").value = 'new_password'
         self.browser.getControl("Save").click()
         self.assertTrue('Form has been saved' in self.browser.contents)
