From 7c9b482f5811466e46bee4e977b5857a46151b94 Mon Sep 17 00:00:00 2001 From: Andrej Date: Thu, 16 Jan 2025 09:20:25 +0100 Subject: [PATCH] Fix form moving between steps [SCI-11461] --- app/javascript/vue/forms/fields/datetime.vue | 1 + app/javascript/vue/shared/content/form_response.vue | 5 ++++- app/javascript/vue/shared/content/mixins/move.js | 8 ++++---- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/app/javascript/vue/forms/fields/datetime.vue b/app/javascript/vue/forms/fields/datetime.vue index 58c01b0e1..15aa25480 100644 --- a/app/javascript/vue/forms/fields/datetime.vue +++ b/app/javascript/vue/forms/fields/datetime.vue @@ -11,6 +11,7 @@ :placeholder="fieldDisabled ? '' : i18n.t('forms.fields.from')" :class="{'error': !validValue}" /> + - { + moveElement(targetId) { + axios.post(this.moveUrl || this.element.attributes.orderable.urls.move_url, { target_id: targetId }) + .then(() => { this.movingElement = false; - this.$emit('moved', this.element.attributes.position, target_id); + this.$emit('moved', this.element.attributes.position, targetId); }); } }