diff --git a/htdocs/install/fileconf.php b/htdocs/install/fileconf.php index 14f1ee2a1cd..f8dcdfe230b 100644 --- a/htdocs/install/fileconf.php +++ b/htdocs/install/fileconf.php @@ -448,7 +448,10 @@ if (!empty($force_install_noedit)) { > - trans("CheckToCreateDatabase"); ?> + + trans("CheckToCreateDatabase"); ?> @@ -503,7 +507,10 @@ if (!empty($force_install_noedit)) { > - trans("CheckToCreateUser"); ?> + + trans("CheckToCreateUser"); ?> @@ -613,30 +621,13 @@ jQuery(document).ready(function() { }); - function init_needroot() - { - console.log("init_needroot force_install_noedit="); - /*alert(jQuery("#db_create_database").prop("checked")); */ - if (jQuery("#db_create_database").is(":checked") || jQuery("#db_create_user").is(":checked")) - { - jQuery(".hideroot").show(); - - jQuery(".needroot").removeAttr('disabled'); - - } - else - { - jQuery(".hideroot").hide(); - jQuery(".needroot").prop('disabled', true); - } - } - init_needroot(); jQuery("#db_create_database").click(function() { + console.log("click on db_create_database"); init_needroot(); }); jQuery("#db_create_user").click(function() { + console.log("click on db_create_user"); init_needroot(); }); @@ -644,6 +635,27 @@ jQuery(document).ready(function() { }); +function init_needroot() +{ + console.log("init_needroot force_install_noedit="); + /*alert(jQuery("#db_create_database").prop("checked")); */ + if (jQuery("#db_create_database").is(":checked") || jQuery("#db_create_user").is(":checked")) + { + console.log("init_needroot show root section"); + jQuery(".hideroot").show(); + + jQuery(".needroot").removeAttr('disabled'); + + } + else + { + console.log("init_needroot hide root section"); + jQuery(".hideroot").hide(); + jQuery(".needroot").prop('disabled', true); + } +} + function checkDatabaseName(databasename) { if (databasename.match(/[;\.]/)) { return false; } return true; @@ -651,6 +663,8 @@ function checkDatabaseName(databasename) { function jscheckparam() { + console.log("Click on jscheckparam"); + ok=true; if (document.forminstall.main_dir.value == '') @@ -688,12 +702,14 @@ function jscheckparam() { ok=false; alert('transnoentities("YouAskToCreateDatabaseSoRootRequired")); ?>'); + init_needroot(); } // If create user asked else if (document.forminstall.db_create_user.checked == true && (document.forminstall.db_user_root.value == '')) { ok=false; alert('transnoentities("YouAskToCreateDatabaseUserSoRootRequired")); ?>'); + init_needroot(); } return ok; diff --git a/htdocs/install/inc.php b/htdocs/install/inc.php index a20c3489866..657e9841100 100644 --- a/htdocs/install/inc.php +++ b/htdocs/install/inc.php @@ -530,7 +530,7 @@ function pFooter($nonext = 0, $setuplang = '', $jscheckfunction = '', $withpleas print ''; } - print ''."\n"; + print '
'."\n"; // If there is some logs in buffer to show if (isset($conf->logbuffer) && count($conf->logbuffer)) {