You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by fm...@apache.org on 2019/02/07 17:00:19 UTC

[syncope] branch 2_1_X updated: [SYNCOPE-1433] disable flag during schema editing

This is an automated email from the ASF dual-hosted git repository.

fmartelli pushed a commit to branch 2_1_X
in repository https://gitbox.apache.org/repos/asf/syncope.git


The following commit(s) were added to refs/heads/2_1_X by this push:
     new 6505964  [SYNCOPE-1433] disable flag during schema editing
6505964 is described below

commit 6505964dc025f9aea1c1f8eaa82cc5e712b4f0a0
Author: fmartelli <fa...@gmail.com>
AuthorDate: Thu Feb 7 17:46:55 2019 +0100

    [SYNCOPE-1433] disable flag during schema editing
---
 .../apache/syncope/client/console/panels/PlainSchemaDetails.java   | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/PlainSchemaDetails.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/PlainSchemaDetails.java
index 310864d..c6e3c88 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/PlainSchemaDetails.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/PlainSchemaDetails.java
@@ -74,8 +74,10 @@ public class PlainSchemaDetails extends AbstractSchemaDetailsPanel {
 
         type = new AjaxDropDownChoicePanel<>("type", getString("type"), new PropertyModel<>(schemaTO, "type"));
 
+        boolean isCreate = schemaTO == null || schemaTO.getKey() == null || schemaTO.getKey().isEmpty();
+
         type.setChoices(Arrays.asList(AttrSchemaType.values()));
-        type.setEnabled(schemaTO == null || schemaTO.getKey() == null || schemaTO.getKey().isEmpty());
+        type.setEnabled(isCreate);
         type.addRequiredLabel();
         add(type);
 
@@ -287,7 +289,8 @@ public class PlainSchemaDetails extends AbstractSchemaDetailsPanel {
                 "readonly", getString("readonly"), new PropertyModel<>(schemaTO, "readonly")));
 
         add(new AjaxCheckBoxPanel("uniqueConstraint",
-                getString("uniqueConstraint"), new PropertyModel<>(schemaTO, "uniqueConstraint")));
+                getString("uniqueConstraint"), new PropertyModel<>(schemaTO, "uniqueConstraint")).
+                setEnabled(isCreate));
     }
 
     private void showHide(final PlainSchemaTO schema, final AjaxDropDownChoicePanel<AttrSchemaType> type,