本文介绍了终止后中间保存和只读的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们要求用户在终止表单输入后,只能看到数据;只有授权用户才能修改数据.
为此,我们使用以下权限,它可以顺利运行:

We have the requirement that users, after terminating the input of a form, can only see the data; only authorized users can modify the data.
For this purpose we use the following permissions and it works smoothly:

现在提出了第二个要求.
用户希望有可能在第二个时刻完成表单的输入,这样他们就不必在按下新按钮后在按下保存按钮之前完全填写表单.
因为有些表格很大,他们可能急着赶公车,或者他们可能需要询问目前无法联系的其他人以获得答案.

Now raised a second requirement.
The users wish the possibility to finish the input of the form in a second moment, so that they don't have to fill in the form entirely after pressing the new button, before they can push the save button.
Because some forms are large and maybe they are in a hurry to catch the bus, or maybe for some answer they have to ask someone else not contactable at the moment.

这个想法是添加保存草稿按钮.
第一次保存草稿就OK了;消息是草稿保存成功!".
但是第二次保存抱怨:

The idea was to add the save-draft button.
The first save-draft is OK; the message is "Draft saved successfully!".
But the second save complains:

似乎权限不区分savedraft-save,因此在草稿保存后表单数据也是只读的.

It seems that the permissions don't differentiate between save and draft-save, so that also after a draft-save the form data is read-only.

我必须实现这两个目标的可能性有哪些?

Which possibilities I have to achive this two goals?

非常感谢.

推荐答案

save-draft 过程 非常像常规保存(save-final 过程),除了它允许用户保存数据,即使某些字段的值无效.所以,确实,从权限的角度来看,save-finalsave-draft 是一样的.

The save-draft process is very much like the regular save (save-final process), except that it lets users save data even if the value of some fields is invalid. So, indeed, from the perspective of the permissions, save-final and save-draft are the same.

您真正需要的是以下能力:

What you would really need is the ability for:

  1. 将表单的阶段与数据一起保存的过程.在您的情况下,阶段可以是正在进行中"或已提交".
  2. 能够依赖于该阶段的权限,因此您可以说如果该阶段正在进行中,用户可以编辑自己的数据,但只有在该阶段提交后才能查看".
  1. A process to save the stage of the form along with the data. In your case, the stage could be "work in progress" or "submitted".
  2. The permissions to be able to depend on that stage, so you can say "users can edit their own data if the stage is work in progress, but can only view it if the stage is submitted".

您现在可以使用隐藏字段和 xf:setvalue() 动作.但是你不能做#2.为此,您需要实现工作流功能(请参阅 RFE #2256),我们希望能够在 2018 年完成.所以,你猜对了,好消息是即将到来,但坏消息是,至少在我写这些行时,它还没有实施.

You can do #1 right now using a hidden field and an xf:setvalue() action. But you can't do #2. For that, you would need the workflow feature to be implemented (see RFE #2256), which we hope to be able to complete in 2018. So, you guessed it, the good news is that this is coming, but the bad news is, at least as I write these lines, that it isn't implemented yet.

这篇关于终止后中间保存和只读的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-03 12:51