mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-16 19:40:44 +01:00
Fix #633
This commit is contained in:
parent
b2ff819ce8
commit
8bc57a533f
@ -395,6 +395,8 @@ function submitAjax(form, data, callback, errorCallback) {
|
|||||||
data.id_plugin = data.id_plugin ? data.id_plugin : globals.id_plugin;
|
data.id_plugin = data.id_plugin ? data.id_plugin : globals.id_plugin;
|
||||||
data.ajax = 1;
|
data.ajax = 1;
|
||||||
|
|
||||||
|
prepareForm(form);
|
||||||
|
|
||||||
// Invio dei dati
|
// Invio dei dati
|
||||||
$(form).ajaxSubmit({
|
$(form).ajaxSubmit({
|
||||||
url: globals.rootdir + "/actions.php",
|
url: globals.rootdir + "/actions.php",
|
||||||
@ -425,6 +427,21 @@ function submitAjax(form, data, callback, errorCallback) {
|
|||||||
return valid;
|
return valid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function prepareForm(form) {
|
||||||
|
$(form).find('input:disabled, select:disabled').prop('disabled', false);
|
||||||
|
|
||||||
|
var hash = window.location.hash;
|
||||||
|
if (hash) {
|
||||||
|
var input = $('<input/>', {
|
||||||
|
type: 'hidden',
|
||||||
|
name: 'hash',
|
||||||
|
value: hash,
|
||||||
|
});
|
||||||
|
|
||||||
|
$(form).append(input);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function renderMessages() {
|
function renderMessages() {
|
||||||
// Visualizzazione messaggi
|
// Visualizzazione messaggi
|
||||||
$.ajax({
|
$.ajax({
|
||||||
|
@ -37,18 +37,7 @@ function init() {
|
|||||||
|
|
||||||
$(this).find('[type=submit]').prop("disabled", true).addClass("disabled");
|
$(this).find('[type=submit]').prop("disabled", true).addClass("disabled");
|
||||||
|
|
||||||
$(this).find('input:disabled, select:disabled').prop('disabled', false);
|
prepareForm(this);
|
||||||
|
|
||||||
var hash = window.location.hash;
|
|
||||||
if (hash) {
|
|
||||||
var input = $('<input/>', {
|
|
||||||
type: 'hidden',
|
|
||||||
name: 'hash',
|
|
||||||
value: hash,
|
|
||||||
});
|
|
||||||
|
|
||||||
$(this).append(input);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user