Commit e905b644235259feafad1bfd873c3d712854658e
1 parent
6422375e
Exists in
master
and in
3 other branches
bugfix le toggle de la section ldap-authentified
Showing
7 changed files
with
24 additions
and
15 deletions
Show diff stats
README.md
... | ... | @@ -54,7 +54,7 @@ Logiciel testé et validé sur les configurations suivantes : |
54 | 54 | VERSION ACTUELLE |
55 | 55 | |
56 | 56 | Date: 10/01/2019 |
57 | -Version: 2.9.1.8 | |
57 | +Version: 2.9.1.9 | |
58 | 58 | Author: EP |
59 | 59 | Ajout du mode ldap authentifié : |
60 | 60 | - Attention, modif de la BD, il faut executer le script db-update-2019-01-09.sh ("-CRAL.sh" pour le CRAL) | ... | ... |
database/update/db-update-2019-01-09-CRAL.sh
... | ... | @@ -30,9 +30,9 @@ cp -p ./script_sql/$myname.sql ./script_sql/$myname-build.sql |
30 | 30 | sed -e "s/database/$database/" -i ./script_sql/$myname-build.sql |
31 | 31 | mysql --user=$username --password=$password -h $host < ./script_sql/$myname-build.sql |
32 | 32 | |
33 | -# Delete cakephp cache | |
34 | -sudo rm ../../tmp/cache/models/* | |
35 | -sudo rm ../../tmp/cache/persistent/* | |
33 | +# Delete cakephp cache (-f avoids warning if no file) | |
34 | +sudo rm -f ../../tmp/cache/models/* | |
35 | +sudo rm -f ../../tmp/cache/persistent/* | |
36 | 36 | |
37 | 37 | # Faire ca aussi si ca suffit pas... |
38 | 38 | #sudo chmod -R 777 ../../tmp | ... | ... |
database/update/db-update-2019-01-09.sh
... | ... | @@ -30,9 +30,9 @@ cp -p ./script_sql/$myname.sql ./script_sql/$myname-build.sql |
30 | 30 | sed -e "s/database/$database/" -i ./script_sql/$myname-build.sql |
31 | 31 | mysql --user=$username --password=$password -h $host < ./script_sql/$myname-build.sql |
32 | 32 | |
33 | -# Delete cakephp cache | |
34 | -sudo rm ../../tmp/cache/models/* | |
35 | -sudo rm ../../tmp/cache/persistent/* | |
33 | +# Delete cakephp cache (-f avoids warning if no file) | |
34 | +sudo rm -f ../../tmp/cache/models/* | |
35 | +sudo rm -f ../../tmp/cache/persistent/* | |
36 | 36 | |
37 | 37 | # Faire ca aussi si ca suffit pas... |
38 | 38 | #sudo chmod -R 777 ../../tmp | ... | ... |
database/update/db-update-2019-01-10-IRAP.sh renamed to database/update/db-update-2019-01-10-IRAP-TEST-only.sh
... | ... | @@ -30,9 +30,9 @@ cp -p ./script_sql/$myname.sql ./script_sql/$myname-build.sql |
30 | 30 | sed -e "s/database/$database/" -i ./script_sql/$myname-build.sql |
31 | 31 | mysql --user=$username --password=$password -h $host < ./script_sql/$myname-build.sql |
32 | 32 | |
33 | -# Delete cakephp cache | |
34 | -sudo rm ../../tmp/cache/models/* | |
35 | -sudo rm ../../tmp/cache/persistent/* | |
33 | +# Delete cakephp cache (-f avoids warning if no file) | |
34 | +sudo rm -f ../../tmp/cache/models/* | |
35 | +sudo rm -f ../../tmp/cache/persistent/* | |
36 | 36 | |
37 | 37 | # Faire ca aussi si ca suffit pas... |
38 | 38 | #sudo chmod -R 777 ../../tmp | ... | ... |
database/update/script_sql/db-update-2019-01-10-IRAP.sql renamed to database/update/script_sql/db-update-2019-01-10-IRAP-TEST-only.sql
1 | 1 | use database; |
2 | 2 | |
3 | -ALTER TABLE `configurations` CHANGE `anonymous_ldap` `ldap_authentified` BOOLEAN NOT NULL DEFAULT FALSE AFTER `ldap_filter`; | |
3 | +ALTER TABLE `configurations` CHANGE `ldap_anonymous` `ldap_authentified` BOOLEAN NOT NULL DEFAULT FALSE AFTER `ldap_filter`; | |
4 | 4 | update configurations set ldap_authentified = FALSE; | ... | ... |
src/Template/Configurations/edit.ctp
... | ... | @@ -161,9 +161,11 @@ |
161 | 161 | /*MCM*/ |
162 | 162 | // start LDAP auth subsection (DIV) |
163 | 163 | echo $this->Form->input('ldap_authentified', [ |
164 | + //'id' => 'ldap-authentified', | |
164 | 165 | 'label' => 'LDAP authentifié (non anonyme)', |
165 | - 'onchange' => 'display_ldap_auth();' | |
166 | - ]); | |
166 | + //'onchange' => 'display_ldap_auth();' | |
167 | + 'onchange' => 'toggle_ldap_auth();' | |
168 | + ]); | |
167 | 169 | echo '<div id="ldap_auth" style="border-top: 1px solid #CCC; border-bottom: 1px solid #CCC; margin-bottom: 0; background: #EEE; ' . $disp . '">'; |
168 | 170 | echo $this->Form->input('ldap_bindDn', [ |
169 | 171 | 'label' => 'Bind du LDAP' | ... | ... |
webroot/js/script.js
... | ... | @@ -104,9 +104,16 @@ function emprunt_interne_externe() { |
104 | 104 | |
105 | 105 | function display_ldap() { |
106 | 106 | $('#ldap').toggle(); |
107 | + toggle_ldap_auth(); | |
107 | 108 | } |
108 | -function display_ldap_auth() { | |
109 | - $('#ldap_auth').toggle(); | |
109 | +function toggle_ldap_auth() { | |
110 | + //$('#ldap_auth').toggle(); | |
111 | + document.getElementById("ldap_auth").style.display = document.getElementById("ldap-authentified").checked ? "block":"none"; | |
112 | + /* | |
113 | + var ldap_auth_div = document.getElementById("ldap_auth"); | |
114 | + var ldap_auth_checkbox = document.getElementById("ldap-authentified"); | |
115 | + ldap_auth_div.style.display = ldap_auth_checkbox.checked ? "block":"none"; | |
116 | + */ | |
110 | 117 | } |
111 | 118 | |
112 | 119 | function selectAll() { | ... | ... |