Resolving place in edit form.
This commit is contained in:
@@ -706,8 +706,11 @@
|
||||
@change="(checked) => apply = checked"
|
||||
/>
|
||||
|
||||
<Ellipsis v-if="submitting" />
|
||||
|
||||
<!-- we don't want the return key to submit the form -->
|
||||
<button
|
||||
v-else
|
||||
class="button button-primary"
|
||||
type="button"
|
||||
:disabled="editing.size === 0"
|
||||
@@ -728,6 +731,7 @@ import { format } from 'date-fns';
|
||||
|
||||
import Avatar from '#/components/edit/avatar.vue';
|
||||
import Checkbox from '#/components/form/checkbox.vue';
|
||||
import Ellipsis from '#/components/loading/ellipsis.vue';
|
||||
|
||||
import {
|
||||
// get,
|
||||
@@ -965,6 +969,7 @@ const editing = ref(new Set());
|
||||
const edits = ref(Object.fromEntries(fields.value.map((field) => [field.key, field.value])));
|
||||
const comment = ref(null);
|
||||
const apply = ref(user.role !== 'user');
|
||||
const submitting = ref(false);
|
||||
const submitted = ref(false);
|
||||
|
||||
const sizeUnits = ref('metric');
|
||||
@@ -1006,6 +1011,8 @@ const groupMap = {
|
||||
|
||||
async function submit() {
|
||||
try {
|
||||
submitting.value = true;
|
||||
|
||||
await post('/revisions/actors', {
|
||||
actorId: actor.value.id,
|
||||
edits: {
|
||||
@@ -1041,6 +1048,7 @@ async function submit() {
|
||||
appendErrorMessage: true,
|
||||
});
|
||||
|
||||
submitting.value = false;
|
||||
editing.value = new Set();
|
||||
edits.value = {};
|
||||
comment.value = null;
|
||||
|
||||
Reference in New Issue
Block a user