public function getCMSFields()
    {
        $fields = FieldList::create(TabSet::create('Root', Tab::create('Main')));
        $fs = '<div class="field">';
        $fe = '</div>';
        $parts = array(
            DropdownField::create('Status', $this->fieldLabel('Status'), self::get_order_status_options()),
            LiteralField::create('Customer', $fs . $this->renderWith('SilverShop\Admin\OrderAdmin_Customer') . $fe),
            LiteralField::create('Addresses', $fs . $this->renderWith('SilverShop\Admin\OrderAdmin_Addresses') . $fe),
            LiteralField::create('Content', $fs . $this->renderWith('SilverShop\Admin\OrderAdmin_Content') . $fe),
        );
        if ($this->Notes) {
            $parts[] = LiteralField::create('Notes', $fs . $this->renderWith('SilverShop\Admin\OrderAdmin_Notes') . $fe);
        }
        $fields->addFieldsToTab('Root.Main', $parts);
        $this->extend('updateCMSFields', $fields);
        if ($payments = $fields->fieldByName('Root.Payments.Payments')) {
            $fields->removeByName('Payments');
            $fields->insertAfter('Content', $payments);
            $payments->addExtraClass('order-payments');
        }

        return $fields;
    }
public function getCMSFields()
    {
        $fields = FieldList::create(TabSet::create('Root', Tab::create('Main')));
        $fs = '<div class="field">';
        $fe = '</div>';
        $parts = array(
            DropdownField::create('Status', $this->fieldLabel('Status'), self::get_order_status_options()),
            LiteralField::create('Customer', $fs . $this->renderWith('SilverShop\Admin\OrderAdmin_Customer') . $fe),
            LiteralField::create('Addresses', $fs . $this->renderWith('SilverShop\Admin\OrderAdmin_Addresses') . $fe),
            LiteralField::create('Content', $fs . $this->renderWith('SilverShop\Admin\OrderAdmin_Content') . $fe),
        );
        if ($this->Notes) {
            $parts[] = LiteralField::create('Notes', $fs . $this->renderWith('SilverShop\Admin\OrderAdmin_Notes') . $fe);
        }
        $fields->addFieldsToTab('Root.Main', $parts);
        $this->extend('updateCMSFields', $fields);
        if ($payments = $fields->fieldByName('Root.Payments.Payments')) {
            $fields->removeByName('Payments');
            $fields->insertAfter('Content', $payments);
            $payments->addExtraClass('order-payments');
        }

        return $fields;
    }
public function getCMSFields ( ) { $ fields = FieldList :: create ( TabSet :: create ( 'Root' , Tab :: create ( 'Main' ) ) ) ; $ fs = '<div class="field">' ; $ fe = '</div>' ; $ parts = array ( DropdownField :: create ( 'Status' , $ this -> fieldLabel ( 'Status' ) , self :: get_order_status_options ( ) ) , LiteralField :: create ( 'Customer' , $ fs . $ this -> renderWith ( 'SilverShop\Admin\OrderAdmin_Customer' ) . $ fe ) , LiteralField :: create ( 'Addresses' , $ fs . $ this -> renderWith ( 'SilverShop\Admin\OrderAdmin_Addresses' ) . $ fe ) , LiteralField :: create ( 'Content' , $ fs . $ this -> renderWith ( 'SilverShop\Admin\OrderAdmin_Content' ) . $ fe ) , ) ; if ( $ this -> Notes ) { $ parts [ ] = LiteralField :: create ( 'Notes' , $ fs . $ this -> renderWith ( 'SilverShop\Admin\OrderAdmin_Notes' ) . $ fe ) ; } $ fields -> addFieldsToTab ( 'Root.Main' , $ parts ) ; $ this -> extend ( 'updateCMSFields' , $ fields ) ; if ( $ payments = $ fields -> fieldByName ( 'Root.Payments.Payments' ) ) { $ fields -> removeByName ( 'Payments' ) ; $ fields -> insertAfter ( 'Content' , $ payments ) ; $ payments -> addExtraClass ( 'order-payments' ) ; } return $ fields ; }
Create CMS fields for cms viewing and editing orders
Create CMS fields for cms viewing and editing orders