Overview
Comment:Fix champs date dans l'import de membre [19d400cafc23eb2fe585bdd8e4f76c6d280ebe81]
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | stable
Files: files | file ages | folders
SHA1: 96ef8a00ab428a4505cb8bb45b44505412e4e233
User & Date: bohwaz on 2020-05-18 13:51:59
Other Links: manifest | tags
Context
2020-05-22
00:01
Fix: date de cotisation dans la liste check-in: 95f78a6662 user: bohwaz tags: trunk, stable
2020-05-18
13:51
Fix champs date dans l'import de membre [19d400cafc23eb2fe585bdd8e4f76c6d280ebe81] check-in: 96ef8a00ab user: bohwaz tags: trunk, stable
2020-05-04
00:56
Corriger pour que les calendrier puissent s'afficher dans les tableaux check-in: baf65bcbf7 user: bohwaz tags: trunk, stable
Changes

Modified src/include/lib/Garradin/Membres.php from [c6e8b8584f] to [e1601c51c0].

45
46
47
48
49
50
51





52
53
54
55
56
57
58

            if (isset($data[$key]))
            {
                if ($config->type == 'datetime' && trim($data[$key]) !== '')
                {
                    $dt = new \DateTime($data[$key]);
                    $data[$key] = $dt->format('Y-m-d H:i');





                }
                elseif ($config->type == 'tel')
                {
                    $data[$key] = Utils::normalizePhoneNumber($data[$key]);
                }
                elseif ($config->type == 'country')
                {







>
>
>
>
>







45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63

            if (isset($data[$key]))
            {
                if ($config->type == 'datetime' && trim($data[$key]) !== '')
                {
                    $dt = new \DateTime($data[$key]);
                    $data[$key] = $dt->format('Y-m-d H:i');
                }
                elseif ($config->type == 'date' && trim($data[$key]) !== '')
                {
                    $dt = new \DateTime($data[$key]);
                    $data[$key] = $dt->format('Y-m-d');
                }
                elseif ($config->type == 'tel')
                {
                    $data[$key] = Utils::normalizePhoneNumber($data[$key]);
                }
                elseif ($config->type == 'country')
                {