Commit 076320603926f9c298217e58e1e63ad64313f70b
1 parent
c6d60f4e
Exists in
master
and in
3 other branches
bugfixe redirection
Showing
2 changed files
with
12 additions
and
14 deletions
Show diff stats
src/Controller/MaterielsController.php
... | ... | @@ -1246,7 +1246,7 @@ class MaterielsController extends AppController { |
1246 | 1246 | if (! $this->isLabinventDebugMode()) { |
1247 | 1247 | $materiel = $this->Materiels->get($id); |
1248 | 1248 | if (! isset($materiel->nom_responsable) || ! isset($materiel->fournisseur) || ! isset($materiel->numero_commande) || ! isset($materiel->organisme_id) || ! isset($materiel->date_reception) || ! isset($materiel->prix_ht)) { |
1249 | - $this->Flash->error('le materiel ' . $materiel->designation . '-' . $materiel->numero_laboratoire . ' n\'a pas pu etre validé car un des champs nécessaires nest pas rempli'); | |
1249 | + $this->Flash->error('le materiel ' . $materiel->designation . '-' . $materiel->numero_laboratoire . ' n\'a pas pu etre validé car un des champs nécessaires nest pas rempli'); | |
1250 | 1250 | $nb --; |
1251 | 1251 | } else { |
1252 | 1252 | $materiel->set('status', $new); |
... | ... | @@ -1261,12 +1261,13 @@ class MaterielsController extends AppController { |
1261 | 1261 | endforeach |
1262 | 1262 | ; |
1263 | 1263 | if ($nb != 0) |
1264 | - $this->Flash->success(__($nb . ' matériel(s) mis à jour')); | |
1264 | + $this->Flash->success(__($nb . ' matériel(s) mis à jour')); | |
1265 | 1265 | $this->myDebug("Nb matos = " . $nb); |
1266 | - | |
1266 | + | |
1267 | 1267 | if (! $this->isLabinventDebugMode()) |
1268 | 1268 | return $this->redirect([ |
1269 | 1269 | 'action' => 'index', |
1270 | + 'page' => $this->request->query('page'), | |
1270 | 1271 | $what |
1271 | 1272 | ]); |
1272 | 1273 | } |
... | ... |
src/Template/Materiels/index.ctp
... | ... | @@ -9,7 +9,7 @@ use Cake\ORM\TableRegistry; |
9 | 9 | <?php echo '<h2><i class="icon-list"></i> Liste des matériels ('.$nbMateriels.')</h2>'; ?> |
10 | 10 | |
11 | 11 | <div class="actions" style="width: 100%; float: none; padding: 0 0; "> |
12 | -<?php | |
12 | +<?php | |
13 | 13 | echo '<p>'; |
14 | 14 | echo $this->Html->link ( '<i class="icon-plus"></i> Nouveau Matériel', |
15 | 15 | [ |
... | ... | @@ -87,7 +87,7 @@ if (isset ( $STATUS )) { |
87 | 87 | if (isset ( $STATUS ) && $nbMateriels != 0) { |
88 | 88 | echo $this->Html->link ( '<i class="icon-check"></i> Tout cocher', '#all', [ |
89 | 89 | 'onclick' => 'selectAll()', |
90 | - 'title' => 'Sélectionner tous les matériels', | |
90 | + 'title' => 'Sélectionner tout les matériels', | |
91 | 91 | 'style' => ': 400px; margin-right: 50px', |
92 | 92 | 'escape' => false |
93 | 93 | ]); |
... | ... | @@ -100,17 +100,14 @@ if (isset ( $STATUS )) { |
100 | 100 | } |
101 | 101 | } |
102 | 102 | ?> |
103 | -</div> | |
104 | -<?php | |
105 | - echo $this->Form->create('materiels', ['url' => '/materiels/execActions']); | |
106 | - echo $this->Form->input('aff_par_defaut', [ | |
107 | - 'label' => 'Afficher', | |
108 | - 'options' => ['20'=> 20, '30'=>30, '50'=>50, '100'=>100, '150'=>150, '200'=>200], | |
109 | - ]); | |
110 | - ///$this->Form->end(); | |
111 | -?> | |
103 | +</div> | |
112 | 104 | |
113 | 105 | <?php |
106 | +echo $this->Form->create('materiels', ['url' => '/materiels/execActions?page='.$this->request->query('page')]); | |
107 | +echo $this->Form->input('aff_par_defaut', [ | |
108 | + 'label' => 'Afficher', | |
109 | + 'options' => ['20'=> 20, '30'=>30, '50'=>50, '100'=>100, '150'=>150, '200'=>200], | |
110 | +]); | |
114 | 111 | if ($nbMateriels > 0) { |
115 | 112 | //$form2 = $this->Form; |
116 | 113 | ///echo $this->Form->create('materiels', ['url' => '/materiels/execActions']); |
... | ... |