Conditional Ajax for create db
This commit is contained in:
@@ -1900,6 +1900,7 @@ $(document).ready(function() {
|
|||||||
* @uses PMA_ajaxShowMessage()
|
* @uses PMA_ajaxShowMessage()
|
||||||
* @uses window.parent.refreshNavigation()
|
* @uses window.parent.refreshNavigation()
|
||||||
* @uses window.parent.refreshMain()
|
* @uses window.parent.refreshMain()
|
||||||
|
* @see $cfg['AjaxEnable']
|
||||||
*/
|
*/
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$("#drop_db_anchor").live('click', function(event) {
|
$("#drop_db_anchor").live('click', function(event) {
|
||||||
@@ -1928,10 +1929,11 @@ $(document).ready(function() {
|
|||||||
* display_create_database.lib.php is used, ie main.php and server_databases.php
|
* display_create_database.lib.php is used, ie main.php and server_databases.php
|
||||||
*
|
*
|
||||||
* @uses PMA_ajaxShowMessage()
|
* @uses PMA_ajaxShowMessage()
|
||||||
|
* @see $cfg['AjaxEnable']
|
||||||
*/
|
*/
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
|
||||||
$('#create_database_form').live('submit', function(event) {
|
$('#create_database_form.ajax').live('submit', function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
$form = $(this);
|
$form = $(this);
|
||||||
|
@@ -17,7 +17,7 @@ require_once './libraries/check_user_privileges.lib.php';
|
|||||||
if ($is_create_db_priv) {
|
if ($is_create_db_priv) {
|
||||||
// The user is allowed to create a db
|
// The user is allowed to create a db
|
||||||
?>
|
?>
|
||||||
<form method="post" action="db_create.php" id="create_database_form" ><strong>
|
<form method="post" action="db_create.php" id="create_database_form" <?php echo ($GLOBALS['cfg']['AjaxEnable'] ? 'class="ajax" ' : ''); ?>><strong>
|
||||||
<?php echo '<label for="text_create_db">' . __('Create new database') . '</label> ' . PMA_showMySQLDocu('SQL-Syntax', 'CREATE_DATABASE'); ?></strong><br />
|
<?php echo '<label for="text_create_db">' . __('Create new database') . '</label> ' . PMA_showMySQLDocu('SQL-Syntax', 'CREATE_DATABASE'); ?></strong><br />
|
||||||
<?php echo PMA_generate_common_hidden_inputs('', '', 5); ?>
|
<?php echo PMA_generate_common_hidden_inputs('', '', 5); ?>
|
||||||
<input type="hidden" name="reload" value="1" />
|
<input type="hidden" name="reload" value="1" />
|
||||||
|
Reference in New Issue
Block a user