Commit b845e76d authored by Jean-Philippe Metivier's avatar Jean-Philippe Metivier
Browse files

Bug bizarre sur les dates

parent 690405ea
Loading
Loading
Loading
Loading
+3 −0
Changes for module/Application/src/Application/Form/EntretienProfessionnelCampagne/EntretienProfessionnelCampagneForm.php: 3 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -50,6 +50,8 @@ class EntretienProfessionnelCampagneForm extends Form
                'label_attributes' => [
                    'class' => 'control-label',
                ],
                'format' => 'd/m/Y'

            ],
            'attributes' => [
                'id'                => 'date_debut',
@@ -64,6 +66,7 @@ class EntretienProfessionnelCampagneForm extends Form
                'label_attributes' => [
                    'class' => 'control-label',
                ],
                'format' => 'd/m/Y'
            ],
            'attributes' => [
                'id'                => 'date_fin',
+2 −2
Changes for module/Application/src/Application/Form/EntretienProfessionnelCampagne/EntretienProfessionnelCampagneHydrator.php: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -33,8 +33,8 @@ class EntretienProfessionnelCampagneHydrator implements HydratorInterface {
    public function hydrate(array $data, $object)
    {
        $annee = (isset($data['annee']))?$data['annee']:null;
        $date_debut = (isset($data['date_debut']))? DateTime::createFromFormat('Y-m-d H:i:s',$data['date_debut'].' 08:00:00'):null;
        $date_fin   = (isset($data['date_fin']))?   DateTime::createFromFormat('Y-m-d H:i:s',$data['date_fin']. ' 20:00:00'):null;
        $date_debut = (isset($data['date_debut']))? DateTime::createFromFormat('d/m/Y H:i:s',$data['date_debut'].' 08:00:00'):null;
        $date_fin   = (isset($data['date_fin']))?   DateTime::createFromFormat('d/m/Y H:i:s',$data['date_fin']. ' 20:00:00'):null;
        $precede = (isset($data['precede']) AND $data['precede'] !== '')?$this->getEntretienProfessionnelCampagneService()->getEntretienProfessionnelCampagne($data['precede']):null;

        $object->setAnnee($annee);
+20 −2
Changes for public/unicaen/app/js/unicaen.js: 20 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -241,7 +241,7 @@ IntraNavigator = {
     */
    run: function ()
    {
        var submitSelector = '.intranavigator form:not(.no-intranavigation form)';
        var submitSelector = '.intranavigator form:not(.no-intranavigation)';
        var clickSelector = '.intranavigator a:not(.pop-ajax):not(.ajax-modal):not(.no-intranavigation):not(.no-intranavigation a)';

        /* TODO: trouver une meilleure solution que d'utiliser la classe CSS "no-intranavigation" pour désactiver l'intra-navigation ?*/
@@ -855,16 +855,34 @@ $.widget("unicaen.tabAjax", {
        return this;
    },

    _create: function ()
    getContent: function(tab)
    {
        var that = this;

        tab = this.getTab(tab);
        tid = tab.attr('data-target');
        return that.element.find(".tab-pane" + tid).html();
    },

    getSelected: function()
    {
        var sel = this.element.find('.tab-pane.active').attr('id');

        return sel;
    },

    _create: function ()
    {
        var that = this;
        this.element.find('.nav-tabs a').on('click', function (e)
        {
            e.preventDefault();
            that.select($(this));
            return false;
        });
        if (!that.getContent(that.getSelected())){
            that.select(that.getSelected());
        }
    },

});