// Fix admin toolbar: don't go anymore on top page when clicking on toolbar submit actions
This commit is contained in:
@@ -78,22 +78,24 @@
|
|||||||
|
|
||||||
//submit the form
|
//submit the form
|
||||||
{block name=formSubmit}
|
{block name=formSubmit}
|
||||||
btn_save.click(function() {
|
btn_save.click(function() {
|
||||||
|
//add hidden input to emulate submit button click when posting the form -> field name posted
|
||||||
|
btn_submit.before('<input type="hidden" name="'+btn_submit.attr("name")+'" value="1" />');
|
||||||
|
|
||||||
|
$('#{$table}_form').submit();
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
|
if (btn_save_and_stay)
|
||||||
|
{
|
||||||
|
btn_save_and_stay.click(function() {
|
||||||
//add hidden input to emulate submit button click when posting the form -> field name posted
|
//add hidden input to emulate submit button click when posting the form -> field name posted
|
||||||
btn_submit.before('<input type="hidden" name="'+btn_submit.attr("name")+'" value="1" />');
|
btn_submit.before('<input type="hidden" name="'+btn_submit.attr("name")+'AndStay" value="1" />');
|
||||||
|
|
||||||
$('#{$table}_form').submit();
|
$('#{$table}_form').submit();
|
||||||
|
return false;
|
||||||
});
|
});
|
||||||
|
}
|
||||||
if (btn_save_and_stay)
|
|
||||||
{
|
|
||||||
btn_save_and_stay.click(function() {
|
|
||||||
//add hidden input to emulate submit button click when posting the form -> field name posted
|
|
||||||
btn_submit.before('<input type="hidden" name="'+btn_submit.attr("name")+'AndStay" value="1" />');
|
|
||||||
|
|
||||||
$('#{$table}_form').submit();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
{/block}
|
{/block}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user