Skip to content

Instantly share code, notes, and snippets.

@carloszaragoza
Created December 23, 2015 22:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save carloszaragoza/2a8f7950fe23a45a4dc0 to your computer and use it in GitHub Desktop.
Save carloszaragoza/2a8f7950fe23a45a4dc0 to your computer and use it in GitHub Desktop.
Remove Button Duplicate in a module, this is in a custom
setButtonStates:function(state){
this._super("setButtonStates",[state]);
var $saveButtonEl=this.buttons[this.saveButtonName];
if($saveButtonEl){
switch(state){
case this.STATE.CREATE:
case this.STATE.SELECT:
$saveButtonEl.getFieldElement().text(app.lang.get('LBL_SAVE_BUTTON_LABEL',this.module));
break;
case this.STATE.DUPLICATE:
$saveButtonEl.getFieldElement().text(app.lang.get('LBL_IGNORE_DUPLICATE_AND_SAVE',this.module)).hide();
break;
}
}
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment