diff --git a/src/components/feature/FeatureAttachmentForm.vue b/src/components/feature/FeatureAttachmentForm.vue index f49247a6907496619067fe8d71dcb772692f7a37..eb9d0ef402eab0ff57f5623e7088c0c10637ee4b 100644 --- a/src/components/feature/FeatureAttachmentForm.vue +++ b/src/components/feature/FeatureAttachmentForm.vue @@ -1,14 +1,10 @@ <template> <div> - <!-- <span v-for="hidden in form.hidden_fields" :key="hidden"> - {{ hidden }} - </span> --> - <div class="ui teal segment"> <h4> Pièce jointe <button - @click="remove_attachment_formset(form.dataKey)" + @click="removeAttachmentFormset(form.dataKey)" class="ui small compact right floated icon button remove-formset" type="button" > @@ -33,9 +29,10 @@ </div> <div class="required field"> <label>Fichier (PDF, PNG, JPEG)</label> - <!-- // todo : mettre en place la sélection de fichier --> - <!-- @click="selectFile" --> - <label class="ui icon button" for="attachment_file"> + <label + class="ui icon button" + :for="'attachment_file' + attachmentForm.dataKey" + > <i class="file icon"></i> <span v-if="form.attachment_file.value" class="label">{{ form.attachment_file.value @@ -47,11 +44,8 @@ type="file" style="display: none" :name="form.attachment_file.html_name" - id="attachment_file" + :id="'attachment_file' + attachmentForm.dataKey" /> - - <!-- // todo: récupérer la valeur :accept="IMAGE_FORMAT" --> - <!-- @change="processImgData" --> {{ form.attachment_file.errors }} </div> </div> @@ -113,7 +107,6 @@ export default { methods: { initForm(attachmentForm) { - console.log("initForm"); for (let el in attachmentForm) { if (el && this.form[el]) { this.form[el].value = @@ -123,7 +116,7 @@ export default { } } }, - remove_attachment_formset() { + removeAttachmentFormset() { this.$store.commit( "feature/REMOVE_ATTACHMENT_FORM", this.attachmentForm.dataKey diff --git a/src/store/modules/feature.js b/src/store/modules/feature.js index 9dc5cd4ca848a3bffec4be26d9de98a22cf2f3c9..df638cf266dfce9e82646000d260747c0adbc853 100644 --- a/src/store/modules/feature.js +++ b/src/store/modules/feature.js @@ -139,18 +139,6 @@ const feature = { //DELETE_FEATURE({ state }, feature_slug) { //console.log("Deleting feature:", feature_slug, state) - /* axios - .post(`${DJANGO_API_BASE}feature_type/`, data) - .then((response) => { - const routerHistory = router.options.routerHistory - commit("SET_USER", response.data.user); - router.push(routerHistory[routerHistory.length - 1] || "/") - dispatch("GET_USER_LEVEL_PROJECTS"); - }) - .catch(() => { - commit("SET_USER", false) - }); */ - // }, // POST_COMMENT({ state }, data) { //console.log("post comment", data, state)