nodejs: start filling

This commit is contained in:
Sergey Linnik
2025-03-14 16:45:23 +03:00
parent a2088ae8e1
commit a5d2a38809
3 changed files with 19 additions and 0 deletions

View File

@ -1,6 +1,7 @@
# Change Log
- nodejs: user role
- nodejs: start filling
## 1.12.0
- nodejs: refresh config

View File

@ -65,6 +65,7 @@ const descrUser1 = [
'Can submit forms',
'Has an avatar',
'Has no roles',
'Can start filling',
];
const descrUser2 = [
@ -77,6 +78,7 @@ const descrUser2 = [
'Can submit forms',
'Has an avatar',
'Has role "Anyone"',
'Can start filling',
];
const descrUser3 = [
@ -93,6 +95,7 @@ const descrUser3 = [
'Cant close history',
'Cant restore the file version',
'Has role "role"',
'Can start filling',
];
const descrUser0 = [
@ -111,6 +114,7 @@ const descrUser0 = [
'Cant submit forms',
'Cant refresh outdated file',
'Has empty role',
'Cant start filling',
];
const users = [

View File

@ -365,6 +365,18 @@
};
};
var onRequestStartFilling = function(event) {
var data = event.data;
var submit = confirm("Start filling?\n" + JSON.stringify(data));
if (submit) {
docEditor.startFilling(true);
}
};
var onStartFilling = function(event) {
innerAlert("The form is ready to fill out.");
};
var onDocumentReady = function(){
fixSize();
};
@ -398,6 +410,8 @@
config.events.onRequestReferenceData = onRequestReferenceData;
config.events.onRequestReferenceSource = onRequestReferenceSource;
config.events.onRequestRefreshFile = onRequestRefreshFile;
config.events.onRequestStartFilling = onRequestStartFilling;
config.events.onStartFilling = onStartFilling;
if (<%- JSON.stringify(editor.userid) %> != "uid-3") {
config.events.onRequestHistoryClose = onRequestHistoryClose;
config.events.onRequestRestore = onRequestRestore;