From f06c9b2b67db15bbaa5be87a168b17f626bf70fe Mon Sep 17 00:00:00 2001 From: Patrick Barroca <pbarroca@sandbox.pergame.net> Date: Fri, 8 Jan 2016 16:40:43 +0100 Subject: [PATCH] rel #33379: red star on required inputs labels --- library/ZendAfi/Form/Admin/Formation.php | 4 ++-- library/ZendAfi/Form/Admin/SessionFormation.php | 10 +++++----- library/ZendAfi/Form/Admin/UserGroup.php | 2 +- library/ZendAfi/Form/Album.php | 2 +- library/ZendAfi/Form/Album/Ressource.php | 5 +++-- library/ZendAfi/Form/FRBR/Link.php | 6 +++--- library/ZendAfi/Form/FRBR/LinkType.php | 10 +++++----- public/admin/css/global.css | 8 ++++++-- 8 files changed, 26 insertions(+), 21 deletions(-) diff --git a/library/ZendAfi/Form/Admin/Formation.php b/library/ZendAfi/Form/Admin/Formation.php index 2788ac71424..82de178deee 100644 --- a/library/ZendAfi/Form/Admin/Formation.php +++ b/library/ZendAfi/Form/Admin/Formation.php @@ -16,7 +16,7 @@ * * You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE * along with BOKEH; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ @@ -27,7 +27,7 @@ class ZendAfi_Form_Admin_Formation extends ZendAfi_Form { $this ->setAttrib('id', 'formationform') ->addRequiredTextNamed('libelle') - ->setLabel('Libellé *'); + ->setLabel('Libellé'); $this ->addElement('ckeditor', diff --git a/library/ZendAfi/Form/Admin/SessionFormation.php b/library/ZendAfi/Form/Admin/SessionFormation.php index bf0dbfa6bbb..7aebd5914a3 100644 --- a/library/ZendAfi/Form/Admin/SessionFormation.php +++ b/library/ZendAfi/Form/Admin/SessionFormation.php @@ -36,7 +36,7 @@ class ZendAfi_Form_Admin_SessionFormation extends ZendAfi_Form { ->setAttrib('id', 'sessionForm') ->setMethod('post') ->addElement('datePicker', 'date_debut', array( - 'label' => 'Date début *', + 'label' => 'Date début', 'size' => 10, 'required' => true, 'allowEmpty' => false )) @@ -44,19 +44,19 @@ class ZendAfi_Form_Admin_SessionFormation extends ZendAfi_Form { 'label' => 'Date fin', 'size' => 10 )) ->addElement('datePicker', 'date_limite_inscription', array( - 'label' => 'Date limite d\'inscription *', + 'label' => 'Date limite d\'inscription', 'size' => 10, 'required' => true, 'allowEmpty' => false)) ->addElement('text', 'effectif_min', array( - 'label' => 'Effectif minimum *', + 'label' => 'Effectif minimum', 'size' => 2, 'required' => true, 'allowEmpty' => false, 'validators' => array('int'))) ->addElement('text', 'effectif_max', array( - 'label' => 'Effectif maximum *', + 'label' => 'Effectif maximum', 'size' => 2, 'required' => true, 'allowEmpty' => false, @@ -67,7 +67,7 @@ class ZendAfi_Form_Admin_SessionFormation extends ZendAfi_Form { 'validators' => array('int'))) ->addElement('text', 'horaires', array( - 'label' => 'Horaires *', + 'label' => 'Horaires', 'size' => 50, 'required' => true, 'allowEmpty' => false)) diff --git a/library/ZendAfi/Form/Admin/UserGroup.php b/library/ZendAfi/Form/Admin/UserGroup.php index c62e231e73b..aff54cf68f8 100644 --- a/library/ZendAfi/Form/Admin/UserGroup.php +++ b/library/ZendAfi/Form/Admin/UserGroup.php @@ -27,7 +27,7 @@ class ZendAfi_Form_Admin_UserGroup extends ZendAfi_Form { $this ->setAttrib('id', 'usergroupform') ->addRequiredTextNamed('libelle') - ->setLabel('Libellé *'); + ->setLabel('Libellé'); $this ->addElement('radio', diff --git a/library/ZendAfi/Form/Album.php b/library/ZendAfi/Form/Album.php index 6c2a2432b3f..6e83ade7dc5 100644 --- a/library/ZendAfi/Form/Album.php +++ b/library/ZendAfi/Form/Album.php @@ -133,7 +133,7 @@ class ZendAfi_Form_Album extends ZendAfi_Form { $this ->setAttrib('id', 'album') ->setAttrib('enctype', self::ENCTYPE_MULTIPART) - ->addElement('text', 'titre', ['label' => $this->_('Titre *'), + ->addElement('text', 'titre', ['label' => $this->_('Titre'), 'style' => 'width:440px;', 'size' => 75, 'required' => true, diff --git a/library/ZendAfi/Form/Album/Ressource.php b/library/ZendAfi/Form/Album/Ressource.php index e3492794629..bae86e718e3 100644 --- a/library/ZendAfi/Form/Album/Ressource.php +++ b/library/ZendAfi/Form/Album/Ressource.php @@ -77,7 +77,7 @@ class ZendAfi_Form_Album_Ressource extends ZendAfi_Form { 3 => $this->_('Média en ligne')], 'value' => 1]) - ->addElement('url', 'url', ['label' => $this->_('Url *'), 'size' => '80']) + ->addElement('url', 'url', ['label' => $this->_('Url'), 'size' => '80','required' => true]) ->addElement('url', 'link_to', ['label' => $this->_('Lien vers'), 'size' => '80']) @@ -129,7 +129,8 @@ class ZendAfi_Form_Album_Ressource extends ZendAfi_Form { */ public function addFileFor($model) { $element = new ZendAfi_Form_Element_Image('fichier', - ['label' => $this->_('Fichier *')]); + ['label' => $this->_('Fichier'), + 'required' => true]); if ($model) { $element ->setBasePath($model->getOriginalsPath()) diff --git a/library/ZendAfi/Form/FRBR/Link.php b/library/ZendAfi/Form/FRBR/Link.php index 69f1b294e9f..6115dfaace8 100644 --- a/library/ZendAfi/Form/FRBR/Link.php +++ b/library/ZendAfi/Form/FRBR/Link.php @@ -26,9 +26,9 @@ class ZendAfi_Form_FRBR_Link extends ZendAfi_Form { ->setAttrib('id', 'frbr_link') ->setAttrib('class', 'zend_form') - ->addElement('frbrType', 'type_id', ['label' => $this->_('Type').' *']) - ->addElement('text', 'source', ['label' => $this->_('URL Objet A') . ' *', 'size' => 80]) - ->addElement('text', 'target', ['label' => $this->_('URL Objet B') . ' *', 'size' => 80]) + ->addElement('frbrType', 'type_id', ['label' => $this->_('Type'), 'required' => true]) + ->addElement('text', 'source', ['label' => $this->_('URL Objet A') ,'required' => true, 'size' => 80]) + ->addElement('text', 'target', ['label' => $this->_('URL Objet B') ,'required' => true, 'size' => 80]) ->addDisplayGroup(['type_id', 'source', 'target'], 'link', ['legend' => '']); } diff --git a/library/ZendAfi/Form/FRBR/LinkType.php b/library/ZendAfi/Form/FRBR/LinkType.php index fa646241685..5ac3cb83f93 100644 --- a/library/ZendAfi/Form/FRBR/LinkType.php +++ b/library/ZendAfi/Form/FRBR/LinkType.php @@ -26,11 +26,11 @@ class ZendAfi_Form_FRBR_LinkType extends ZendAfi_Form { ->setAttrib('id', 'frbr_linktype') ->setAttrib('class', 'zend_form') - ->addElement('text', 'libelle', ['label' => $this->_('Nom').' *', 'size' => 80]) - ->addElement('text', 'from_source', ['label' => $this->_('Libellé de l\'objet A vers l\'objet B') . ' *', - 'size' => 80]) - ->addElement('text', 'from_target', ['label' => $this->_('Libellé de l\'objet B vers l\'objet A') . ' *', - 'size' => 80]) + ->addElement('text', 'libelle', ['label' => $this->_('Nom'), 'size' => 80, 'required' => true]) + ->addElement('text', 'from_source', ['label' => $this->_('Libellé de l\'objet A vers l\'objet B') , + 'size' => 80, 'required' => true]) + ->addElement('text', 'from_target', ['label' => $this->_('Libellé de l\'objet B vers l\'objet A') , + 'size' => 80, 'required' => true]) ->addDisplayGroup(['libelle', 'from_source', 'from_target'], 'linktype', ['legend' => '']); } diff --git a/public/admin/css/global.css b/public/admin/css/global.css index c584060c27a..e606c3fdd79 100644 --- a/public/admin/css/global.css +++ b/public/admin/css/global.css @@ -10,8 +10,6 @@ a, .menuAdmin li { } - - /* Menu Gauche */ .menuGaucheAdmin{background-color:#FFFFFF;border:1px solid #B0BEC7;width:95%;border-radius: 5px; -moz-border-radius: 5px; margin-bottom: 10px} .menuGaucheAdmin table {border:none; width: 100%; border-radius: 5px; border-collapse: collapse} @@ -72,6 +70,12 @@ li.selected {font-weight: bold;} } /* Form */ + +.required:after { + content:" *"; + color: red; +} + .form { background-color:#F0F0F0; border:1px solid #C8C8C8; -- GitLab