Changeset 14208 for main/waeup.ikoba/trunk/src
- Timestamp:
- 30 Sep 2016, 05:22:56 (8 years ago)
- Location:
- main/waeup.ikoba/trunk/src/waeup/ikoba/customers
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/trunk/src/waeup/ikoba/customers/browser.py
r14195 r14208 739 739 740 740 @action(_('Save and request registration now'), 741 warning=WARNING_CUST, condition=is_requestable) 741 warning=WARNING_CUST, condition=is_requestable, 742 style='success') 742 743 def finalsubmit(self, **data): 743 744 msave(self, **data) … … 1006 1007 return 1007 1008 1008 @action(_('Final Submit'), warning=WARNING_DOC )1009 @action(_('Final Submit'), warning=WARNING_DOC, style='success') 1009 1010 def finalsubmit(self, **data): 1010 1011 msave(self, **data) … … 1084 1085 def render(self): 1085 1086 portal_language = getUtility(IIkobaUtils).PORTAL_LANGUAGE 1086 Id = translate(_('Id'), 'waeup.ikoba', target_language=portal_language)1087 #Id = translate(_('Id'), 'waeup.ikoba', target_language=portal_language) 1087 1088 Title = translate(_('Title'), 'waeup.ikoba', target_language=portal_language) 1088 1089 Type = translate(_('Type'), 'waeup.ikoba', target_language=portal_language) … … 1094 1095 tabledata.append(sorted( 1095 1096 [value for value in self.context.values()])) 1096 tableheader.append([(Id, 'document_id', 2), 1097 tableheader.append([ 1098 #(Id, 'document_id', 2), 1097 1099 (Title, 'title', 6), 1098 1100 (Type, 'translated_class_name', 6), … … 1464 1466 1465 1467 @action(_('Apply now (final submission)'), warning=WARNING_CON, 1466 condition=submission_allowed, style=' primary')1468 condition=submission_allowed, style='success') 1467 1469 def submit(self, **data): 1468 1470 if self.terms_and_conditions and not self.request.form.get( … … 1522 1524 1523 1525 @action(_('Select payment method (final submission)'), 1524 style=' primary')1526 style='success') 1525 1527 def confirm(self, **data): 1526 1528 if self.gw is None: -
main/waeup.ikoba/trunk/src/waeup/ikoba/customers/tests/test_browser.py
r13806 r14208 141 141 self.customer['documents'].addDocument(self.document) 142 142 self.contract = createObject(self._contract_factory) 143 self.contract.contract_id = u'CON1' 143 self.contract.contract_id = u'11111222223333344444555556666677' 144 self.contract.title = u'My first contract' 144 145 self.assertRaises( 145 146 NotIdValue, setattr, self.contract, 'contract_id', … … 1352 1353 self.assertTrue('Sample Contract added.' in self.browser.contents) 1353 1354 conid = [i for i in self.customer['contracts'].keys() 1354 if len(i) > 10][0]1355 if self.customer['contracts'][i].title != 'My first contract'][0] 1355 1356 contract = self.customer['contracts'][conid] 1356 1357 self.assertEqual( … … 1446 1447 self.assertTrue('Sample Contract added.' in self.browser.contents) 1447 1448 conid = [i for i in self.customer['contracts'].keys() 1448 if len(i) > 10][0]1449 if self.customer['contracts'][i].title != 'My first contract'][0] 1449 1450 contract = self.customer['contracts'][conid] 1450 1451 self.assertEqual( … … 1567 1568 self.contract.valid_from = date(2015, 12, 4) 1568 1569 self.contract.valid_to = 'anything' 1569 self.contract.title = u'Contract Title' 1570 self.browser.open(self.customer_path + '/contracts/CON1') 1570 self.contract.title = u'My second contract' 1571 self.browser.open(self.customer_path 1572 + '/contracts/11111222223333344444555556666677') 1571 1573 self.browser.getLink("Download contract slip").click() 1572 1574 self.assertEqual(self.browser.headers['Status'], '200 Ok') … … 1583 1585 self.contract.document_object = self.document 1584 1586 self.contract.product_object = self.product 1585 self.contract.title = u' Contract Title'1587 self.contract.title = u'My third contract' 1586 1588 self.browser.addHeader('Authorization', 'Basic mgr:mgrpw') 1587 1589 # Officers can open the receipt 1588 self.browser.open(self.customer_path + '/contracts/CON1') 1590 self.browser.open(self.customer_path 1591 + '/contracts/11111222223333344444555556666677') 1589 1592 self.browser.getLink("Download payment receipt").click() 1590 1593 self.assertEqual(self.browser.headers['Status'], '200 Ok') … … 1620 1623 IWorkflowState(self.contract).setState('submitted') 1621 1624 self.browser.addHeader('Authorization', 'Basic mgr:mgrpw') 1622 self.browser.open(self.contracts_path + '/CON1/trigtrans') 1625 self.browser.open(self.contracts_path 1626 + '/11111222223333344444555556666677/trigtrans') 1623 1627 self.browser.getControl(name="transition").value = ['approve'] 1624 1628 self.browser.getControl("Apply").click() … … 1628 1632 'must be verified first.</div>' 1629 1633 in self.browser.contents) 1630 self.browser.open(self.contracts_path + '/CON1/trigtrans') 1634 self.browser.open(self.contracts_path 1635 + '/11111222223333344444555556666677/trigtrans') 1631 1636 IWorkflowState(self.document).setState('verified') 1632 1637 self.browser.getControl(name="transition").value = ['approve'] … … 1637 1642 # select payment 1638 1643 self.prepare_payment_select() 1639 self.browser.open('%s/CON1/edit' % self.contracts_path) 1644 self.browser.open('%s/11111222223333344444555556666677/edit' 1645 % self.contracts_path) 1640 1646 self.browser.getControl("Proceed to checkout").click() 1641 1647 self.assertTrue( … … 1648 1654 self.prepare_payment_select() 1649 1655 self.browser.open( 1650 '%s/CON1/select_payment_method' % self.contracts_path) 1656 '%s/11111222223333344444555556666677/select_payment_method' 1657 % self.contracts_path) 1651 1658 self.browser.getControl(self.never_ending_button_text).click() 1652 1659 self.assertTrue( … … 1657 1664 self.prepare_payment_select() 1658 1665 self.browser.open( 1659 '%s/CON1/select_payment_method' % self.contracts_path) 1666 '%s/11111222223333344444555556666677/select_payment_method' 1667 % self.contracts_path) 1660 1668 radio_ctrl = self.browser.getControl(name='gw') 1661 1669 radio_ctrl.displayValue = ['Credit Card (Demo Payments)']
Note: See TracChangeset for help on using the changeset viewer.