Saving permanently sets the save button to disabled.
Saving permanently sets the save button to disabled.
When I save a record in the detail view, the save button is disabled, and further changes can no longer be saved.
Re: Saving permanently sets the save button to disabled.
Are your changes saved the first time?
Last year there was an update which disables the save buttons as a safety precaution, you have to click the unlock button to enable saving and avoid unintentional changes. Is that mechanism not working properly?
Last year there was an update which disables the save buttons as a safety precaution, you have to click the unlock button to enable saving and avoid unintentional changes. Is that mechanism not working properly?
Re: Saving permanently sets the save button to disabled.
Hi,
yes, I can save once, only then does the button go into secured mode. Latest appgini version. That doesn’t make much sense to me. Either the button is immediately disabled, or I lock the button myself.
yes, I can save once, only then does the button go into secured mode. Latest appgini version. That doesn’t make much sense to me. Either the button is immediately disabled, or I lock the button myself.
Re: Saving permanently sets the save button to disabled.
I understand that sometimes changes in the application may not make sense to every user. For example, I’m used to clicking the table title in the Detail View to return to the Table View, but this feature was removed in recent versions as people thought it was a bug. In the future, I may either have to adjust to the new behavior or modify the source files to bring it back, but for now, I’m sticking with the older version of AppGini, at least till Bootstrap 5 and field level security feature is implemented or there are major security issues or fixes.
Similarly, if you are willing to change the core files generated by AppGini, for removing the lock button and restoring old functionality, it’s possible. However, this isn’t the recommended approach, since you would need to make these changes again every time you regenerate the project.
Similarly, if you are willing to change the core files generated by AppGini, for removing the lock button and restoring old functionality, it’s possible. However, this isn’t the recommended approach, since you would need to make these changes again every time you regenerate the project.
Re: Saving permanently sets the save button to disabled.
Thank you. I think most users won't notice because they save only once. 

Re: Saving permanently sets the save button to disabled.
Welcome, by the way if you don't mind having a line of javascript in tablename-dv.php or as part of hook / php you use the following to ensure that the save button is always enabled
:

$j('#update').prop('disabled', false);
Re: Saving permanently sets the save button to disabled.
Thank you very much.
I tried this and put that code in my tablename-dv.js.
But it will not work.
I tried this and put that code in my tablename-dv.js.
But it will not work.
Re: Saving permanently sets the save button to disabled.
Is it under $j(function() { } ? This works when the page is fully loaded, it is working on my project though.
Re: Saving permanently sets the save button to disabled.
Hi, yes. Butt it will not work:
$j(function() {
$j('#update').removeAttr('disabled');
});
Same, same
Do you have the latest AG Version?
$j(function() {
$j('#update').removeAttr('disabled');
});
Same, same
Do you have the latest AG Version?
Re: Saving permanently sets the save button to disabled.
Not the latest AG, I am using 24.10.1578 and it is working correctly on this version, haven't upgraded since. I can try with the latest trial version i.e. 24.19 and let you know what's the result, but that might take time. In the meantime, can you check the following:
1) Instead of removeAttr try:
2) After saving, once the save button is disabled, open Developer Tools (F12 on Chrome & Edge) run the code on the console and see if it works. If this works, then we can further troubleshoot what is causing the button to be disabled. If it doesn't we can look into the error on the console.
3) If the above doesn't work, right-click on the save button and select the option to Inspect the element. The HTML should be same as the following:
Let me know if the code is different than the above or the console throws an error. I doubt the id would have changed in the newer versions of AppGini, as even on the Northwind demo which was built with 24.18 has the same id.
1) Instead of removeAttr try:
$j('#update').attr('disabled', false);
, this also works for my version.2) After saving, once the save button is disabled, open Developer Tools (F12 on Chrome & Edge) run the code on the console and see if it works. If this works, then we can further troubleshoot what is causing the button to be disabled. If it doesn't we can look into the error on the console.
3) If the above doesn't work, right-click on the save button and select the option to Inspect the element. The HTML should be same as the following:
Code: Select all
<button type="submit" class="btn btn-success btn-lg locking-enabled user-locked" id="update" name="update_x" value="1" onclick="return uom_validateData();" title="Save Changes" disabled="" style="width: 75%; overflow: hidden;"><i class="glyphicon glyphicon-ok"></i> Save Changes</button>
Re: Saving permanently sets the save button to disabled.
I had to clear my browser cache.
$j('#update').attr('disabled', false); will work
Thank you very much!!!
$j('#update').attr('disabled', false); will work

Thank you very much!!!
Re: Saving permanently sets the save button to disabled.
With this code in header-extras.php it works for all detail views.
Thanks to chatgpt 
Code: Select all
<script>
document.addEventListener('DOMContentLoaded', function () {
const observer = new MutationObserver(function (mutations) {
mutations.forEach(function (mutation) {
const button = document.querySelector('#update');
if (button && button.disabled) {
button.disabled = false;
}
});
});
observer.observe(document.body, { childList: true, subtree: true, attributes: true });
});
</script>
