Browse Source

Made Multi-image variables editable

Kenric Nugteren 1 month ago
parent
commit
d639703b0b

+ 7 - 1
InABox.Core/DigitalForms/Layouts/Fields/DFLayoutMultiImage/DFLayoutMultiImageProperties.cs

@@ -9,10 +9,14 @@ namespace InABox.Core
 
         [EditorSequence(-995)] [NullEditor] public override List<Guid>? Default { get; set; } = new List<Guid>();
         
-        [EditorSequence(100)]
+        [EditorSequence(1)]
         [CheckBoxEditor]
         public bool DisableLibrary { get; set; } = false;
 
+        [CheckBoxEditor]
+        [EditorSequence(2)]
+        public bool Editable { get; set; } = true;
+
         public override string FormatValue(DFLayoutEmbeddedMediaValues value)
         {
             return value.Present ? "Yes" : "";
@@ -53,12 +57,14 @@ namespace InABox.Core
         {
             base.LoadProperties();
             DisableLibrary = GetProperty("DisableLibrary", false);
+            Editable = GetProperty("Editable", true);
         }
 
         protected override void SaveProperties()
         {
             base.SaveProperties();
             SetProperty("DisableLibrary", DisableLibrary);
+            SetProperty("Editable", Editable);
         }
     }
 }