Ignore:
Timestamp:
30 Sep 2016, 05:22:56 (8 years ago)
Author:
Henrik Bettermann
Message:

Make all final submit buttons green.

Remove Id column form PDFDocumentsOverviewSlip.

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  
    739739
    740740    @action(_('Save and request registration now'),
    741             warning=WARNING_CUST, condition=is_requestable)
     741            warning=WARNING_CUST, condition=is_requestable,
     742            style='success')
    742743    def finalsubmit(self, **data):
    743744        msave(self, **data)
     
    10061007        return
    10071008
    1008     @action(_('Final Submit'), warning=WARNING_DOC)
     1009    @action(_('Final Submit'), warning=WARNING_DOC, style='success')
    10091010    def finalsubmit(self, **data):
    10101011        msave(self, **data)
     
    10841085    def render(self):
    10851086        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)
    10871088        Title = translate(_('Title'), 'waeup.ikoba', target_language=portal_language)
    10881089        Type = translate(_('Type'), 'waeup.ikoba', target_language=portal_language)
     
    10941095            tabledata.append(sorted(
    10951096                [value for value in self.context.values()]))
    1096             tableheader.append([(Id, 'document_id', 2),
     1097            tableheader.append([
     1098                             #(Id, 'document_id', 2),
    10971099                             (Title, 'title', 6),
    10981100                             (Type, 'translated_class_name', 6),
     
    14641466
    14651467    @action(_('Apply now (final submission)'), warning=WARNING_CON,
    1466             condition=submission_allowed, style='primary')
     1468            condition=submission_allowed, style='success')
    14671469    def submit(self, **data):
    14681470        if self.terms_and_conditions and not self.request.form.get(
     
    15221524
    15231525    @action(_('Select payment method (final submission)'),
    1524             style='primary')
     1526            style='success')
    15251527    def confirm(self, **data):
    15261528        if self.gw is None:
  • main/waeup.ikoba/trunk/src/waeup/ikoba/customers/tests/test_browser.py

    r13806 r14208  
    141141        self.customer['documents'].addDocument(self.document)
    142142        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'
    144145        self.assertRaises(
    145146            NotIdValue, setattr, self.contract, 'contract_id',
     
    13521353        self.assertTrue('Sample Contract added.' in self.browser.contents)
    13531354        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]
    13551356        contract = self.customer['contracts'][conid]
    13561357        self.assertEqual(
     
    14461447        self.assertTrue('Sample Contract added.' in self.browser.contents)
    14471448        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]
    14491450        contract = self.customer['contracts'][conid]
    14501451        self.assertEqual(
     
    15671568        self.contract.valid_from = date(2015, 12, 4)
    15681569        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')
    15711573        self.browser.getLink("Download contract slip").click()
    15721574        self.assertEqual(self.browser.headers['Status'], '200 Ok')
     
    15831585        self.contract.document_object = self.document
    15841586        self.contract.product_object = self.product
    1585         self.contract.title = u'Contract Title'
     1587        self.contract.title = u'My third contract'
    15861588        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
    15871589        # Officers can open the receipt
    1588         self.browser.open(self.customer_path + '/contracts/CON1')
     1590        self.browser.open(self.customer_path
     1591            + '/contracts/11111222223333344444555556666677')
    15891592        self.browser.getLink("Download payment receipt").click()
    15901593        self.assertEqual(self.browser.headers['Status'], '200 Ok')
     
    16201623        IWorkflowState(self.contract).setState('submitted')
    16211624        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')
    16231627        self.browser.getControl(name="transition").value = ['approve']
    16241628        self.browser.getControl("Apply").click()
     
    16281632            'must be verified first.</div>'
    16291633            in self.browser.contents)
    1630         self.browser.open(self.contracts_path + '/CON1/trigtrans')
     1634        self.browser.open(self.contracts_path
     1635            + '/11111222223333344444555556666677/trigtrans')
    16311636        IWorkflowState(self.document).setState('verified')
    16321637        self.browser.getControl(name="transition").value = ['approve']
     
    16371642        # select payment
    16381643        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)
    16401646        self.browser.getControl("Proceed to checkout").click()
    16411647        self.assertTrue(
     
    16481654        self.prepare_payment_select()
    16491655        self.browser.open(
    1650             '%s/CON1/select_payment_method' % self.contracts_path)
     1656            '%s/11111222223333344444555556666677/select_payment_method'
     1657            % self.contracts_path)
    16511658        self.browser.getControl(self.never_ending_button_text).click()
    16521659        self.assertTrue(
     
    16571664        self.prepare_payment_select()
    16581665        self.browser.open(
    1659             '%s/CON1/select_payment_method' % self.contracts_path)
     1666            '%s/11111222223333344444555556666677/select_payment_method'
     1667            % self.contracts_path)
    16601668        radio_ctrl = self.browser.getControl(name='gw')
    16611669        radio_ctrl.displayValue = ['Credit Card (Demo Payments)']
Note: See TracChangeset for help on using the changeset viewer.