Ignore:
Timestamp:
5 Jul 2015, 07:42:37 (9 years ago)
Author:
Henrik Bettermann
Message:

Repair document manage form pages. Buttons were missing.

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  
    3434from waeup.kofa.interfaces import (
    3535    IBatchProcessor, FatalCSVError, IObjectConverter, IUserAccount,
    36     IObjectHistory, IGNORE_MARKER)
     36    IGNORE_MARKER)
    3737from waeup.kofa.interfaces import IKofaUtils
    3838from waeup.kofa.interfaces import MessageFactory as _
  • main/waeup.kofa/trunk/src/waeup/kofa/documents/browser.py

    r13055 r13138  
    3636from waeup.kofa.interfaces import MessageFactory as _
    3737from waeup.kofa.interfaces import (
    38     IContactForm, IObjectHistory, IKofaObject, IKofaUtils)
     38    IContactForm, IKofaObject, IKofaUtils)
    3939from waeup.kofa.browser.layout import (
    4040    KofaPage, KofaEditFormPage, KofaAddFormPage, KofaDisplayFormPage,
     
    279279    @action(_('Add local role'), validator=NullValidator)
    280280    def addLocalRole(self, **data):
    281         return add_local_role(self,2,**data)
     281        return add_local_role(self,3,**data)
    282282
    283283    @action(_('Remove selected local roles'))
    284284    def delLocalRoles(self, **data):
    285         return del_local_roles(self,2,**data)
     285        return del_local_roles(self,3,**data)
    286286
    287287
     
    300300        return
    301301
     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)
    302316
    303317class RESTDocumentManageFormPage(DocumentManageFormPage):
     
    315329        return
    316330
     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)
    317345
    318346class DocumentTriggerTransitionFormPage(KofaEditFormPage):
  • main/waeup.kofa/trunk/src/waeup/kofa/documents/tests/test_browser.py

    r12456 r13138  
    233233        self.assertTrue('HTML Document added.' in self.browser.contents)
    234234        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)
    236239        # Document can be edited
    237240        self.browser.getControl(name="form.title").value = 'My second doc'
Note: See TracChangeset for help on using the changeset viewer.