Fix the button text

This commit is contained in:
2026-01-06 15:19:38 +01:00
parent fa5eff1e4c
commit e48aad487c

View File

@@ -45,10 +45,10 @@
:class="getClassButton"
type="button"
name="button"
:title="trans(getTextButton)"
:title="getTextButton"
>
<span v-if="displayTextButton">{{
trans(getTextButton)
getTextButton
}}</span>
</button>
</template>
@@ -73,10 +73,10 @@
:class="getClassButton"
type="button"
name="button"
:title="trans(getTextButton)"
:title="getTextButton"
>
<span v-if="displayTextButton">{{
trans(getTextButton)
getTextButton
}}</span>
</button>
</template>
@@ -97,11 +97,9 @@
:class="getClassButton"
type="button"
name="button"
:title="trans(getTextButton)"
:title="getTextButton"
>
<span v-if="displayTextButton">{{
trans(getTextButton)
}}</span>
<span v-if="displayTextButton">{{ getTextButton }}</span>
</button>
</template>
</action-buttons>
@@ -177,16 +175,18 @@ export default {
},
getTextButton() {
if (
typeof this.options.button.text !== "undefined" &&
(this.options.button.text.edit !== null ||
this.options.button.text.create !== null)
typeof this.options.button !== "undefined" &&
typeof this.options.button.text !== "undefined"
) {
// console.log('this.options.button.text', this.options.button.text)
return this.context.edit
? ACTIVITY_EDIT_ADDRESS
: ACTIVITY_CREATE_ADDRESS;
const customText = this.context.edit
? this.options.button.text.edit
: this.options.button.text.create;
if (customText !== null) {
return customText;
}
}
console.log("defaultz", this.defaultz);
return this.context.edit
? this.defaultz.button.text.edit
: this.defaultz.button.text.create;