neue emailtexte ferttig!

This commit is contained in:
Martin Müller 2014-05-05 18:27:29 +02:00
parent 4a208c96f9
commit 3fe6d902e7
3 changed files with 11 additions and 11 deletions

View File

@ -5,7 +5,7 @@ class MiconwareSessionComponent extends Component {
public $components = array('Session'); public $components = array('Session');
public $self_worker_obj; public $self_worker_obj;
public $self_company_obj; public $self_company_obj;
public static $strip_tags='<b><i><br><ol><ul><li><h1><h2><h3><h4><h5><h6><blockquote><u><img><a><span><div><pre><code>';
public function init($controller){ public function init($controller){
$controller->Security->requireSecure(); $controller->Security->requireSecure();
$this->User = ClassRegistry::init('User'); $this->User = ClassRegistry::init('User');
@ -20,7 +20,7 @@ class MiconwareSessionComponent extends Component {
} }
$controller->set("isStaff",$this->isStaff()); $controller->set("isStaff",$this->isStaff());
$controller->set("MEDIA",'/uploads'); $controller->set("MEDIA",'/uploads');
$controller->set("strip_tags",'<b><i><br><ol><ul><li><h1><h2><h3><h4><h5><h6><blockquote><u><img><a><span><div><pre><code>'); $controller->set("strip_tags",self::$strip_tags);
$controller->set('default_sForm',array( $controller->set('default_sForm',array(
'inputDefaults' => array( 'inputDefaults' => array(
'div' => array('class' => 'control-group'), 'div' => array('class' => 'control-group'),

View File

@ -113,10 +113,10 @@ class HomeController extends AppController {
if($this->request->is('post')){ if($this->request->is('post')){
$Email = new CakeEmail('dreamjobMain'); $Email = new CakeEmail('dreamjobMain');
$Email->to('service@dream-job.eu'); $Email->to('service@dream-job.eu');
//$Email->from(array($this->request->data['mail']['adresse'] => $this->request->data['mail']['first_name'].' '.$this->request->data['mail']['last_name'])); $Email->from(array($this->request->data['mail']['adresse'] => $this->request->data['mail']['first_name'].' '.$this->request->data['mail']['last_name']));
$Email->subject('[Dreamjob-Kontakt-Firma]'.$this->request->data['mail']['subject']); $Email->subject('[Dreamjob-Kontakt-Firma]'.$this->request->data['mail']['subject']);
$Email->template('contact'); $Email->template('contact');
$Email->viewVars(array('text'=>$this->request->data)); $Email->viewVars(array('text'=>$this->request->data,'strip_tags'=>$this->MiconwareSession->strip_tags));
if($Email->send()) if($Email->send())
$this->MiconwareSession->setFlash(__('dreamjob.contactSend'),'flash',array('alert'=>'success')); $this->MiconwareSession->setFlash(__('dreamjob.contactSend'),'flash',array('alert'=>'success'));
else else

View File

@ -1,10 +1,10 @@
<?=$text['mail']['adresse'];?>\n <?=$text['mail']['adresse'];?>
<?=$text['mail']['last_name'].', '.$text['mail']['first_name'];?>\n <?=$text['mail']['last_name'].', '.$text['mail']['first_name'];?>
\n
\n
<?=$text['mail']['subject'];?>\n <?=$text['mail']['subject'];?>
\n
\n
<?php <?php
$Document = strip_tags($text['mail']['text'],$strip_tags); $Document = strip_tags($text['mail']['text'],$strip_tags);