@steedos-labs/plugin-workflow 3.0.0-beta.23 → 3.0.0-beta.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/main/default/objectTranslations/flows.en/flows.en.objectTranslation.yml +5 -0
- package/main/default/objectTranslations/flows.zh-CN/flows.zh-CN.objectTranslation.yml +6 -1
- package/main/default/objects/flows/buttons/design_form_layout.button.js +5 -2
- package/main/default/pages/flowdetail.page.amis.json +9 -9
- package/main/default/routes/flow_form_design.ejs +4 -1
- package/main/default/routes/flow_form_design.router.js +3 -2
- package/package.json +1 -1
|
@@ -329,3 +329,8 @@ CustomLabels:
|
|
|
329
329
|
flows_action_distributeAdmin_dialog_field_distribute_to_self: When distributing, you can give it to yourself
|
|
330
330
|
flows_action_distributeAdmin_dialog_field_distribute_end_notification: Remind the initiator after the distribution is completed
|
|
331
331
|
flows_action_distributeAdmin_dialog_field_upload_after_being_distributed: Is it allowed to upload attachments after being distributed
|
|
332
|
+
flows_page_record_field_form_name: Form Name
|
|
333
|
+
flows_page_record_field_form_description: Form Description
|
|
334
|
+
flows_page_record_field_form_name_forumla: Title Formula
|
|
335
|
+
flows_page_record_field_form_script: Form Script
|
|
336
|
+
flows_page_record_action_edit_dialog_title: Edit Form
|
|
@@ -325,4 +325,9 @@ CustomLabels:
|
|
|
325
325
|
flows_action_distributeAdmin_dialog_field_distribute_optional_users_id: 流程被分发时分发对象选择范围
|
|
326
326
|
flows_action_distributeAdmin_dialog_field_distribute_to_self: 分发时可分发给自己
|
|
327
327
|
flows_action_distributeAdmin_dialog_field_distribute_end_notification: 分发结束后提醒发起人
|
|
328
|
-
flows_action_distributeAdmin_dialog_field_upload_after_being_distributed: 被分发后是否允许上传附件
|
|
328
|
+
flows_action_distributeAdmin_dialog_field_upload_after_being_distributed: 被分发后是否允许上传附件
|
|
329
|
+
flows_page_record_field_form_name: 表单名称
|
|
330
|
+
flows_page_record_field_form_description: 表单描述
|
|
331
|
+
flows_page_record_field_form_name_forumla: 标题公式
|
|
332
|
+
flows_page_record_field_form_script: 表单脚本
|
|
333
|
+
flows_page_record_action_edit_dialog_title: 编辑表单
|
|
@@ -15,8 +15,11 @@ module.exports = {
|
|
|
15
15
|
if (!record) {
|
|
16
16
|
return toastr.error("未找到记录");
|
|
17
17
|
}
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
var locale = Builder.settings.context?.user?.language || window.navigator.language;
|
|
19
|
+
if(locale === 'en' || locale.startsWith('en-')){
|
|
20
|
+
locale = 'en-US'
|
|
21
|
+
}
|
|
22
|
+
window.open(Steedos.getRelativeUrl("/api/workflow/form_design?fid=" + record_id+`&assetUrls=${Builder.settings.assetUrls}&locale=${locale}`));
|
|
20
23
|
},
|
|
21
24
|
design_form_layoutVisible: function(object_name, record_id, record_permissions, data) {
|
|
22
25
|
var record = data && data.record;
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"actionType": "dialog",
|
|
73
73
|
"dialog": {
|
|
74
74
|
"type": "dialog",
|
|
75
|
-
"title": "
|
|
75
|
+
"title": "${'flows_page_record_action_edit_dialog_title' | t}",
|
|
76
76
|
"body": [
|
|
77
77
|
{
|
|
78
78
|
"type": "form",
|
|
@@ -80,13 +80,13 @@
|
|
|
80
80
|
"body": [
|
|
81
81
|
{
|
|
82
82
|
"type": "input-text",
|
|
83
|
-
"label": "
|
|
83
|
+
"label": "${'flows_page_record_field_form_name' | t}",
|
|
84
84
|
"name": "name",
|
|
85
85
|
"id": "u:84af37d53da42"
|
|
86
86
|
},
|
|
87
87
|
{
|
|
88
88
|
"type": "textarea",
|
|
89
|
-
"label": "
|
|
89
|
+
"label": "${'flows_page_record_field_form_description' | t}",
|
|
90
90
|
"name": "description",
|
|
91
91
|
"id": "u:84af37d53da4",
|
|
92
92
|
"minRows": 3,
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
},
|
|
95
95
|
{
|
|
96
96
|
"type": "textarea",
|
|
97
|
-
"label": "
|
|
97
|
+
"label": "${'flows_page_record_field_form_name_forumla' | t}",
|
|
98
98
|
"name": "name_forumla",
|
|
99
99
|
"id": "u:69b6536e9fd8",
|
|
100
100
|
"minRows": 3,
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
},
|
|
103
103
|
{
|
|
104
104
|
"type": "editor",
|
|
105
|
-
"label": "
|
|
105
|
+
"label": "${'flows_page_record_field_form_script' | t}",
|
|
106
106
|
"name": "form_script",
|
|
107
107
|
"id": "u:025f8c4f09b6",
|
|
108
108
|
"minRows": 3,
|
|
@@ -163,13 +163,13 @@
|
|
|
163
163
|
"body": [
|
|
164
164
|
{
|
|
165
165
|
"type": "input-text",
|
|
166
|
-
"label": "
|
|
166
|
+
"label": "${'flows_page_record_field_form_name' | t}",
|
|
167
167
|
"name": "name",
|
|
168
168
|
"id": "u:84af37d53da42"
|
|
169
169
|
},
|
|
170
170
|
{
|
|
171
171
|
"type": "textarea",
|
|
172
|
-
"label": "
|
|
172
|
+
"label": "${'flows_page_record_field_form_description' | t}",
|
|
173
173
|
"name": "description",
|
|
174
174
|
"id": "u:84af37d53da4",
|
|
175
175
|
"minRows": 3,
|
|
@@ -177,7 +177,7 @@
|
|
|
177
177
|
},
|
|
178
178
|
{
|
|
179
179
|
"type": "textarea",
|
|
180
|
-
"label": "
|
|
180
|
+
"label": "${'flows_page_record_field_form_name_forumla' | t}",
|
|
181
181
|
"name": "name_forumla",
|
|
182
182
|
"id": "u:69b6536e9fd8",
|
|
183
183
|
"minRows": 3,
|
|
@@ -185,7 +185,7 @@
|
|
|
185
185
|
},
|
|
186
186
|
{
|
|
187
187
|
"type": "editor",
|
|
188
|
-
"label": "
|
|
188
|
+
"label": "${'flows_page_record_field_form_script' | t}",
|
|
189
189
|
"name": "form_script",
|
|
190
190
|
"id": "u:025f8c4f09b6",
|
|
191
191
|
"minRows": 3,
|
|
@@ -66,7 +66,10 @@
|
|
|
66
66
|
useOpenAPI: useOpenAPI,
|
|
67
67
|
id: "<%=id%>",
|
|
68
68
|
pageId: "<%=id%>",
|
|
69
|
-
hiddenDeploy: true
|
|
69
|
+
hiddenDeploy: true,
|
|
70
|
+
title: "<%=locale%>" === 'zh-CN' ? '流程表单设计器': 'Flow Form Designer',
|
|
71
|
+
saveText: "<%=locale%>" === 'zh-CN' ? '保存': 'Save',
|
|
72
|
+
deployText: "<%=locale%>" === 'zh-CN' ? '发布': 'Deploy',
|
|
70
73
|
};
|
|
71
74
|
|
|
72
75
|
let comp = document.querySelector("builder-fiddle");
|
|
@@ -35,7 +35,7 @@ router.get('/api/workflow/form_design', auth.requireAuthentication, async functi
|
|
|
35
35
|
// authToken: userSession.authToken
|
|
36
36
|
// }
|
|
37
37
|
let locale = "zh-CN";
|
|
38
|
-
if (req.query.locale
|
|
38
|
+
if (req.query.locale?.startsWith('en')) {
|
|
39
39
|
locale = "en-US";
|
|
40
40
|
} else if (req.query.locale == "zh-cn") {
|
|
41
41
|
locale = "zh-CN";
|
|
@@ -56,7 +56,8 @@ router.get('/api/workflow/form_design', auth.requireAuthentication, async functi
|
|
|
56
56
|
authToken: userSession.authToken,
|
|
57
57
|
userSession: userSession,
|
|
58
58
|
id: flow.form,
|
|
59
|
-
useOpenAPI: process.env.STEEDOS_PUBLIC_USE_OPEN_API
|
|
59
|
+
useOpenAPI: process.env.STEEDOS_PUBLIC_USE_OPEN_API,
|
|
60
|
+
locale
|
|
60
61
|
}
|
|
61
62
|
const options = {}
|
|
62
63
|
ejs.renderFile(filename, data, options, function(err, str){
|