Repository: syncope Updated Branches: refs/heads/master c23c0d513 -> e7656e11b
[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/e7656e11 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/e7656e11 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/e7656e11 Branch: refs/heads/master Commit: e7656e11b4125f33d7fb9cde0db31288b653582f Parents: c23c0d5 Author: Andrea Patricelli <[email protected]> Authored: Thu Sep 28 11:35:27 2017 +0200 Committer: Andrea Patricelli <[email protected]> Committed: Thu Sep 28 11:41:40 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/e7656e11/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/e7656e11/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 d776b65..fc41aea 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 @@ -374,6 +374,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);
