~mparic/+junk/openauctionlive

« back to all changes in this revision

Viewing changes to app/controllers/sponsors_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:
22
22
                  $this->data['Sponsor']['event_id'] = $this->Session->read('event_id');
23
23
                        $this->Sponsor->create();
24
24
                        if ($this->Sponsor->save($this->data)) {
25
 
                                $this->Session->setFlash(__('The sponsor has been saved', true));
 
25
                                $this->Session->setFlash(__('The sponsor has been saved', true),'default', array('class'=>'success-message'));
26
26
                                $this->redirect(array('action' => 'index'));
27
27
                        } else {
28
28
                                $this->Session->setFlash(__('The sponsor could not be saved. Please, try again.', true));
40
40
                }
41
41
                if (!empty($this->data)) {
42
42
                        if ($this->Sponsor->save($this->data)) {
43
 
                                $this->Session->setFlash(__('The sponsor has been saved', true));
 
43
                                $this->Session->setFlash(__('The sponsor has been saved', true),'default', array('class'=>'success-message'));
44
44
                                $this->redirect(array('action' => 'index'));
45
45
                        } else {
46
46
                                $this->Session->setFlash(__('The sponsor could not be saved. Please, try again.', true));
60
60
                        $this->redirect(array('action'=>'index'));
61
61
                }
62
62
                if ($this->Sponsor->delete($id)) {
63
 
                        $this->Session->setFlash(__('Sponsor deleted', true));
 
63
                        $this->Session->setFlash(__('Sponsor deleted', true),'default', array('class'=>'success-message'));
64
64
                        $this->redirect(array('action'=>'index'));
65
65
                }
66
66
                $this->Session->setFlash(__('Sponsor was not deleted', true));