/** * Return list of the "Button" widgets * * @return array */ protected function getFormButtons() { $result = parent::getFormButtons(); $result['submit'] = new \XLite\View\Button\Submit(array(\XLite\View\Button\AButton::PARAM_LABEL => 'Confirm', \XLite\View\Button\AButton::PARAM_BTN_TYPE => 'regular-main-button', \XLite\View\Button\AButton::PARAM_STYLE => 'action')); $result['cancel'] = new \XLite\View\Button\Regular(array(\XLite\View\Button\AButton::PARAM_LABEL => 'Cancel', \XLite\View\Button\AButton::PARAM_STYLE => 'action always-enabled')); return $result; }
/** * Return list of the "Button" widgets * * @return array */ protected function getFormButtons() { $result = parent::getFormButtons(); $label = $this->getModelObject()->getId() ? 'Update' : 'Create'; $result['submit'] = new \XLite\View\Button\Submit(array(\XLite\View\Button\AButton::PARAM_LABEL => $label, \XLite\View\Button\AButton::PARAM_BTN_TYPE => 'regular-main-button', \XLite\View\Button\AButton::PARAM_STYLE => 'action')); return $result; }
/** * Return list of the "Button" widgets * * @return array */ protected function getFormButtons() { $result = parent::getFormButtons(); if ($this->getModelObject()->getId()) { if ($this->isApproved()) { $result['submit'] = new \XLite\View\Button\Submit(array(\XLite\View\Button\AButton::PARAM_LABEL => 'Update', \XLite\View\Button\AButton::PARAM_BTN_TYPE => 'regular-main-button', \XLite\View\Button\AButton::PARAM_STYLE => 'action')); } else { $result['approve'] = new \XLite\View\Button\Submit(array(\XLite\View\Button\AButton::PARAM_LABEL => 'Approve', \XLite\View\Button\AButton::PARAM_BTN_TYPE => 'regular-main-button', \XLite\View\Button\AButton::PARAM_STYLE => 'action')); $result['remove'] = new \XLite\View\Button\Submit(array(\XLite\View\Button\AButton::PARAM_LABEL => 'Remove', \XLite\View\Button\AButton::PARAM_STYLE => 'action')); } } else { $result['submit'] = new \XLite\View\Button\Submit(array(\XLite\View\Button\AButton::PARAM_LABEL => 'Create', \XLite\View\Button\AButton::PARAM_BTN_TYPE => 'regular-main-button', \XLite\View\Button\AButton::PARAM_STYLE => 'action')); } return $result; }
/** * Return list of the "Button" widgets * * @return array */ protected function getFormButtons() { $result = parent::getFormButtons(); if (!$this->getModelObject() || !$this->getModelObject()->getAnonymous()) { $result['submit'] = new \XLite\View\Button\Submit(array(\XLite\View\Button\AButton::PARAM_LABEL => $this->getSubmitButtonLabel(), \XLite\View\Button\AButton::PARAM_BTN_TYPE => 'regular-main-button', \XLite\View\Button\AButton::PARAM_STYLE => $this->getSubmitButtonStyle())); } $same = \XLite\Core\Database::getRepo('XLite\\Model\\Profile')->findUserWithSameLogin($this->getModelObject()); if ($this->getModelObject() && $this->getModelObject()->isPersistent() && $this->getModelObject()->getAnonymous() && !$this->getModelObject()->getOrder()) { if (!$same) { $result['register'] = new \XLite\View\Button\Regular(array(\XLite\View\Button\AButton::PARAM_LABEL => static::t('Register user'), \XLite\View\Button\AButton::PARAM_BTN_TYPE => 'regular-main-button', \XLite\View\Button\AButton::PARAM_STYLE => 'register', \XLite\View\Button\Regular::PARAM_ACTION => 'registerAsNew', \XLite\View\Button\AButton::PARAM_ATTRIBUTES => array('title' => static::t('The user will be registered; a password will be sent to the user via email')))); } elseif ($same && !$same->isAdmin()) { $result['merge'] = new \XLite\View\Button\Regular(array(\XLite\View\Button\AButton::PARAM_LABEL => static::t('Merge with Registered'), \XLite\View\Button\AButton::PARAM_STYLE => 'merge', \XLite\View\Button\Regular::PARAM_ACTION => 'mergeWithRegistered')); } } return $result; }
/** * Return list of the "Button" widgets * * @return array */ protected function getFormButtons() { $result = parent::getFormButtons(); $label = $this->getModelObject()->getId() ? 'Update product' : 'Add product'; $result['submit'] = new \XLite\View\Button\Submit(array(\XLite\View\Button\AButton::PARAM_LABEL => $label, \XLite\View\Button\AButton::PARAM_BTN_TYPE => 'regular-main-button', \XLite\View\Button\AButton::PARAM_STYLE => 'action')); if ($this->getModelObject()->isPersistent()) { $url = $this->buildURL('product', 'clone', array('product_id' => $this->getModelObject()->getId())); $result['clone-product'] = new \XLite\View\Button\Link(array(\XLite\View\Button\AButton::PARAM_LABEL => 'Clone this product', \XLite\View\Button\AButton::PARAM_STYLE => 'model-button always-enabled', \XLite\View\Button\Link::PARAM_LOCATION => $url)); $url = $this->buildProductPreviewURL($this->getModelObject()->getId()); $result['preview-product'] = new \XLite\View\Button\SimpleLink(array(\XLite\View\Button\AButton::PARAM_LABEL => 'Preview product page', \XLite\View\Button\AButton::PARAM_STYLE => 'model-button link action', \XLite\View\Button\Link::PARAM_BLANK => true, \XLite\View\Button\Link::PARAM_LOCATION => $url)); } }
/** * Return list of the "Button" widgets * * @return array */ protected function getFormButtons() { $result = parent::getFormButtons(); $result['submit'] = new \XLite\View\Button\Submit(array(\XLite\View\Button\AButton::PARAM_LABEL => 'Update', \XLite\View\Button\AButton::PARAM_BTN_TYPE => 'regular-main-button', \XLite\View\Button\AButton::PARAM_STYLE => 'action')); if ($this->getDefaultModelObject()->isPersistent()) { $url = $this->buildURL('product', 'restore_auction_inc', array('product_id' => $this->getModelId())); $result['restore'] = new \XLite\View\Button\Regular(array(\XLite\View\Button\AButton::PARAM_LABEL => 'Restore to module defaults', \XLite\View\Button\AButton::PARAM_STYLE => 'action always-enabled', \XLite\View\Button\Regular::PARAM_JS_CODE => 'self.location=\'' . $url . '\'')); } return $result; }
/** * Return list of the "Button" widgets * * @return array */ protected function getFormButtons() { $result = parent::getFormButtons(); $result['submit'] = new \XLite\View\Button\Submit(array(\XLite\View\Button\AButton::PARAM_LABEL => $this->getSubmitButtonLabel(), \XLite\View\Button\AButton::PARAM_BTN_TYPE => 'regular-main-button')); return $result; }
/** * Return list of the "Button" widgets * * @return array */ protected function getFormButtons() { $result = parent::getFormButtons(); $result['submit'] = new \XLite\View\Button\Submit(array(\XLite\View\Button\AButton::PARAM_LABEL => 'Submit', \XLite\View\Button\AButton::PARAM_BTN_TYPE => 'regular-main-button', \XLite\View\Button\AButton::PARAM_STYLE => 'action')); if ('css_js_performance' === $this->getTarget()) { $url = $this->buildURL('css_js_performance', 'clean_aggregation_cache'); $result['clear_aggregation_cache'] = new \XLite\View\Button\Tooltip(array(\XLite\View\Button\AButton::PARAM_LABEL => 'Clean aggregation cache', \XLite\View\Button\AButton::PARAM_STYLE => 'action always-enabled', \XLite\View\Button\Tooltip::PARAM_SEPARATE_TOOLTIP => static::t('Clean aggregation cache help text'), \XLite\View\Button\Regular::PARAM_JS_CODE => 'self.location=\'' . $url . '\'')); $url = $this->buildURL('css_js_performance', 'clean_view_cache'); $result['clear_widgets_cache'] = new \XLite\View\Button\Tooltip(array(\XLite\View\Button\AButton::PARAM_LABEL => 'Clean widgets cache', \XLite\View\Button\AButton::PARAM_STYLE => 'action always-enabled', \XLite\View\Button\Tooltip::PARAM_SEPARATE_TOOLTIP => static::t('Clean widgets cache help text'), \XLite\View\Button\Regular::PARAM_JS_CODE => 'self.location=\'' . $url . '\'')); } if ('cache_management' === $this->getTarget()) { $url = $this->buildURL('cache_management', 'rebuild'); $result['re_deploy_cache'] = new \XLite\View\Button\Tooltip(array(\XLite\View\Button\AButton::PARAM_LABEL => 'Re-deploy the store', \XLite\View\Button\AButton::PARAM_STYLE => 'action always-enabled', \XLite\View\Button\Tooltip::PARAM_SEPARATE_TOOLTIP => static::t('Re-deploy the store help text'), \XLite\View\Button\Regular::PARAM_JS_CODE => sprintf('if (confirm(core.t("Are you sure?"))) self.location="%s";', $url))); $url = $this->buildURL('cache_management', 'quick_data'); $result['quick_data'] = new \XLite\View\Button\Tooltip(array(\XLite\View\Button\AButton::PARAM_LABEL => 'Calculate quick data', \XLite\View\Button\AButton::PARAM_STYLE => 'action always-enabled', \XLite\View\Button\Tooltip::PARAM_SEPARATE_TOOLTIP => static::t('Calculate quick data help text'), \XLite\View\Button\Regular::PARAM_JS_CODE => 'self.location=\'' . $url . '\'')); } return $result; }
/** * Return list of the "Button" widgets * * @return array */ protected function getFormButtons() { $result = parent::getFormButtons(); $result['save'] = new \XLite\View\Button\Submit(array(\XLite\View\Button\AButton::PARAM_LABEL => 'Save', \XLite\View\Button\AButton::PARAM_BTN_TYPE => 'regular-main-button', \XLite\View\Button\AButton::PARAM_STYLE => 'action')); $result['save_and_close'] = new \XLite\View\Button\Regular(array(\XLite\View\Button\AButton::PARAM_LABEL => 'Save & Close', \XLite\View\Button\AButton::PARAM_STYLE => 'action', \XLite\View\Button\Regular::PARAM_ACTION => 'updateAndClose')); return $result; }
/** * Return list of the "Button" widgets * * @return array */ protected function getFormButtons() { $result = parent::getFormButtons(); $result['submit'] = new \XLite\View\Button\Submit(array(\XLite\View\Button\AButton::PARAM_LABEL => 'Save', \XLite\View\Button\AButton::PARAM_BTN_TYPE => 'regular-main-button', \XLite\View\Button\AButton::PARAM_STYLE => 'action')); $result['shipping_methods'] = new \XLite\View\Button\SimpleLink(array(\XLite\View\Button\AButton::PARAM_LABEL => static::t('Back to shipping methods'), \XLite\View\Button\AButton::PARAM_STYLE => 'action shipping-list-back-button', \XLite\View\Button\Link::PARAM_LOCATION => $this->buildURL('shipping_methods'))); return $result; }
/** * Return list of the "Button" widgets * * @return array */ protected function getFormButtons() { $result = parent::getFormButtons(); $result['submit'] = new \XLite\View\Button\Submit(array(\XLite\View\Button\AButton::PARAM_LABEL => 'Save', \XLite\View\Button\AButton::PARAM_BTN_TYPE => 'regular-main-button', \XLite\View\Button\AButton::PARAM_STYLE => 'action')); return $result; }
/** * Return list of the "Button" widgets * * @return array */ protected function getFormButtons() { $result = parent::getFormButtons(); $result['submit'] = new \XLite\View\Button\ProgressState(array(\XLite\View\Button\AButton::PARAM_LABEL => 'Request credentials', \XLite\View\Button\AButton::PARAM_BTN_TYPE => 'regular-main-button', \XLite\View\Button\AButton::PARAM_STYLE => 'action always-enabled', \XLite\View\Button\Regular::PARAM_JS_CODE => 'this.form.submit()')); $result['shipping_methods'] = new \XLite\View\Button\SimpleLink(array(\XLite\View\Button\AButton::PARAM_LABEL => static::t('Back to shipping methods'), \XLite\View\Button\AButton::PARAM_STYLE => 'action shipping-list-back-button', \XLite\View\Button\Link::PARAM_LOCATION => $this->buildURL('shipping_methods'))); return $result; }
/** * Return list of the "Button" widgets * * @return array */ protected function getFormButtons() { $result = parent::getFormButtons(); $result['submit'] = new \XLite\View\Button\Submit(array(\XLite\View\Button\AButton::PARAM_LABEL => $this->getSubmitButtonLabel(), \XLite\View\Button\AButton::PARAM_STYLE => $this->getSubmitButtonStyle())); return $result; }
/** * Return list of the "Button" widgets * * @return array */ protected function getFormButtons() { $result = parent::getFormButtons(); $result['save'] = new \XLite\View\Button\Submit(array(\XLite\View\Button\AButton::PARAM_LABEL => 'Save changes', \XLite\View\Button\AButton::PARAM_BTN_TYPE => 'regular-main-button', \XLite\View\Button\AButton::PARAM_STYLE => 'action')); if (!\XLite\Core\Request::getInstance()->template) { $result['templates'] = new \XLite\View\Button\SimpleLink(array(\XLite\View\Button\AButton::PARAM_LABEL => 'Back to templates list', \XLite\View\Button\AButton::PARAM_STYLE => 'action', \XLite\View\Button\Link::PARAM_LOCATION => $this->buildURL('theme_tweaker_templates'))); } return $result; }
/** * Return list of the "Button" widgets * * @return array */ protected function getFormButtons() { $result = parent::getFormButtons(); $label = $this->getModelObject()->getId() ? 'Save changes' : 'Next wizard'; $style = 'action ' . ($this->getModelObject()->getId() ? 'save' : 'next'); $result['submit'] = new \XLite\View\Button\Submit(array(\XLite\View\Button\AButton::PARAM_LABEL => $label, \XLite\View\Button\AButton::PARAM_BTN_TYPE => 'regular-main-button', \XLite\View\Button\AButton::PARAM_STYLE => $style)); return $result; }
/** * Return list of the "Button" widgets * * @return array */ protected function getFormButtons() { $result = parent::getFormButtons(); $result['submit'] = new \XLite\View\Button\Submit(array(\XLite\View\Button\AButton::PARAM_LABEL => 'Update', \XLite\View\Button\AButton::PARAM_BTN_TYPE => 'regular-main-button', \XLite\View\Button\AButton::PARAM_STYLE => 'action')); $result['notifications'] = new \XLite\View\Button\SimpleLink(array(\XLite\View\Button\Link::PARAM_LOCATION => $this->buildURL('notifications'), \XLite\View\Button\AButton::PARAM_LABEL => 'Back to notifications list', \XLite\View\Button\AButton::PARAM_STYLE => 'action')); return $result; }