Commit 2f159fd7 authored by Olena Horal-Koretska's avatar Olena Horal-Koretska

Update confirmation button text in edit modals

Changelog: fixed
EE: true
parent c6982077
......@@ -16,6 +16,7 @@ export const i18n = {
cancel: __('Cancel'),
addEscalationPolicy: s__('EscalationPolicies|Add escalation policy'),
editEscalationPolicy: s__('EscalationPolicies|Edit escalation policy'),
saveChanges: __('Save changes'),
};
export default {
......@@ -58,10 +59,13 @@ export default {
title() {
return this.isEditMode ? i18n.editEscalationPolicy : i18n.addEscalationPolicy;
},
primaryBtnText() {
return this.isEditMode ? i18n.saveChanges : i18n.addEscalationPolicy;
},
actionsProps() {
return {
primary: {
text: this.title,
text: this.primaryBtnText,
attributes: [
{ variant: 'info' },
{ loading: this.loading },
......
......@@ -13,6 +13,7 @@ export const i18n = {
cancel: __('Cancel'),
addSchedule: s__('OnCallSchedules|Add schedule'),
editSchedule: s__('OnCallSchedules|Edit schedule'),
saveChanges: __('Save changes'),
addErrorMsg: s__('OnCallSchedules|Failed to edit schedule'),
editErrorMsg: s__('OnCallSchedules|Failed to add schedule'),
};
......@@ -60,7 +61,7 @@ export default {
actionsProps() {
return {
primary: {
text: this.title,
text: this.primaryBtnText,
attributes: [
{ variant: 'info' },
{ loading: this.loading },
......@@ -90,6 +91,9 @@ export default {
title() {
return this.isEditMode ? i18n.editSchedule : i18n.addSchedule;
},
primaryBtnText() {
return this.isEditMode ? i18n.saveChanges : i18n.addSchedule;
},
},
methods: {
createSchedule() {
......
......@@ -23,6 +23,7 @@ export const i18n = {
editedRotation: s__('OnCallSchedules|Successfully edited your rotation'),
addRotation: s__('OnCallSchedules|Add rotation'),
editRotation: s__('OnCallSchedules|Edit rotation'),
saveChanges: __('Save changes'),
cancel: __('Cancel'),
};
......@@ -115,7 +116,7 @@ export default {
actionsProps() {
return {
primary: {
text: this.title,
text: this.primaryBtnText,
attributes: [
{ variant: 'info' },
{ loading: this.loading },
......@@ -179,7 +180,10 @@ export default {
return variables;
},
title() {
return this.isEditMode ? this.$options.i18n.editRotation : this.$options.i18n.addRotation;
return this.isEditMode ? i18n.editRotation : i18n.addRotation;
},
primaryBtnText() {
return this.isEditMode ? i18n.saveChanges : i18n.addRotation;
},
isEndDateValid() {
const startsAt = new Date(this.form.startsAt.date).getTime();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment