removeComment button replaced by link

that allows to keep it both inside <form> and in <ul class="record_actions">
This commit is contained in:
Mathieu Jaumotte 2021-05-19 15:58:38 +02:00
parent 30b127bc88
commit c39097f164
2 changed files with 42 additions and 35 deletions

View File

@ -7,6 +7,7 @@
TODO fix errors flashbag for app component
</div-->
<div>
<div v-if="initialComment">
créé par {{ initialComment.creator.text }}
le {{ $d(initialComment.createdAt.datetime, 'long') }}
@ -17,6 +18,7 @@
</div>
<form @submit.prevent="submitform">
<label for="content">{{ $t('comment.label') }}</label>
<textarea
name="content"
v-bind:placeholder="$t('comment.content')"
@ -29,16 +31,15 @@
<li>
<button type="submit" class="sc-button bt-save">{{ $t('action.save') }}</button>
</li>
<li id="xyz">
<li v-if="initialComment !== null">
<a class="sc-button bt-delete"
@click="removeComment">
{{ $t('action.delete') }}
</a>
</li>
</ul>
</form>
<button v-if="initialComment !== null"
class="sc-button bt-delete"
@click="removeComment">
{{ $t('action.delete') }}
</button>
</div>
</div>
</template>
@ -83,9 +84,14 @@ export default {
}
/*
* TODO
* - patch endpoint to update Content
* - delete/reset button ?
* - manage flash messages => specific component ?
* - ckeditor
* - [x] delete button in ul record_actions, but not in form
* - [ ] display updatedAt => initialComment fetch PATCH content changes MUST NOT change object id !!
* - [ ] ckeditor integration
*/
</script>
<style lang="scss" scoped>
div.vue-component > div {
margin: 1em;
}
</style>

View File

@ -64,7 +64,8 @@ const appMessages = {
add_resources: "Ajouter des interlocuteurs",
},
comment: {
title: "Ajout d'une note",
title: "Observations",
label: "Ajout d'une première note",
content: "Rédigez une première note..."
},
confirm: {