Search code examples
angularjstwitter-bootstrap-3x-editable

adding text on buttons angular x-editable


Hi I need to add "save" and "cancel" text on the editable form buttons. There are two ways 1)By using "default" theme

 mainApp.run(function(editableOptions){      
       editableOptions.theme = 'default'; 
});

2) To do it the way it is done in this example http://jsfiddle.net/NfPcH/7474/

Is there any way that I can use the "bs3" theme and globally configure to have save and cancel text while editing the form

mainApp.run(function(editableOptions){   
           editableOptions.theme = 'bs3'; 
    });

Solution

  • You can actually override the button template like this

    app.run(function(editableOptions,editableThemes) {
          editableOptions.theme = 'bs3';
          editableThemes['bs3'].submitTpl = '<button type="submit">ok</button>';
    });
    

    I also created an example here