Info controller add method
This commit is contained in:
src
@ -50,10 +50,14 @@ class InfosController extends AppController
|
||||
*
|
||||
* @return void Redirects on successful add, renders view otherwise.
|
||||
*/
|
||||
public function add()
|
||||
public function add($crisis_id)
|
||||
{
|
||||
$user_id = $this->Auth->user()['id'];
|
||||
$info = $this->Infos->newEntity();
|
||||
if ($this->request->is('post')) {
|
||||
if ($this->request->is('post'))
|
||||
{
|
||||
$info->crisis_id = $crisis_id;
|
||||
$info->user_id = $user_id;
|
||||
$info = $this->Infos->patchEntity($info, $this->request->data);
|
||||
if ($this->Infos->save($info)) {
|
||||
$this->Flash->success(__('L\'Information a bien été enregistrée.'));
|
||||
|
@ -115,12 +115,10 @@
|
||||
<?= $this->Html->script("foundation/foundation.js") ?>
|
||||
<?= $this->Html->script("foundation/foundation.alert.js") ?>
|
||||
<?= $this->Html->script("foundation/foundation.topbar.js") ?>
|
||||
<<<<<<< HEAD
|
||||
|
||||
<!--<script src="//cdn.tinymce.com/4/tinymce.min.js"></script>
|
||||
<script>tinymce.init({ selector:'textarea' });</script>-->
|
||||
=======
|
||||
|
||||
>>>>>>> 2b605011828f0c48b089640254e57e75b5330786
|
||||
<!-- Own script -->
|
||||
<!-- Topbar -->
|
||||
<?= $this->Html->script('foundation/foundation.offcanvas.js') ?>
|
||||
|
Reference in New Issue
Block a user