@@ -65,15 +65,15 @@ export default class TextAlternativeFormView extends View {
6565 *
6666 * @member {module:ui/button/buttonview~ButtonView} #saveButtonView
6767 */
68- this . saveButtonView = this . _createButton ( t ( 'Save' ) , checkIcon ) ;
68+ this . saveButtonView = this . _createButton ( t ( 'Save' ) , checkIcon , 'ck-button-save' ) ;
6969 this . saveButtonView . type = 'submit' ;
7070
7171 /**
7272 * A button used to cancel the form.
7373 *
7474 * @member {module:ui/button/buttonview~ButtonView} #cancelButtonView
7575 */
76- this . cancelButtonView = this . _createButton ( t ( 'Cancel' ) , cancelIcon , 'cancel' ) ;
76+ this . cancelButtonView = this . _createButton ( t ( 'Cancel' ) , cancelIcon , 'ck-button-cancel' , ' cancel' ) ;
7777
7878 /**
7979 * A collection of views which can be focused in the form.
@@ -104,14 +104,6 @@ export default class TextAlternativeFormView extends View {
104104 }
105105 } ) ;
106106
107- this . saveButtonView . extendTemplate ( {
108- attributes : {
109- class : [
110- 'ck-button-action'
111- ]
112- }
113- } ) ;
114-
115107 this . setTemplate ( {
116108 tag : 'form' ,
117109
@@ -158,10 +150,11 @@ export default class TextAlternativeFormView extends View {
158150 * @private
159151 * @param {String } label The button label
160152 * @param {String } icon The button's icon.
153+ * @param {String } className The additional button CSS class name.
161154 * @param {String } [eventName] The event name that the ButtonView#execute event will be delegated to.
162155 * @returns {module:ui/button/buttonview~ButtonView } The button view instance.
163156 */
164- _createButton ( label , icon , eventName ) {
157+ _createButton ( label , icon , className , eventName ) {
165158 const button = new ButtonView ( this . locale ) ;
166159
167160 button . set ( {
@@ -170,6 +163,12 @@ export default class TextAlternativeFormView extends View {
170163 tooltip : true
171164 } ) ;
172165
166+ button . extendTemplate ( {
167+ attributes : {
168+ class : className
169+ }
170+ } ) ;
171+
173172 if ( eventName ) {
174173 button . delegate ( 'execute' ) . to ( this , eventName ) ;
175174 }
0 commit comments