Ignore:
Timestamp:
31 Dec 2014, 08:31:44 (10 years ago)
Author:
Henrik Bettermann
Message:

Add Cancel button.

Location:
main/waeup.ikoba/trunk/src/waeup/ikoba/customers
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.ikoba/trunk/src/waeup/ikoba/customers/browser.py

    r12347 r12348  
    657657    pnav = 4
    658658
    659     def update(self):
     659    def update(self, CANCEL=None):
    660660        CUSTMANAGE_STATES = getUtility(
    661661            ICustomersUtils).CUSTMANAGE_CUSTOMER_STATES
    662662        if self.context.customer.state not in CUSTMANAGE_STATES:
    663663            emit_lock_message(self)
     664            return
     665        if CANCEL is not None:
     666            self.redirect(self.url(self.context))
    664667            return
    665668        super(CustomerFilesUploadPage, self).update()
  • main/waeup.ikoba/trunk/src/waeup/ikoba/customers/browser_templates/filesuploadpage.pt

    r11971 r12348  
    66    </tbody>
    77  </table>
     8  <input class="btn btn-default" type="submit" name="CANCEL" value="Cancel" />
    89</form>
  • main/waeup.ikoba/trunk/src/waeup/ikoba/customers/tests/test_browser.py

    r12345 r12348  
    602602            'src="http://localhost/app/customers/K1000000/passport.jpg"'
    603603            in self.browser.contents)
     604        self.browser.getControl(name="CANCEL").click()
     605        self.assertEqual(self.browser.url, self.customer_path)
    604606
    605607    def test_customer_baseedit(self):
Note: See TracChangeset for help on using the changeset viewer.