diff --git a/src/components/date-range-picker.vue b/src/components/date-range-picker.vue
index c80eccf74..d873f6062 100644
--- a/src/components/date-range-picker.vue
+++ b/src/components/date-range-picker.vue
@@ -16,10 +16,12 @@ except according to the terms contained in the LICENSE file.
https://github.com/ankurk91/vue-flatpickr-component/issues/47 -->
-
@@ -70,6 +72,14 @@ export default {
placeholder: {
type: String,
required: true
+ },
+ disabled: {
+ type: Boolean,
+ default: false
+ },
+ disabledMessage: {
+ type: String,
+ required: false
}
},
emits: ['update:modelValue'],
@@ -90,7 +100,8 @@ export default {
mode: 'range',
// See https://github.com/flatpickr/flatpickr/issues/1549
dateFormat: 'Y/m/d',
- locale: l10ns[this.$i18n.locale] ?? l10ns[this.$i18n.fallbackLocale]
+ locale: l10ns[this.$i18n.locale] ?? l10ns[this.$i18n.fallbackLocale],
+ clickOpens: !this.disabled
};
}
},
@@ -149,6 +160,11 @@ export default {
// https://github.com/ankurk91/vue-flatpickr-component/issues/33
this.$refs.flatpickr.$el.focus();
this.$refs.flatpickr.fp.close();
+ },
+ stopPropagationIfDisabled(e) {
+ if (this.disabled) {
+ e.stopPropagation();
+ }
}
}
};
@@ -165,6 +181,10 @@ export default {
&::placeholder { color: $color-text; }
}
+.form-group .flatpickr-input[aria-disabled="true"]::placeholder {
+ color: $color-input-inactive;
+}
+
.form-inline .flatpickr-input {
// Leave space for the .close button.
width: 205px;
diff --git a/src/components/form-draft/testing.vue b/src/components/form-draft/testing.vue
index e3eee1398..a8a18926b 100644
--- a/src/components/form-draft/testing.vue
+++ b/src/components/form-draft/testing.vue
@@ -75,6 +75,7 @@ import EnketoFill from '../enketo/fill.vue';
import Loading from '../loading.vue';
import SentenceSeparator from '../sentence-separator.vue';
import SubmissionList from '../submission/list.vue';
+import useSubmissions from '../../request-data/submissions';
import { apiPaths } from '../../util/request';
import { noop } from '../../util/util';
@@ -104,6 +105,9 @@ export default {
},
setup() {
const { resourceView, createResource } = useRequestData();
+
+ // SubmissionList expects submission stores to be created!
+ useSubmissions();
const formDraft = resourceView('formDraft', (data) => data.get());
const keys = createResource('keys');
return { formDraft, keys };
diff --git a/src/components/form/submissions.vue b/src/components/form/submissions.vue
index 121db851e..afd49c280 100644
--- a/src/components/form/submissions.vue
+++ b/src/components/form/submissions.vue
@@ -10,7 +10,7 @@ including this file, may be copied, modified, propagated, or distributed
except according to the terms contained in the LICENSE file.
-->
-
+
@@ -18,12 +18,23 @@ except according to the terms contained in the LICENSE file.
{{ $t('action.createSubmission') }}
+
+
+
+
{{ $t('purgeDescription') }}
-
+
{
"en": {
- "analyzeDisabled": "OData access is unavailable due to Form encryption"
+ "analyzeDisabled": "OData access is unavailable due to Form encryption",
+ "analyzeDisabledDeletedData": "OData access is unavailable for deleted Submissions",
+ "purgeDescription": "Submissions and Submission-related data are deleted after 30 days in the Trash",
+ "action": {
+ "toggleDeletedSubmissions": "{count} deleted Submission | {count} deleted Submissions"
+ }
}
}
diff --git a/src/components/form/trash-row.vue b/src/components/form/trash-row.vue
index 56c3f8db3..5d8673850 100644
--- a/src/components/form/trash-row.vue
+++ b/src/components/form/trash-row.vue
@@ -168,9 +168,6 @@ export default {
{
"en": {
- "action": {
- "restore": "Undelete"
- },
// This text shows when the Form was deleted. {dateTime} shows
// the date and time, for example: "2020/01/01 01:23". It may show a
// formatted date like "2020/01/01", or it may use a word like "today",
diff --git a/src/components/multiselect.vue b/src/components/multiselect.vue
index f1f4015a9..fbd63cf2c 100644
--- a/src/components/multiselect.vue
+++ b/src/components/multiselect.vue
@@ -15,7 +15,9 @@ except according to the terms contained in the LICENSE file.
not show a menu with the placeholder option. This approach seems to work
across browsers. -->
+
+
+
+
+{
+ "en": {
+ // This is the title at the top of Submission undelete pop-up.
+ "title": "Undelete Submission",
+ "introduction": [
+ "Are you sure you want to undelete this Submission?",
+ "The Submission will be restored to its previous state, including associated data like comments.",
+ "If the Submission is deleted again, it will be another 30 days before it is removed."
+ ],
+ "field": {
+ "noConfirm": "Undelete immediately without confirmation until I leave the page"
+ }
+ }
+}
+
diff --git a/src/components/submission/show.vue b/src/components/submission/show.vue
index 3cfff7d44..eef7d3ad0 100644
--- a/src/components/submission/show.vue
+++ b/src/components/submission/show.vue
@@ -27,13 +27,16 @@ except according to the terms contained in the LICENSE file.