syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmarte...@apache.org
Subject [syncope] branch master updated: [SYNCOPE-1433] disable flag during schema editing
Date Thu, 07 Feb 2019 17:08:20 GMT
This is an automated email from the ASF dual-hosted git repository.

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


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

commit 7482239477327eb9e758694e94514b9f8a5e0b02
Author: fmartelli <fabio.martelli@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/idrepo/console/src/main/java/org/apache/syncope/client/console/panels/PlainSchemaDetails.java
b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/panels/PlainSchemaDetails.java
index c91e436..af555dc 100644
--- a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/panels/PlainSchemaDetails.java
+++ b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/panels/PlainSchemaDetails.java
@@ -73,8 +73,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);
 
@@ -286,7 +288,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,


Mime
View raw message