mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +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-else>{{ $t('edit_a_new_address') }}</h2>
|
||||
<add-address
|
||||
modalAddTitle="add_an_address_title"
|
||||
modalEditTitle="edit_an_address_title"
|
||||
@addNewAddress="addNewAddress">
|
||||
</add-address>
|
||||
</div>
|
||||
|
@ -1,9 +1,9 @@
|
||||
<template>
|
||||
<button v-if="!edit" class="btn btn-create mt-4" @click="openModal">
|
||||
{{ $t('add_an_address_title') }}
|
||||
{{ $t(modalAddTitle) }}
|
||||
</button>
|
||||
<button v-else class="btn btn-create mt-4" @click="openModal">
|
||||
{{ $t('edit_an_address_title') }}
|
||||
{{ $t(modalEditTitle) }}
|
||||
</button>
|
||||
|
||||
<teleport to="body">
|
||||
@ -12,8 +12,8 @@
|
||||
@close="modal.showModal = false">
|
||||
|
||||
<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('edit_an_address_title') }}</h3>
|
||||
<h3 v-if="!edit" class="modal-title">{{ $t(modalAddTitle) }}</h3>
|
||||
<h3 v-if="edit" class="modal-title">{{ $t(modalEditTitle) }}</h3>
|
||||
</template>
|
||||
|
||||
<template v-slot:body>
|
||||
@ -107,6 +107,8 @@ export default {
|
||||
AddressMore
|
||||
},
|
||||
props: [
|
||||
'modalAddTitle',
|
||||
'modalEditTitle'
|
||||
],
|
||||
emits: ['addNewAddress'],
|
||||
data() {
|
||||
|
@ -5,6 +5,8 @@
|
||||
<h2 v-if="!edit">{{ $t('create_a_new_address') }}</h2>
|
||||
<h2 v-else>{{ $t('edit_a_new_address') }}</h2>
|
||||
<add-address
|
||||
modalAddTitle="add_an_address_title"
|
||||
modalEditTitle="edit_an_address_title"
|
||||
@addNewAddress="addNewAddress">
|
||||
</add-address>
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user