mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 13:24:25 +00:00
AddAddress modal: make title dynamically passed by parent
This commit is contained in:
parent
886924a7e5
commit
d916b575da
@ -4,6 +4,8 @@
|
|||||||
<h2 v-if="!edit">{{ $t('create_a_new_address') }}</h2>
|
<h2 v-if="!edit">{{ $t('create_a_new_address') }}</h2>
|
||||||
<h2 v-else>{{ $t('edit_a_new_address') }}</h2>
|
<h2 v-else>{{ $t('edit_a_new_address') }}</h2>
|
||||||
<add-address
|
<add-address
|
||||||
|
modalAddTitle="add_an_address_title"
|
||||||
|
modalEditTitle="edit_an_address_title"
|
||||||
@addNewAddress="addNewAddress">
|
@addNewAddress="addNewAddress">
|
||||||
</add-address>
|
</add-address>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<button v-if="!edit" class="btn btn-create mt-4" @click="openModal">
|
<button v-if="!edit" class="btn btn-create mt-4" @click="openModal">
|
||||||
{{ $t('add_an_address_title') }}
|
{{ $t(modalAddTitle) }}
|
||||||
</button>
|
</button>
|
||||||
<button v-else class="btn btn-create mt-4" @click="openModal">
|
<button v-else class="btn btn-create mt-4" @click="openModal">
|
||||||
{{ $t('edit_an_address_title') }}
|
{{ $t(modalEditTitle) }}
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<teleport to="body">
|
<teleport to="body">
|
||||||
@ -12,8 +12,8 @@
|
|||||||
@close="modal.showModal = false">
|
@close="modal.showModal = false">
|
||||||
|
|
||||||
<template v-slot:header>
|
<template v-slot:header>
|
||||||
<h3 v-if="!edit" class="modal-title">{{ $t('add_an_address_title') }}</h3>
|
<h3 v-if="!edit" class="modal-title">{{ $t(modalAddTitle) }}</h3>
|
||||||
<h3 v-if="edit" class="modal-title">{{ $t('edit_an_address_title') }}</h3>
|
<h3 v-if="edit" class="modal-title">{{ $t(modalEditTitle) }}</h3>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-slot:body>
|
<template v-slot:body>
|
||||||
@ -107,6 +107,8 @@ export default {
|
|||||||
AddressMore
|
AddressMore
|
||||||
},
|
},
|
||||||
props: [
|
props: [
|
||||||
|
'modalAddTitle',
|
||||||
|
'modalEditTitle'
|
||||||
],
|
],
|
||||||
emits: ['addNewAddress'],
|
emits: ['addNewAddress'],
|
||||||
data() {
|
data() {
|
||||||
|
@ -5,6 +5,8 @@
|
|||||||
<h2 v-if="!edit">{{ $t('create_a_new_address') }}</h2>
|
<h2 v-if="!edit">{{ $t('create_a_new_address') }}</h2>
|
||||||
<h2 v-else>{{ $t('edit_a_new_address') }}</h2>
|
<h2 v-else>{{ $t('edit_a_new_address') }}</h2>
|
||||||
<add-address
|
<add-address
|
||||||
|
modalAddTitle="add_an_address_title"
|
||||||
|
modalEditTitle="edit_an_address_title"
|
||||||
@addNewAddress="addNewAddress">
|
@addNewAddress="addNewAddress">
|
||||||
</add-address>
|
</add-address>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user