mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-06 23:04:58 +00:00
AddAddress option buttonType: component manage button in edit or create context
This commit is contained in:
@@ -145,7 +145,7 @@ export default {
|
||||
default: {
|
||||
button: {
|
||||
text: { create: 'add_an_address_title', edit: 'edit_address' },
|
||||
type: 'btn-create',
|
||||
type: { create: 'btn-create', edit: 'btn-update'},
|
||||
displayText: true
|
||||
},
|
||||
title: { create: 'add_an_address_title', edit: 'edit_address' },
|
||||
@@ -223,13 +223,10 @@ export default {
|
||||
return (this.context.edit) ? this.default.button.text.edit : this.default.button.text.create;
|
||||
},
|
||||
getClassButton() {
|
||||
let type = this.default.button.type,
|
||||
size = '';
|
||||
if (typeof this.options.button !== 'undefined') {
|
||||
type = this.options.button.type !== null ? this.options.button.type : type;
|
||||
size = this.options.button.size !== null ? this.options.button.size : size;
|
||||
}
|
||||
return size ? `${size} ${type}` : type;
|
||||
let type = (this.context.edit) ? this.default.button.type.edit : this.default.button.type.create;
|
||||
let size = (typeof this.options.button !== 'undefined' && this.options.button.size !== null) ?
|
||||
`${this.options.button.size} ` : '';
|
||||
return `${size}${type}`;
|
||||
},
|
||||
displayTextButton() {
|
||||
return (typeof this.options.button !== 'undefined' && typeof this.options.button.displayText !== 'undefined') ?
|
||||
|
Reference in New Issue
Block a user