Search in sources :

Example 6 with HCCheckBox

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)));
}
Also used : Locale(java.util.Locale) HCSMLSelect(com.helger.phoss.smp.ui.secure.hc.HCSMLSelect) RequestFieldBoolean(com.helger.photon.core.form.RequestFieldBoolean) HCA(com.helger.html.hc.html.textlevel.HCA) HCEdit(com.helger.html.hc.html.forms.HCEdit) HCCheckBox(com.helger.html.hc.html.forms.HCCheckBox) BootstrapFormGroup(com.helger.photon.bootstrap4.form.BootstrapFormGroup) HCTextNode(com.helger.html.hc.impl.HCTextNode) RequestField(com.helger.photon.core.form.RequestField)

Aggregations

HCCheckBox (com.helger.html.hc.html.forms.HCCheckBox)6 BootstrapFormGroup (com.helger.photon.bootstrap4.form.BootstrapFormGroup)6 RequestField (com.helger.photon.core.form.RequestField)6 RequestFieldBoolean (com.helger.photon.core.form.RequestFieldBoolean)6 HCEdit (com.helger.html.hc.html.forms.HCEdit)5 HCTextNode (com.helger.html.hc.impl.HCTextNode)3 Locale (java.util.Locale)3 CommonsArrayList (com.helger.commons.collection.impl.CommonsArrayList)1 IErrorLevel (com.helger.commons.error.level.IErrorLevel)1 HCTextArea (com.helger.html.hc.html.forms.HCTextArea)1 HCUL (com.helger.html.hc.html.grouping.HCUL)1 HCA (com.helger.html.hc.html.textlevel.HCA)1 HCCode (com.helger.html.hc.html.textlevel.HCCode)1 HCNodeList (com.helger.html.hc.impl.HCNodeList)1 IIdentifierFactory (com.helger.peppolid.factory.IIdentifierFactory)1 ISMPBusinessCardManager (com.helger.phoss.smp.domain.businesscard.ISMPBusinessCardManager)1 ISMPServiceGroupManager (com.helger.phoss.smp.domain.servicegroup.ISMPServiceGroupManager)1 ISMPEndpoint (com.helger.phoss.smp.domain.serviceinfo.ISMPEndpoint)1 ISMPProcess (com.helger.phoss.smp.domain.serviceinfo.ISMPProcess)1 ImportActionItem (com.helger.phoss.smp.exchange.ImportActionItem)1