How does ERPNext hide the Save button in Leave application?

Hello there,

I know, there is a code, which is cur_frm.disable_save();, which hides the save button.

However this is not, what I am asking for. The leave application hides the save button, once a document is saved for users, which can not approve the application. Only the leave approver or similar roles, can submit the document.

In one of my ERPNext instances, the save button does still show, after saving the first time. On the other, it doesn’t.

I can’t find any code in the leave_application.js file, which is supposed to hide the save button.

Any ideas?

Thank you.