{/foreach}
@@ -57,12 +57,16 @@
if (btn_save_and_stay.length > 0)
{
+
//get reference on current save link label
lbl_save_and_stay = $('#desc-{$table}-save-and-stay div');
//override save and stay link label with submit button value
- if (btn_submit.val().length > 0)
+ if (btn_submit.val().length > 0 && lbl_save_and_stay && !lbl_save_and_stay.hasClass('locked'))
+ {
lbl_save_and_stay.html(btn_submit.val() + " {l s='and stay'} ");
+ }
+
}
//hide standard submit button
@@ -73,17 +77,17 @@
btn_save.click(function() {
//add hidden input to emulate submit button click when posting the form -> field name posted
btn_submit.before('');
-
+
$('#{$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('');
-
+
$('#{$table}_form').submit();
return false;
});