syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andreapatrice...@apache.org
Subject syncope git commit: [SYNCOPE-1215] plus and minus buttons of multivalue attributes disabled of schema is readonly
Date Thu, 28 Sep 2017 09:41:12 GMT
Repository: syncope
Updated Branches:
  refs/heads/2_0_X ee7ddd4b9 -> 2c0fc64a2


[SYNCOPE-1215] plus and minus buttons of multivalue attributes disabled of schema is readonly


Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/2c0fc64a
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/2c0fc64a
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/2c0fc64a

Branch: refs/heads/2_0_X
Commit: 2c0fc64a22f0c82c4c8ce5151be5555ae3d22fc3
Parents: ee7ddd4
Author: Andrea Patricelli <andreapatricelli@apache.org>
Authored: Thu Sep 28 11:35:27 2017 +0200
Committer: Andrea Patricelli <andreapatricelli@apache.org>
Committed: Thu Sep 28 11:35:27 2017 +0200

----------------------------------------------------------------------
 .../console/wicket/markup/html/form/AbstractMultiPanel.java     | 5 +++++
 .../apache/syncope/client/console/wizards/any/PlainAttrs.java   | 2 ++
 2 files changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/2c0fc64a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AbstractMultiPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AbstractMultiPanel.java
b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AbstractMultiPanel.java
index 19c7cdf..19f112b 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AbstractMultiPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AbstractMultiPanel.java
@@ -193,4 +193,9 @@ public abstract class AbstractMultiPanel<INNER> extends AbstractFieldPanel<List<
     protected void clearInput(final Panel panel) {
         // do nothing by default
     }
+
+    public AbstractFieldPanel<List<INNER>> setReadOnly(final boolean readOnly)
{
+        container.setEnabled(!readOnly);
+        return this;
+    }
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/2c0fc64a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/PlainAttrs.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/PlainAttrs.java
b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/PlainAttrs.java
index 9348589..bc9498c 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/PlainAttrs.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/PlainAttrs.java
@@ -373,6 +373,8 @@ public class PlainAttrs extends AbstractAttrs<PlainSchemaTO> {
                                 "panel",
                                 attrTO.getSchema(),
                                 FieldPanel.class.cast(panel));
+                        // SYNCOPE-1215 the entire multifield panel must be readonly, not
only its field
+                        ((MultiFieldPanel) panel).setReadOnly(availableSchemas.get(attrTO.getSchema()).isReadonly());
                     }
                     item.add(panel);
 


Mime
View raw message