Author: kien_nguyen
Date: 2011-05-25 02:43:27 -0400 (Wed, 25 May 2011)
New Revision: 6551
Modified:
portal/branches/branch-GTNPORTAL-1872/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIWizardPageSetInfo.java
Log:
GTNPORTAL-1899 Visible checkbox for dashboard page doesnt make sense
Modified:
portal/branches/branch-GTNPORTAL-1872/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIWizardPageSetInfo.java
===================================================================
---
portal/branches/branch-GTNPORTAL-1872/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIWizardPageSetInfo.java 2011-05-24
21:34:40 UTC (rev 6550)
+++
portal/branches/branch-GTNPORTAL-1872/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIWizardPageSetInfo.java 2011-05-25
06:43:27 UTC (rev 6551)
@@ -43,6 +43,8 @@
import org.exoplatform.webui.form.UIForm;
import org.exoplatform.webui.form.UIFormCheckBoxInput;
import org.exoplatform.webui.form.UIFormDateTimeInput;
+import org.exoplatform.webui.form.UIFormInput;
+import org.exoplatform.webui.form.UIFormInputBase;
import org.exoplatform.webui.form.UIFormStringInput;
import org.exoplatform.webui.form.validator.DateTimeValidator;
import org.exoplatform.webui.form.validator.IdentifierValidator;
@@ -96,8 +98,19 @@
.setMaxLength(255).addValidator(StringLengthValidator.class, 3, 120));
addUIFormInput(uiVisibleCheck.setChecked(true));
addUIFormInput(uiDateInputCheck);
- addUIFormInput(new UIFormDateTimeInput(START_PUBLICATION_DATE, null,
null).addValidator(DateTimeValidator.class));
- addUIFormInput(new UIFormDateTimeInput(END_PUBLICATION_DATE, null,
null).addValidator(DateTimeValidator.class));
+ UIFormInputBase<String> startPubDateInput = new
UIFormDateTimeInput(START_PUBLICATION_DATE, null,
null).addValidator(DateTimeValidator.class);
+ UIFormInputBase<String> endPubDateInput = new
UIFormDateTimeInput(END_PUBLICATION_DATE, null,
null).addValidator(DateTimeValidator.class);
+ addUIFormInput(startPubDateInput);
+ addUIFormInput(endPubDateInput);
+
+ boolean isUserNav =
Util.getUIPortal().getSelectedNavigation().getOwnerType().equals(PortalConfig.USER_TYPE);
+ if (isUserNav)
+ {
+ uiVisibleCheck.setRendered(false);
+ uiDateInputCheck.setRendered(false);
+ startPubDateInput.setRendered(false);
+ endPubDateInput.setRendered(false);
+ }
}
public void setEditMode() throws Exception