public static function getSettings($param = null) { $ret = parent::getSettings($param); $ret['generators']['child']['component']['success'] = false; $ret['useAjaxRequest'] = true; return $ret; }
public static function getSettings() { $ret = parent::getSettings(); $ret['componentName'] = trlStatic('Kontaktforumlar'); $ret['placeholder']['submitButton'] = 'Nachricht absenden'; return $ret; }
public function getTemplateVars(Kwf_Component_Renderer_Abstract $renderer) { $ret = parent::getTemplateVars($renderer); $ret['form'] = array(); //form-felder nicht nochmal ausgeben return $ret; }
public static function getSettings($param = null) { $ret = parent::getSettings($param); $ret['generators']['child']['component']['success'] = false; $ret['viewCache'] = false; return $ret; }
protected function _afterSave(Kwf_Model_Row_Interface $row) { parent::_afterSave($row); $user = Kwf_Registry::get('userModel')->getAuthedUser(); $user->setPassword($this->_form->getRow()->new_password); $user->clearActivationToken(); }
public function getTemplateVars() { $ret = parent::getTemplateVars(); $ret['form'] = array(); //form-felder nicht nochmal ausgeben return $ret; }
public function processInput(array $postData) { if (!$this->_recipient && isset($postData['d'])) { /** * 0 = redirectId * 1 = recipientId * 2 = recipientModelShortcut * 3 = hash */ $params = explode('_', $postData['d']); if (count($params) >= 4 && $params[3] == $this->_getHash(array($params[0], $params[1], $params[2]))) { $c = Kwf_Component_Data_Root::getInstance()->getComponentByClass('Kwc_Newsletter_Detail_Mail_Component', array('limit' => 1, 'subroot' => $this->getData())); if ($c) { $model = null; foreach ($c->getComponent()->getRecipientSources() as $key => $value) { if (is_array($value) && $key == $params[2]) { $model = $value['model']; } } if ($model) { $this->_recipient = Kwf_Model_Abstract::getInstance($model)->getRow($params[1]); } } } } parent::processInput($postData); }
public static function getSettings() { $ret = parent::getSettings(); $ret['componentName'] = 'Kontaktformular'; $ret['placeholder']['submitButton'] = 'Senden'; return $ret; }
public static function getSettings($param = null) { $ret = parent::getSettings($param); $ret['placeholder']['submitButton'] = trlKwfStatic('Search'); $ret['generators']['child']['component']['success'] = false; $ret['method'] = 'get'; return $ret; }
public static function getSettings() { $ret = parent::getSettings(); $ret['useAjaxRequest'] = false; $ret['method'] = 'get'; $ret['generators']['child']['component']['success'] = false; return $ret; }
protected function _beforeInsert(Kwf_Model_Row_Interface $row) { parent::_beforeInsert($row); $orders = Kwf_Model_Abstract::getInstance('Kwc_Shop_Cart_Orders'); $row->shop_order_id = $orders->getCartOrderAndSave()->id; $row->add_component_id = $this->getData()->dbId; $row->add_component_class = $this->getData()->componentClass; }
public static function getSettings() { $ret = parent::getSettings(); $ret['componentName'] = trlKwfStatic('Cookie Opt In / Opt Out'); $ret['generators']['child']['component']['success'] = null; $ret['viewCache'] = false; return $ret; }
public static function getSettings($param = null) { $ret = parent::getSettings($param); $ret['useAjaxRequest'] = false; $ret['componentName'] = 'Contact'; $ret['placeholder']['submitButton'] = 'Send'; return $ret; }
public static function getSettings() { $ret = parent::getSettings(); $ret['placeholder']['submitButton'] = trlKwfStatic('Save'); $ret['generators']['child']['component']['success'] = 'Kwc_Newsletter_EditSubscriber_Success_Component'; $ret['viewCache'] = false; return $ret; }
public static function getSettings($param = null) { $ret = parent::getSettings($param); $ret['useAjaxRequest'] = false; $ret['method'] = 'get'; $ret['generators']['child']['component']['success'] = false; $ret['rootElementClass'] = 'unResponsive'; return $ret; }
protected function _initForm() { parent::_initForm(); $user = Kwf_Registry::get('userModel')->getAuthedUser(); if ($user) { $this->_form->setId($user->id); } $this->_initUserForm(); }
protected function _afterInsert(Kwf_Model_Row_Interface $row) { parent::_afterInsert($row); $link = $this->getData()->getAbsoluteUrl() . '?key=' . $row->key; $mail = new Kwf_Mail_Template($this->getData()); $mail->addTo($row->email); $mail->subject = $this->_getPlaceholder('subject'); $mail->link = $link; $mail->send(); }
protected function _afterSave(Kwf_Model_Row_Interface $row) { parent::_afterSave($row); $user = Kwf_Registry::get('userModel')->getAuthedUser(); $user->deleted = 1; $user->save(); Kwf_Auth::getInstance()->clearIdentity(); Kwf_User_Autologin::clearCookies(); Kwf_Session::destroy(); }
public static function getSettings() { $ret = parent::getSettings(); $ret['reportMail'] = '*****@*****.**'; $ret['reportMailName'] = ''; $ret['generators']['child']['component']['success'] = 'Kwc_Posts_Detail_Report_Success_Component'; $ret['flags']['noIndex'] = true; $ret['plugins'] = array('Kwf_Component_Plugin_Login_Component'); return $ret; }
protected function _afterInsert(Kwf_Model_Row_Interface $row) { parent::_afterInsert($row); $link = $this->getData()->url . '?key=' . $row->key; $mail = new Kwf_Mail_Template($this->getData()); $mail->addTo($row->email); $mail->subject = $this->_getPlaceholder('subject'); $mail->link = 'http://' . Kwf_Registry::get('config')->server->domain . $link; $mail->send(); }
public static function getSettings() { $ret = parent::getSettings(); $ret['flags']['requestHttps'] = false; $ret['useAjaxRequest'] = false; $ret['method'] = 'get'; $ret['generators']['child']['component']['success'] = false; $ret['cssClass'] = 'unResponsive'; return $ret; }
protected function _afterInsert(Kwf_Model_Row_Interface $row) { parent::_afterInsert($row); if (isset($_SERVER['HTTP_HOST'])) { $host = $_SERVER['HTTP_HOST']; } else { $host = Kwf_Registry::get('config')->server->domain; } if (substr($host, 0, 4) == 'www.') { $host = substr($host, 4); } $fromMailAddress = $this->_getSetting('fromMailAdress'); if ($fromMailAddress) { $row->setFrom($fromMailAddress); } else { $row->setFrom("noreply@{$host}"); } $settings = $this->getData()->parent->getComponent()->getMailSettings(); $row->addTo($settings['recipient']); if ($settings['recipient_cc']) { $row->addCc($settings['recipient_cc']); } $row->setSubject(str_replace('%number%', $row->id, $settings['subject'])); $row->setCheckSpam($settings['check_spam']); $msg = ''; $formFieldComponents = self::_findFormFields($this->getData()->parent->getChildComponent('-paragraphs')); foreach ($formFieldComponents as $c) { $message = $c->getComponent()->getSubmitMessage($row); if ($message) { $msg .= $message . "\n"; } } $row->sent_mail_content_text = $msg; $this->_beforeSendMail($row); $row->sendMail(); //manuell aufrufen weils beim speichern nicht automatisch gemacht wird (da da der content nocht nicht vorhanden ist) if ($settings['send_confirm_mail']) { $c = Kwf_Component_Data_Root::getInstance()->getComponentById($settings['confirm_field_component_id']); if ($c && ($recipient = $row->{$c->getComponent()->getFormField()->getName()})) { $mail = new Kwf_Mail(); $body = $this->getData()->trlKwf('Thank you for your inquiry, it will be processed as soon as posible.'); $body .= "\n\n"; $body .= $msg; $mail->setSubject(str_replace('%number%', $row->id, $settings['confirm_subject'])); $mail->setBodyText($body); $hostNonWww = preg_replace('#^www\\.#', '', $this->getData()->getDomain()); $fromAddress = str_replace('%host%', $hostNonWww, $this->getData()->getBaseProperty('email.from.address')); $fromName = str_replace('%host%', $hostNonWww, $this->getData()->getBaseProperty('email.from.name')); $mail->setFrom($fromAddress, $fromName); $mail->addTo($recipient); $mail->send(); } } }
protected function _afterInsert(Kwf_Model_Row_Interface $row) { parent::_afterInsert($row); $pageName = Kwf_Component_Data_Root::getInstance()->getComponentByDbId($row->component_id)->getParentPage()->name; $recipient = $this->_getRecipient(); $user = $row->getParentRow('User'); if ($recipient['email']) { $tpl = new Kwf_Mail_Template($this); $tpl->data = $this->getData(); $tpl->text = $row->text; $tpl->pageName = $pageName; $tpl->user = $user; $tpl->addTo($recipient['email'], $recipient['name']); $tpl->setFrom($user->email, "{$user->firstname} {$user->lastname}"); $tpl->setSubject($this->getData()->trlKwf('Feedback to page ') . $pageName); $tpl->send(); } }
public function processInput(array $postData) { parent::processInput($postData); if (isset($postData['code'])) { $code = $postData['code']; $this->getForm()->getRow()->code = $code; } else { if (isset($postData['form_code'])) { $code = $postData['form_code']; $this->getForm()->getRow()->code = $code; } else { $code = $this->getForm()->getRow()->code; } } if (!preg_match('#^(.*)-(\\w*)$#', $code, $m)) { $this->_errors[] = array('message' => $this->_getErrorMessage(self::ERROR_DATA_NOT_COMPLETE)); $this->_hideForm = true; } else { $userId = $m[1]; $code = $m[2]; $userModel = Zend_Registry::get('userModel'); $this->_user = $userModel->getRow($userId); if (!$this->_user) { $this->_errors[] = array('message' => $this->_getErrorMessage(self::ERROR_DATA_NOT_COMPLETE)); $this->_hideForm = true; } else { if (!$this->_user->validateActivationToken($code) && $this->_user->isActivated()) { $this->_errors[] = array('message' => $this->_getErrorMessage(self::ERROR_ALREADY_ACTIVATED)); $this->_hideForm = true; } else { if (!$this->_user->validateActivationToken($code)) { $this->_errors[] = array('message' => $this->_getErrorMessage(self::ERROR_CODE_WRONG)); $this->_hideForm = true; } } } } if ($this->_user && $this->isSaved()) { $userModel->setPassword($this->_user, $this->_form->getRow()->password); $this->_user->clearActivationToken(); $this->_afterLogin(Kwf_Registry::get('userModel')->getAuthedUser()); } }
protected function _beforeInsert(Kwf_Model_Row_Interface $row) { parent::_beforeInsert($row); $addToCart = $this->getData()->parent->getComponent()->getAddToCartForm($this->getData()); $addToCart->getComponent()->_beforeInsert($row); }
public static function getSettings($param = null) { $ret = parent::getSettings($param); $ret['componentName'] = 'Kontaktformular'; return $ret; }
protected function _afterInsert(Kwf_Model_Row_Interface $row) { parent::_afterInsert($row); //if getCartOrderId was null (tough it should not happen as the cart is empty in that case and the form doesn't validate then) Kwc_Shop_Cart_Orders::setCartOrderId($row->id); }
public static function getSettings($param = null) { $ret = parent::getSettings($param); return $ret; }
public static function getSettings($param = null) { $ret = parent::getSettings($param); $ret['useAjaxRequest'] = true; return $ret; }
public function getTemplateVars(Kwf_Component_Renderer_Abstract $renderer) { $ret = parent::getTemplateVars($renderer); $ret['register'] = $this->_getRegisterComponent(); return $ret; }