TermsCheckoutComponent::getFormFields PHP Method

getFormFields() public method

public getFormFields ( Order $order )
$order Order
    public function getFormFields(Order $order)
    {
        $fields = FieldList::create();
        $page = SiteConfig::current_site_config()->TermsPage();
        if ($page->exists()) {
            $fields->push(CheckboxField::create('ReadTermsAndConditions', _t('Checkout.TermsAndConditionsLink', 'I agree to the terms and conditions stated on the <a href="{TermsPageLink}" target="new" title="Read the shop terms and conditions for this site">{TermsPageTitle}</a> page', '', array('TermsPageLink' => $page->Link(), 'TermsPageTitle' => $page->Title)))->setCustomValidationMessage(_t("CheckoutField.MustAgreeToTerms", "You must agree to the terms and conditions")));
        }
        return $fields;
    }