Changeset 12246
- Timestamp:
- 15 Dec 2014, 12:49:01 (10 years ago)
- Location:
- main/waeup.ikoba/trunk/src/waeup/ikoba
- Files:
-
- 1 deleted
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/trunk/src/waeup/ikoba/customers/browser.py
r12225 r12246 414 414 dict(name=x, title=y) for x, y in allowed_transitions] 415 415 416 @action(_(' Save'), style='primary')417 def save(self, **data):416 @action(_('Apply now'), style='primary') 417 def apply(self, **data): 418 418 form = self.request.form 419 419 if 'transition' in form and form['transition']: … … 421 421 wf_info = IWorkflowInfo(self.context) 422 422 wf_info.fireTransition(transition_id) 423 self.flash(_("Transition '%s' executed." % transition_id)) 424 self.redirect(self.url(self.context)) 423 425 return 424 426 … … 943 945 dict(name=x, title=y) for x, y in allowed_transitions] 944 946 945 @action(_(' Save'), style='primary')946 def save(self, **data):947 @action(_('Apply now'), style='primary') 948 def apply(self, **data): 947 949 form = self.request.form 948 950 if 'transition' in form and form['transition']: … … 951 953 try: 952 954 wf_info.fireTransition(transition_id) 955 self.flash(_("Transition '%s' executed." % transition_id)) 953 956 except InvalidTransitionError, error: 954 957 self.flash(error, type="warning") 958 self.redirect(self.url(self.context)) 955 959 return 956 960 … … 1289 1293 dict(name=x, title=y) for x, y in allowed_transitions] 1290 1294 1291 @action(_(' Save'), style='primary')1292 def save(self, **data):1295 @action(_('Apply now'), style='primary') 1296 def apply(self, **data): 1293 1297 form = self.request.form 1294 1298 if 'transition' in form and form['transition']: … … 1297 1301 try: 1298 1302 wf_info.fireTransition(transition_id) 1303 self.flash(_("Transition '%s' executed." % transition_id)) 1299 1304 except InvalidTransitionError, error: 1300 1305 self.flash(error, type="warning") 1306 self.redirect(self.url(self.context)) 1301 1307 return 1302 1308 -
main/waeup.ikoba/trunk/src/waeup/ikoba/customers/tests/test_browser.py
r12221 r12246 313 313 # Managers can trigger transitions 314 314 self.browser.getControl(name="transition").value = ['start'] 315 self.browser.getControl(" Save").click()315 self.browser.getControl("Apply now").click() 316 316 # Managers can edit base 317 317 self.browser.open(self.customer_path) … … 376 376 self.browser.open(self.trigtrans_path) 377 377 self.browser.getControl(name="transition").value = ['start'] 378 self.browser.getControl("Save").click() 378 self.browser.getControl("Apply now").click() 379 self.browser.open(self.trigtrans_path) 379 380 self.browser.getControl(name="transition").value = ['request'] 380 self.browser.getControl("Save").click() 381 self.browser.getControl("Apply now").click() 382 self.browser.open(self.trigtrans_path) 381 383 self.browser.getControl(name="transition").value = ['reject'] 382 self.browser.getControl("Save").click() 384 self.browser.getControl("Apply now").click() 385 self.browser.open(self.trigtrans_path) 383 386 self.browser.getControl(name="transition").value = ['request'] 384 self.browser.getControl("Save").click() 387 self.browser.getControl("Apply now").click() 388 self.browser.open(self.trigtrans_path) 385 389 self.browser.getControl(name="transition").value = ['approve'] 386 self.browser.getControl("Save").click() 390 self.browser.getControl("Apply now").click() 391 self.browser.open(self.trigtrans_path) 387 392 self.browser.getControl(name="transition").value = ['reset1'] 388 self.browser.getControl(" Save").click()393 self.browser.getControl("Apply now").click() 389 394 return 390 395 … … 843 848 self.browser.getLink("Transition").click() 844 849 self.browser.getControl(name="transition").value = ['submit'] 845 self.browser.getControl("Save").click() 850 self.browser.getControl("Apply now").click() 851 self.browser.getLink("Transition").click() 846 852 # Document can only be verified if files have been uploaded before 847 853 self.browser.getControl(name="transition").value = ['verify'] 848 self.browser.getControl(" Save").click()854 self.browser.getControl("Apply now").click() 849 855 self.assertTrue('No file uploaded' in self.browser.contents) 850 856 self.assertEqual(document.state, 'submitted') … … 1031 1037 self.browser.open(self.documents_path + '/d101/trigtrans') 1032 1038 self.browser.getControl(name="transition").value = ['verify'] 1033 self.browser.getControl(" Save").click()1039 self.browser.getControl("Apply now").click() 1034 1040 self.assertEqual( 1035 1041 getattr(self.document, 'sample_md5', None), … … 1163 1169 self.browser.getLink("Transition").click() 1164 1170 self.browser.getControl(name="transition").value = ['submit'] 1165 self.browser.getControl("Save").click() 1171 self.browser.getControl("Apply now").click() 1172 self.browser.getLink("Transition").click() 1166 1173 self.browser.getControl(name="transition").value = ['approve'] 1167 self.browser.getControl(" Save").click()1174 self.browser.getControl("Apply now").click() 1168 1175 self.assertEqual(contract.state, 'approved') 1169 1176 … … 1326 1333 self.browser.open(self.contracts_path + '/c101/trigtrans') 1327 1334 self.browser.getControl(name="transition").value = ['approve'] 1328 self.browser.getControl(" Save").click()1335 self.browser.getControl("Apply now").click() 1329 1336 # InvalidTransitionError is catched 1330 1337 self.assertTrue( 1331 1338 '<div class="alert alert-warning">Attached documents must be verified first.</div>' 1332 1339 in self.browser.contents) 1340 self.browser.open(self.contracts_path + '/c101/trigtrans') 1333 1341 IWorkflowState(self.document).setState('verified') 1334 1342 self.browser.getControl(name="transition").value = ['approve'] 1335 self.browser.getControl(" Save").click()1343 self.browser.getControl("Apply now").click() 1336 1344 self.assertEqual(IWorkflowState(self.contract).getState(), 'approved') -
main/waeup.ikoba/trunk/src/waeup/ikoba/documents/browser.py
r12245 r12246 298 298 dict(name=x, title=y) for x, y in allowed_transitions] 299 299 300 @action(_(' Save'), style='primary')301 def save(self, **data):300 @action(_('Apply now'), style='primary') 301 def apply(self, **data): 302 302 form = self.request.form 303 303 if 'transition' in form and form['transition']: … … 306 306 try: 307 307 wf_info.fireTransition(transition_id) 308 self.flash(_("Transition '%s' executed." % transition_id)) 308 309 except InvalidTransitionError, error: 309 310 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 167 167 self.browser.getLink("Transition").click() 168 168 self.browser.getControl(name="transition").value = ['retract'] 169 self.browser.getControl(" Save").click()169 self.browser.getControl("Apply now").click() 170 170 self.assertEqual(document.state, 'created') 171 171 … … 252 252 self.browser.getLink("Transition").click() 253 253 self.browser.getControl(name="transition").value = ['publish'] 254 self.browser.getControl(" Speichern").click()254 self.browser.getControl("Jetzt anwenden").click() 255 255 self.assertEqual(document.state, 'published') 256 256 -
main/waeup.ikoba/trunk/src/waeup/ikoba/locales/de/LC_MESSAGES/waeup.ikoba.po
r12192 r12246 16 16 "Project-Id-Version: WAeUP.KOFA\n" 17 17 "POT-Creation-Date: Wed Dec 10 17:36:11 2014\n" 18 "PO-Revision-Date: 2014-12-1 0 17:35+0100\n"18 "PO-Revision-Date: 2014-12-15 13:27+0100\n" 19 19 "Last-Translator: Henrik Bettermann <henrik@waeup.org>\n" 20 20 "Language-Team: WAeUP Germany <henrik@waeup.org>\n" … … 27 27 "X-Poedit-Basepath: \\\\Salsa\\ikoba\\trunk\\src\n" 28 28 "X-Generator: Poedit 1.6.5\n" 29 30 msgid "Apply now" 31 msgstr "Jetzt anwenden" 29 32 30 33 #: waeup/ikoba/browser/async.py:91
Note: See TracChangeset for help on using the changeset viewer.