From 7de45a8e4b595856de2f0af78b13e4d2efc5e716 Mon Sep 17 00:00:00 2001 From: Ludovic Pouzenc Date: Thu, 19 Jul 2018 00:24:15 +0200 Subject: Date picker in DD/MM/YYYY order --- app-from-scratch.sh | 7 +++++++ fai_gestion/src/View/AppView.php | 25 +++++++++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/app-from-scratch.sh b/app-from-scratch.sh index 7d06a85..bbd0352 100644 --- a/app-from-scratch.sh +++ b/app-from-scratch.sh @@ -281,3 +281,10 @@ git commit -m "bake: Add configurability, generate less actions" editor $p/Controller/controller.twig $p/Model/entity.twig $p/Model/table.twig $p/Template/index.twig $p/Template/view.twig git add $p/Controller/controller.twig $p/Model/entity.twig $p/Model/table.twig $p/Template/index.twig $p/Template/view.twig git commit -m "Add Copyright & GPL3+ notice to Templates" +# 9a73d523ebd6035fac8deaa347ce41e4eda13232 + +# Date picker in DD/MM/YYYY order +editor src/View/AppView.php +git add ../app-from-scratch.sh src/View/AppView.php +git commit -m "Date picker in DD/MM/YYYY order" + diff --git a/fai_gestion/src/View/AppView.php b/fai_gestion/src/View/AppView.php index 7b92ebf..a1baf19 100644 --- a/fai_gestion/src/View/AppView.php +++ b/fai_gestion/src/View/AppView.php @@ -1,5 +1,26 @@ + * Copyright 2016 Nicolas Goaziou + * + * This file is part of FAI Gestion forked from CHD Gestion. + * + * FAI Gestion is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * FAI Gestion is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with FAI Gestion. If not, see . + * + * Derived work from CakePHP(tm) : +**/ +/** * CakePHP(tm) : Rapid Development Framework (https://cakephp.org) * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) * @@ -36,5 +57,9 @@ class AppView extends View */ public function initialize() { + parent::initialize(); + if ($this->request->action === 'add' || $this->request->action === 'edit') { + $this->loadHelper('Form', ['templates'=> ['dateWidget' => '{{day}}{{month}}{{year}}']]); + } } } -- cgit v1.1