~mparic/+junk/openauctionlive

« back to all changes in this revision

Viewing changes to app/controllers/item_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:
20
20
                if (!empty($this->data)) {
21
21
                        $this->ItemType->create();
22
22
                        if ($this->ItemType->save($this->data)) {
23
 
                                $this->Session->setFlash(__('The item type has been saved', true));
 
23
                                $this->Session->setFlash(__('The item type has been saved', true),'default', array('class'=>'success-message'));
24
24
                                $this->redirect(array('action' => 'index'));
25
25
                        } else {
26
26
                                $this->Session->setFlash(__('The item type could not be saved. Please, try again.', true));
35
35
                }
36
36
                if (!empty($this->data)) {
37
37
                        if ($this->ItemType->save($this->data)) {
38
 
                                $this->Session->setFlash(__('The item type has been saved', true));
 
38
                                $this->Session->setFlash(__('The item type has been saved', true),'default', array('class'=>'success-message'));
39
39
                                $this->redirect(array('action' => 'index'));
40
40
                        } else {
41
41
                                $this->Session->setFlash(__('The item type could not be saved. Please, try again.', true));
53
53
                        $this->redirect(array('action'=>'index'));
54
54
                }
55
55
                if ($this->ItemType->delete($id)) {
56
 
                        $this->Session->setFlash(__('Item type deleted', true));
 
56
                        $this->Session->setFlash(__('Item type deleted', true),'default', array('class'=>'success-message'));
57
57
                        $this->redirect(array('action'=>'index'));
58
58
                }
59
59
                $this->Session->setFlash(__('Item type was not deleted', true));