diff --git a/src/main/java/org/gcube/portlets/user/td/informationwidget/client/TabularResourceProperties.java b/src/main/java/org/gcube/portlets/user/td/informationwidget/client/TabularResourceProperties.java index e9e8755..af66c74 100644 --- a/src/main/java/org/gcube/portlets/user/td/informationwidget/client/TabularResourceProperties.java +++ b/src/main/java/org/gcube/portlets/user/td/informationwidget/client/TabularResourceProperties.java @@ -403,9 +403,11 @@ public class TabularResourceProperties extends FramedPanel { if (tabResource.isFinalized()) { finalizedField.setReadOnly(true); finalizedField.setValue(true); + saveButton.setEnabled(false); } else { finalizedField.setReadOnly(false); finalizedField.setValue(false); + saveButton.setEnabled(true); } ArrayList contacts = tabResource.getContacts(); @@ -632,7 +634,13 @@ public class TabularResourceProperties extends FramedPanel { } } - + + if(vFrom!=null && vUntilTo!=null && vFrom.compareTo(vUntilTo)>0){ + Log.debug("Attention Valid From field is higher than Valid Until To field"); + UtilsGXT3.info("Attention", "Valid From field is higher than Valid Until To field"); + return; + } + if (comboLicences.getCurrentValue() != null && comboLicences.getCurrentValue().getLicence() != null && !comboLicences.getCurrentValue().getLicence().isEmpty()) { @@ -680,6 +688,11 @@ public class TabularResourceProperties extends FramedPanel { if (finalizedField.getValue()) { finalizedField.setReadOnly(true); finalizedField.setValue(true); + saveButton.setEnabled(false); + } else { + finalizedField.setReadOnly(false); + finalizedField.setValue(false); + saveButton.setEnabled(true); } DataViewRequestEvent dataViewRequestEvent=new DataViewRequestEvent(); TabularResourceDataView tabularResouceDataView=new TabularResourceDataView(tabResource.getTrId(),tabResource.getName());