Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: Save button was not visible 2022.4 #1765

Merged
merged 2 commits into from Jul 31, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions backend/Origam.Server/Session Stores/FormSessionStore.cs
Expand Up @@ -518,6 +518,14 @@ public override XmlDocument GetFormXml()
XmlDocument formXml = OrigamEngine.ModelXmlBuilders.FormXmlBuilder.GetXml(new Guid(this.Request.ObjectId)).Document;
XmlNodeList list = formXml.SelectNodes("/Window");
XmlElement windowElement = list[0] as XmlElement;
// The SuppressSave attribute causes the Save button to disappear.
// It should not be set to true if there is at least one editable field on the screen. The final result can be
// determined only after the whole screen xml has been created.
if (windowElement.GetAttribute("SuppressSave") == "true" &&
formXml.SelectNodes("//Property[@ReadOnly='false']")?.Count > 0)
{
windowElement.SetAttribute("SuppressSave", "false");
}
if (windowElement.GetAttribute("SuppressSave") == "true")
{
this.SuppressSave = true;
Expand Down