- Timestamp:
- 5 Jul 2015, 07:42:37 (9 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/documents
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/documents/batching.py
r12438 r13138 34 34 from waeup.kofa.interfaces import ( 35 35 IBatchProcessor, FatalCSVError, IObjectConverter, IUserAccount, 36 I ObjectHistory, IGNORE_MARKER)36 IGNORE_MARKER) 37 37 from waeup.kofa.interfaces import IKofaUtils 38 38 from waeup.kofa.interfaces import MessageFactory as _ -
main/waeup.kofa/trunk/src/waeup/kofa/documents/browser.py
r13055 r13138 36 36 from waeup.kofa.interfaces import MessageFactory as _ 37 37 from waeup.kofa.interfaces import ( 38 IContactForm, I ObjectHistory, IKofaObject, IKofaUtils)38 IContactForm, IKofaObject, IKofaUtils) 39 39 from waeup.kofa.browser.layout import ( 40 40 KofaPage, KofaEditFormPage, KofaAddFormPage, KofaDisplayFormPage, … … 279 279 @action(_('Add local role'), validator=NullValidator) 280 280 def addLocalRole(self, **data): 281 return add_local_role(self, 2,**data)281 return add_local_role(self,3,**data) 282 282 283 283 @action(_('Remove selected local roles')) 284 284 def delLocalRoles(self, **data): 285 return del_local_roles(self, 2,**data)285 return del_local_roles(self,3,**data) 286 286 287 287 … … 300 300 return 301 301 302 # Actions must be repeated. They are not inherited from the parent class. 303 304 @action(_('Cancel'), validator=NullValidator) 305 def cancel(self, **data): 306 self.redirect(self.url(self.context)) 307 return 308 309 @action(_('Add local role'), validator=NullValidator) 310 def addLocalRole(self, **data): 311 return add_local_role(self,3,**data) 312 313 @action(_('Remove selected local roles')) 314 def delLocalRoles(self, **data): 315 return del_local_roles(self,3,**data) 302 316 303 317 class RESTDocumentManageFormPage(DocumentManageFormPage): … … 315 329 return 316 330 331 # Actions must be repeated. They are not inherited from the parent class. 332 333 @action(_('Cancel'), validator=NullValidator) 334 def cancel(self, **data): 335 self.redirect(self.url(self.context)) 336 return 337 338 @action(_('Add local role'), validator=NullValidator) 339 def addLocalRole(self, **data): 340 return add_local_role(self,3,**data) 341 342 @action(_('Remove selected local roles')) 343 def delLocalRoles(self, **data): 344 return del_local_roles(self,3,**data) 317 345 318 346 class DocumentTriggerTransitionFormPage(KofaEditFormPage): -
main/waeup.kofa/trunk/src/waeup/kofa/documents/tests/test_browser.py
r12456 r13138 233 233 self.assertTrue('HTML Document added.' in self.browser.contents) 234 234 document = self.app['documents']['DOC2'] 235 235 # All form action buttons are there 236 self.assertTrue('value="Add local role"' in self.browser.contents) 237 self.assertTrue('value="Save"' in self.browser.contents) 238 self.assertTrue('value="Cancel"' in self.browser.contents) 236 239 # Document can be edited 237 240 self.browser.getControl(name="form.title").value = 'My second doc'
Note: See TracChangeset for help on using the changeset viewer.