69
69
if (!empty($this->data)) {
72
$this->data['Agent']['phone'] = preg_replace('/[[:punct:]]|[[:space:]]/','',$this->data['Agent']['phone']);
72
$this->data['Agent']['phone'] = preg_replace('/[[:punct:]]|[[:space:]]/','',$this->data['Agent']['phone']);
73
73
if ($this->Agent->save($this->data)) {
74
$this->Session->setFlash(__('The agent has been saved', true),'default', array('class'=>'success-message'));
75
75
$this->redirect(array('action' => 'index'));
79
79
$this->Session->setFlash(__('The agent could not be saved. Try again.', true));