~mparic/+junk/openauctionlive

« back to all changes in this revision

Viewing changes to app/controllers/event_types_controller.php

  • Committer: Michael Paric
  • Date: 2012-01-07 20:21:14 UTC
  • Revision ID: mparic@compbizsolutions.com-20120107202114-6q89jiel6y3rbwgc
Updated validation rules to prevent duplicate Bid and Bidder entries; updated return message color for successful form entry to differentiate from error; added simlink in img/ for image to be used in reports - just change what auction_logo.jpg points to instead of changing View code.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
                if (!empty($this->data)) {
24
24
                        $this->EventType->create();
25
25
                        if ($this->EventType->save($this->data)) {
26
 
                                $this->Session->setFlash(__('The event type has been saved', true));
 
26
                                $this->Session->setFlash(__('The event type has been saved', true),'default', array('class'=>'success-message'));
27
27
                                $this->redirect(array('action' => 'index'));
28
28
                        } else {
29
29
                                $this->Session->setFlash(__('The event type could not be saved. Please, try again.', true));
39
39
                }
40
40
                if (!empty($this->data)) {
41
41
                        if ($this->EventType->save($this->data)) {
42
 
                                $this->Session->setFlash(__('The event type has been saved', true));
 
42
                                $this->Session->setFlash(__('The event type has been saved', true),'default', array('class'=>'success-message'));
43
43
                                $this->redirect(array('action' => 'index'));
44
44
                        } else {
45
45
                                $this->Session->setFlash(__('The event type could not be saved. Please, try again.', true));
57
57
                        $this->redirect(array('action'=>'index'));
58
58
                }
59
59
                if ($this->EventType->delete($id)) {
60
 
                        $this->Session->setFlash(__('Event type deleted', true));
 
60
                        $this->Session->setFlash(__('Event type deleted', true),'default', array('class'=>'success-message'));
61
61
                        $this->redirect(array('action'=>'index'));
62
62
                }
63
63
                $this->Session->setFlash(__('Event type was not deleted', true));