Skip to content
This repository has been archived by the owner on Jun 12, 2024. It is now read-only.

Commit

Permalink
changed: copied enketo/enketo-express offline submission UI changes i…
Browse files Browse the repository at this point in the history
…n last merge to custom OC controller
  • Loading branch information
MartijnR committed Jul 19, 2023
1 parent 5903052 commit 7ed4d55
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions public/js/src/module/controller-webform-oc.js
Original file line number Diff line number Diff line change
Expand Up @@ -1020,18 +1020,10 @@ function _saveRecord(survey, draft, recordName, confirmed) {
'info',
5
);
} else {
gui.alert(
`${t('record-list.msg2')}`,
t('alert.recordsavesuccess.finalmsg'),
'info',
10
);
// The timeout simply avoids showing two messages at the same time:
// 1. "added to queue"
// 2. "successfully submitted"
setTimeout(records.uploadQueue, 10 * 1000);
return true;
}

return records.uploadQueue({ isUserTriggered: !draft });
})
.catch((error) => {
console.error('save error', error);
Expand Down Expand Up @@ -1566,7 +1558,7 @@ function _setButtonEventHandlers(survey) {
}

$('.record-list__button-bar__button.upload').on('click', () => {
records.uploadQueue(true);
records.uploadQueue({ isUserTriggered: true });
});

$('.record-list__button-bar__button.export').on('click', () => {
Expand Down

0 comments on commit 7ed4d55

Please sign in to comment.