Skip to content

Commit

Permalink
Add modal footer buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
katrinDY authored and KinyaElGrande committed Oct 16, 2023
1 parent 01769c3 commit 8b6e157
Showing 1 changed file with 29 additions and 4 deletions.
33 changes: 29 additions & 4 deletions client/web/compose/src/views/Admin/Pages/Edit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -721,14 +721,32 @@
<b-modal
v-model="showIconModal"
:title="$t('icon.configure')"
:ok-title="$t('label.saveAndClose')"
size="lg"
label-class="text-primary"
cancel-variant="link"
no-fade
@close="closeIconModal"
@ok="saveIconModal"
>
<template #modal-footer>
<b-button
variant="link"
class="text-primary"
@click="closeIconModal"
>
{{ $t('general:label.cancel') }}
</b-button>
<b-button
:disabled="selectedAttachmentID"
variant="danger"
@click="deleteIcon"
>
{{ $t('general:label.delete') }}
</b-button>
<b-button
variant="primary"
@click="saveIconModal"
>
{{ $t('general:label.saveAndClose') }}
</b-button>
</template>
<b-form-group
:label="$t('icon.upload')"
label-class="text-primary"
Expand Down Expand Up @@ -1352,6 +1370,13 @@ export default {
cancel()
})
},
deleteIcon () {
if (this.selectedAttachmentID) {
// study altered logic
// pass ID or whatever BE needs to del icon
}
},
},
}
</script>
Expand Down

0 comments on commit 8b6e157

Please sign in to comment.