Exemplo n.º 1
0
    def get_review_layout(self):
        """Get layout for the form "Review" section."""
        if self.read_only:
            review_layout = (DocumentFieldset(
                _('Review'), DateField('received_date'),
                PropertyLayout('return_code'),
                Field('review_start_date', readonly='readonly'),
                Field('review_due_date', readonly='readonly'),
                PropertyLayout('get_current_review_step_display'),
                YesNoLayout('is_under_review'), YesNoLayout('is_overdue'),
                'trs_return_code', 'file_transmitted'),
                             DocumentFieldset(_('Distribution list'),
                                              ReviewsLayout()))
        else:
            review_layout = (
                DocumentFieldset(
                    _('Review'), DateField('received_date'),
                    PropertyLayout('return_code'),
                    Field('review_start_date', readonly='readonly'),
                    Field('review_due_date', readonly='readonly'),
                    PropertyLayout('get_current_review_step_display'),
                    YesNoLayout('is_under_review'), YesNoLayout('is_overdue'),
                    'trs_return_code', 'file_transmitted'),
                DocumentFieldset(
                    _('Distribution list'),
                    QuickDistributionListWidgetLayout(),
                    'reviewers',
                    'leader',
                    'approver',
                ),
            )

        return review_layout
Exemplo n.º 2
0
    def build_layout(self):
        fields = (_('Revision'), DateField('revision_date'),
                  DateField('received_date'),
                  Field('created_on', readonly='readonly'))

        # native / pdf will be autogenerated
        if self.read_only:
            fields += ('native_file', 'pdf_file')

        return Layout(DocumentFieldset(*fields))
Exemplo n.º 3
0
 def build_layout(self):
     return Layout(
         Field('tobechecked_dir', type='hidden'),
         Field('accepted_dir', type='hidden'),
         Field('rejected_dir', type='hidden'),
         DocumentFieldset(
             _('General information'),
             Field('document_key', type='hidden'),
             'document_number',
             DateField('transmittal_date'),
             DateField('ack_of_receipt_date'),
             'contract_number',
             'originator',
             'recipient',
             'sequential_number',
             self.get_related_documents_layout(),
         ))