/** * Form settings. * * @return void * * @author Sascha Koehler <*****@*****.**> * @since 11.04.2011 */ public function preferences() { parent::preferences(); $this->preferences['submitButtonTitle'] = _t('SilvercartPage.LOGIN'); $this->formFields['emailaddress']['title'] = _t('SilvercartPage.EMAIL_ADDRESS'); $this->formFields['password']['title'] = _t('SilvercartPage.PASSWORD'); }
/** * Set texts for preferences with i18n methods. * * @return void * * @author Sascha Koehler <*****@*****.**> * @since 11.04.2011 */ public function preferences() { $this->preferences['submitButtonTitle'] = _t('SilvercartPage.LOGIN'); $this->preferences['doJsValidationScrolling'] = false; $this->formFields['emailaddress']['title'] = _t('SilvercartPage.EMAIL_ADDRESS') . ':'; $this->formFields['password']['title'] = _t('SilvercartPage.PASSWORD') . ':'; parent::preferences(); }
/** * Sets the preferences for this form * * @return array * * @author Sebastian Diel <*****@*****.**> * @since 09.10.2012 */ public function preferences() { $this->CancelLink = $this->controller->Link(); $this->preferences = array('submitButtonTitle' => _t('SilvercartPage.SAVE', 'save'), 'markRequiredFields' => true); parent::preferences(); return $this->preferences; }
/** * Preferences * * @return void * * @author Sebastian Diel <*****@*****.**>, * Sascha Koehler <*****@*****.**> * @since 03.03.2015 */ public function preferences() { $numberOfDecimalPlaces = false; if ($this->getProduct()->isInCart()) { $this->preferences['submitButtonTitle'] = _t('SilvercartProduct.CHANGE_QUANTITY_CART'); } else { $this->preferences['submitButtonTitle'] = _t('SilvercartProduct.ADD_TO_CART'); } $this->preferences['doJsValidationScrolling'] = false; $this->formFields['productQuantity']['title'] = _t('SilvercartProduct.QUANTITY'); $backLink = Controller::curr()->getRequest()->getURL(); if (Director::is_relative_url($backLink)) { $backLink = Director::absoluteURL($backLink, true); } $this->setCustomParameter('backLink', $backLink); // Get maxlength for quantity field $quantityFieldMaxLength = strlen((string) SilvercartConfig::addToCartMaxQuantity()); if ($quantityFieldMaxLength == 0) { $quantityFieldMaxLength = 1; } if (array_key_exists('productID', $this->customParameters)) { $silvercartProduct = $this->getProduct(); if ($silvercartProduct instanceof SilvercartProduct) { $numberOfDecimalPlaces = $silvercartProduct->SilvercartQuantityUnit()->numberOfDecimalPlaces; } } if ($numberOfDecimalPlaces !== false && $numberOfDecimalPlaces > 0) { if (array_key_exists('isNumbersOnly', $this->formFields['productQuantity']['checkRequirements'])) { unset($this->formFields['productQuantity']['checkRequirements']['isNumbersOnly']); } $this->formFields['productQuantity']['checkRequirements']['isDecimalNumber'] = $numberOfDecimalPlaces; $this->formFields['productQuantity']['maxLength'] = $quantityFieldMaxLength + 1 + $numberOfDecimalPlaces; } else { $this->formFields['productQuantity']['maxLength'] = $quantityFieldMaxLength; } parent::preferences(); }
/** * Sets some dynamic preferences * * @return void * * @author Sebastian Diel <*****@*****.**> * @since 11.03.2013 */ public function preferences() { $this->preferences['submitButtonToolTip'] = _t('SilvercartPage.DECREMENT_POSITION'); return parent::preferences(); }
/** * Set some field values and button labels. * * @return void * * @author Sebastian Diel <*****@*****.**>, * Sascha Koehler <*****@*****.**> * @since 27.11.2014 */ public function preferences() { $this->preferences['submitButtonTitle'] = _t('SilvercartProductGroupPageSelector.OK'); $this->preferences['doJsValidationScrolling'] = false; parent::preferences(); }
/** * Set texts for preferences with i18n methods. * * @return void * * @author Sebastian Diel <*****@*****.**> * @since 10.09.2013 */ public function preferences() { $this->preferences['submitButtonTitle'] = _t('SilvercartDownloadSearchForm.submitButtonTitle'); $this->preferences['doJsValidationScrolling'] = false; parent::preferences(); }
/** * Sets the preferences for this form * * @return array * * @author Sebastian Diel <*****@*****.**> * @since 25.09.2014 */ public function preferences() { $this->preferences = array('markRequiredFields' => true); parent::preferences(); return $this->preferences; }
/** * Form settings. * * @return void * * @author Sebastian Diel <*****@*****.**> * @since 11.11.2016 */ public function preferences() { parent::preferences(); $this->preferences['submitButtonTitle'] = _t('SilvercartPage.LOGIN'); $this->preferences['doJsValidationScrolling'] = false; }
/** * Set texts for preferences with i18n methods. * * @return void * * @author Sascha Koehler <*****@*****.**>, * Sebastian Diel <*****@*****.**> * @since 26.06.2013 */ public function preferences() { $this->preferences['submitButtonTitle'] = _t('SilvercartSearchWidgetForm.SUBMITBUTTONTITLE'); $this->preferences['doJsValidationScrolling'] = false; $this->formFields['quickSearchQuery']['title'] = _t('SilvercartSearchWidgetForm.SEARCHLABEL'); parent::preferences(); }
/** * Returns the preferences for this form * * @return array * * @author Sebastian Diel <*****@*****.**> * @since 27.04.2012 */ public function preferences() { $this->preferences = array('submitButtonTitle' => _t('Silvercart.CHOOSE')); return parent::preferences(); }
/** * Sets the preferences for this form * * @return array * * @author Sebastian Diel <*****@*****.**> * @since 04.06.2014 */ public function preferences() { $this->preferences = array('submitButtonTitle' => _t('SilvercartPage.SUBMIT_MESSAGE', 'submit message'), 'markRequiredFields' => true); parent::preferences(); return $this->preferences; }