use of com.helger.html.hc.html.forms.HCCheckBox in project phoss-smp by phax.
the class PageSecureSMPSettings method showInputForm.
@Override
protected void showInputForm(@Nonnull final WebPageExecutionContext aWPEC, @Nonnull final ISMPSettings aObject, @Nonnull final BootstrapForm aForm, @Nonnull final EWebPageSimpleFormAction eSimpleFormAction, @Nonnull final FormErrorList aFormErrors) {
final String sDirectoryName = SMPWebAppConfiguration.getDirectoryName();
final Locale aDisplayLocale = aWPEC.getDisplayLocale();
aForm.setLeft(3);
aForm.addChild(getUIHandler().createDataGroupHeader("REST API"));
aForm.addFormGroup(new BootstrapFormGroup().setLabel("REST writable API disabled?").setCtrl(new HCCheckBox(new RequestFieldBoolean(FIELD_SMP_REST_WRITABLE_API_DISABLED, aObject.isRESTWritableAPIDisabled()))).setHelpText("If this checkbox is checked, all non-standard writing REST APIs are disabled.").setErrorList(aFormErrors.getListOfField(FIELD_SMP_REST_WRITABLE_API_DISABLED)));
aForm.addChild(getUIHandler().createDataGroupHeader("SMK/SML"));
aForm.addFormGroup(new BootstrapFormGroup().setLabel("SML connection required?").setCtrl(new HCCheckBox(new RequestFieldBoolean(FIELD_SML_REQUIRED, aObject.isSMLRequired()))).setHelpText("If this checkbox is checked, warnings are emitted if the SML connection is not enabled.").setErrorList(aFormErrors.getListOfField(FIELD_SML_REQUIRED)));
aForm.addFormGroup(new BootstrapFormGroup().setLabel("SML connection enabled?").setCtrl(new HCCheckBox(new RequestFieldBoolean(FIELD_SML_ACTIVE, aObject.isSMLEnabled()))).setHelpText("If this checkbox is checked, service group changes are propagated to the SML.").setErrorList(aFormErrors.getListOfField(FIELD_SML_ACTIVE)));
aForm.addFormGroup(new BootstrapFormGroup().setLabel("SML configuration").setCtrl(new HCSMLSelect(new RequestField(FIELD_SML_INFO, aObject.getSMLInfoID()), aDisplayLocale, null)).setHelpText(new HCTextNode("Select the SML to operate on. The list of available configurations can be "), new HCA(aWPEC.getLinkToMenuItem(CMenuSecure.MENU_SML_CONFIGURATION)).addChild("customized"), new HCTextNode(".")).setErrorList(aFormErrors.getListOfField(FIELD_SML_INFO)));
aForm.addChild(getUIHandler().createDataGroupHeader(sDirectoryName));
aForm.addFormGroup(new BootstrapFormGroup().setLabel(sDirectoryName + " connection required?").setCtrl(new HCCheckBox(new RequestFieldBoolean(FIELD_SML_DIRECTORY_INTEGRATION_REQUIRED, aObject.isDirectoryIntegrationRequired()))).setHelpText("If this checkbox is checked, warnings are emitted if the " + sDirectoryName + " connection is not enabled.").setErrorList(aFormErrors.getListOfField(FIELD_SML_DIRECTORY_INTEGRATION_REQUIRED)));
aForm.addFormGroup(new BootstrapFormGroup().setLabel(sDirectoryName + " integration enabled?").setCtrl(new HCCheckBox(new RequestFieldBoolean(FIELD_SMP_DIRECTORY_INTEGRATION_ENABLED, aObject.isDirectoryIntegrationEnabled()))).setHelpText("If this checkbox is checked, the " + sDirectoryName + " integration is enabled.").setErrorList(aFormErrors.getListOfField(FIELD_SMP_DIRECTORY_INTEGRATION_ENABLED)));
aForm.addFormGroup(new BootstrapFormGroup().setLabel(sDirectoryName + " integration automatic update?").setCtrl(new HCCheckBox(new RequestFieldBoolean(FIELD_SMP_DIRECTORY_INTEGRATION_AUTO_UPDATE, aObject.isDirectoryIntegrationAutoUpdate()))).setHelpText("If the " + sDirectoryName + " integration is enabled and this checkbox is checked, all business card creations, modifications and deletions are automatically pushed to the " + sDirectoryName + " server.").setErrorList(aFormErrors.getListOfField(FIELD_SMP_DIRECTORY_INTEGRATION_ENABLED)));
aForm.addFormGroup(new BootstrapFormGroup().setLabel(sDirectoryName + " hostname").setCtrl(new HCEdit(new RequestField(FIELD_SMP_DIRECTORY_HOSTNAME, aObject.getDirectoryHostName()))).setHelpText("The " + sDirectoryName + " host where the business cards should be published to. This URL is only used if the " + sDirectoryName + " integration (see above) is enabled.").setErrorList(aFormErrors.getListOfField(FIELD_SMP_DIRECTORY_HOSTNAME)));
}
Aggregations