Changeset 13139
- Timestamp:
- 5 Jul 2015, 07:42:57 (9 years ago)
- Location:
- main/waeup.ikoba/trunk/src/waeup/ikoba/documents
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/trunk/src/waeup/ikoba/documents/browser.py
r13066 r13139 36 36 from waeup.ikoba.interfaces import MessageFactory as _ 37 37 from waeup.ikoba.interfaces import ( 38 IContactForm, I ObjectHistory, IIkobaObject, IIkobaUtils, PUBLISHED)38 IContactForm, IIkobaObject, IIkobaUtils, PUBLISHED) 39 39 from waeup.ikoba.browser.layout import ( 40 40 IkobaPage, IkobaEditFormPage, IkobaAddFormPage, IkobaDisplayFormPage, … … 278 278 @action(_('Add local role'), validator=NullValidator) 279 279 def addLocalRole(self, **data): 280 return add_local_role(self, 2,**data)280 return add_local_role(self,3,**data) 281 281 282 282 @action(_('Remove selected local roles')) 283 283 def delLocalRoles(self, **data): 284 return del_local_roles(self, 2,**data)284 return del_local_roles(self,3,**data) 285 285 286 286 … … 299 299 return 300 300 301 # Actions must be repeated. They are not inherited from the parent class. 302 303 @action(_('Cancel'), validator=NullValidator) 304 def cancel(self, **data): 305 self.redirect(self.url(self.context)) 306 return 307 308 @action(_('Add local role'), validator=NullValidator) 309 def addLocalRole(self, **data): 310 return add_local_role(self,3,**data) 311 312 @action(_('Remove selected local roles')) 313 def delLocalRoles(self, **data): 314 return del_local_roles(self,3,**data) 315 301 316 302 317 class RESTDocumentManageFormPage(DocumentManageFormPage): … … 313 328 self.context.html_dict = rest2dict(html_multilingual, portal_language) 314 329 return 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) 315 345 316 346 -
main/waeup.ikoba/trunk/src/waeup/ikoba/documents/tests/test_browser.py
r12766 r13139 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.