Ignore:
Timestamp:
15 Dec 2014, 12:49:01 (10 years ago)
Author:
Henrik Bettermann
Message:

Rename button and redirect after transition to context page.

Remove restwidget.py.

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

    r12245 r12246  
    298298            dict(name=x, title=y) for x, y in allowed_transitions]
    299299
    300     @action(_('Save'), style='primary')
    301     def save(self, **data):
     300    @action(_('Apply now'), style='primary')
     301    def apply(self, **data):
    302302        form = self.request.form
    303303        if 'transition' in form and form['transition']:
     
    306306            try:
    307307                wf_info.fireTransition(transition_id)
     308                self.flash(_("Transition '%s' executed." % transition_id))
    308309            except InvalidTransitionError, error:
    309310                self.flash(error, type="warning")
    310         return
     311            self.redirect(self.url(self.context))
     312        return
  • main/waeup.ikoba/trunk/src/waeup/ikoba/documents/tests/test_browser.py

    r12243 r12246  
    167167        self.browser.getLink("Transition").click()
    168168        self.browser.getControl(name="transition").value = ['retract']
    169         self.browser.getControl("Save").click()
     169        self.browser.getControl("Apply now").click()
    170170        self.assertEqual(document.state, 'created')
    171171
     
    252252        self.browser.getLink("Transition").click()
    253253        self.browser.getControl(name="transition").value = ['publish']
    254         self.browser.getControl("Speichern").click()
     254        self.browser.getControl("Jetzt anwenden").click()
    255255        self.assertEqual(document.state, 'published')
    256256
Note: See TracChangeset for help on using the changeset viewer.