Search in sources :

Example 1 with ParticipantIdentifierSchemeSelect

use of com.helger.peppol.ui.select.ParticipantIdentifierSchemeSelect in project peppol-practical by phax.

the class PagePublicToolsTestEndpoints method showInputForm.

@Override
protected void showInputForm(@Nonnull final WebPageExecutionContext aWPEC, @Nullable final TestEndpoint aSelectedObject, @Nonnull final BootstrapForm aForm, final boolean bFormSubmitted, @Nonnull final EWebPageFormAction eFormAction, @Nonnull final FormErrorList aFormErrors) {
    final Locale aDisplayLocale = aWPEC.getDisplayLocale();
    final BootstrapForm aRealForm = aForm;
    aRealForm.setLeft(3);
    aRealForm.addFormGroup(new BootstrapFormGroup().setLabelMandatory("Company name").setCtrl(new HCEdit(new RequestField(FIELD_COMPANY_NAME, aSelectedObject == null ? null : aSelectedObject.getCompanyName()))).setHelpText("The name of the company operating the test AccessPoint").setErrorList(aFormErrors.getListOfField(FIELD_COMPANY_NAME)));
    aRealForm.addFormGroup(new BootstrapFormGroup().setLabel("Contact person").setCtrl(new HCEdit(new RequestField(FIELD_CONTACT_PERSON, aSelectedObject == null ? null : aSelectedObject.getContactPerson()))).setHelpText("The contact person being in charge of the test endpoint. This field is free text and may contain an optional email address.").setErrorList(aFormErrors.getListOfField(FIELD_CONTACT_PERSON)));
    aRealForm.addFormGroup(new BootstrapFormGroup().setLabelMandatory("Identifier issuing agency").setCtrl(new ParticipantIdentifierSchemeSelect(new RequestField(FIELD_PARTICIPANT_ID_ISSUER, aSelectedObject == null ? null : aSelectedObject.getParticipantIDIssuer()), aDisplayLocale)).setErrorList(aFormErrors.getListOfField(FIELD_PARTICIPANT_ID_ISSUER)));
    aRealForm.addFormGroup(new BootstrapFormGroup().setLabelMandatory("Identifier value").setCtrl(new HCEdit(new RequestField(FIELD_PARTICIPANT_ID_VALUE, aSelectedObject == null ? null : aSelectedObject.getParticipantIDValue()))).setErrorList(aFormErrors.getListOfField(FIELD_PARTICIPANT_ID_VALUE)));
    aRealForm.addFormGroup(new BootstrapFormGroup().setLabelMandatory("Transport profile").setCtrl(new SMPTransportProfileSelect(new RequestField(FIELD_TRANSPORT_PROFILE, aSelectedObject == null ? null : aSelectedObject.getTransportProfile().getID()), aDisplayLocale)).setErrorList(aFormErrors.getListOfField(FIELD_TRANSPORT_PROFILE)));
    aRealForm.addFormGroup(new BootstrapFormGroup().setLabelMandatory("SML").setCtrl(new SMLConfigurationSelect(new RequestField(FIELD_SML, aSelectedObject == null ? null : aSelectedObject.getSML().getID()), false)).setErrorList(aFormErrors.getListOfField(FIELD_SML)));
}
Also used : Locale(java.util.Locale) HCEdit(com.helger.html.hc.html.forms.HCEdit) SMLConfigurationSelect(com.helger.peppol.ui.select.SMLConfigurationSelect) SMPTransportProfileSelect(com.helger.peppol.ui.select.SMPTransportProfileSelect) BootstrapFormGroup(com.helger.photon.bootstrap4.form.BootstrapFormGroup) BootstrapForm(com.helger.photon.bootstrap4.form.BootstrapForm) RequestField(com.helger.photon.core.form.RequestField) ParticipantIdentifierSchemeSelect(com.helger.peppol.ui.select.ParticipantIdentifierSchemeSelect)

Aggregations

HCEdit (com.helger.html.hc.html.forms.HCEdit)1 ParticipantIdentifierSchemeSelect (com.helger.peppol.ui.select.ParticipantIdentifierSchemeSelect)1 SMLConfigurationSelect (com.helger.peppol.ui.select.SMLConfigurationSelect)1 SMPTransportProfileSelect (com.helger.peppol.ui.select.SMPTransportProfileSelect)1 BootstrapForm (com.helger.photon.bootstrap4.form.BootstrapForm)1 BootstrapFormGroup (com.helger.photon.bootstrap4.form.BootstrapFormGroup)1 RequestField (com.helger.photon.core.form.RequestField)1 Locale (java.util.Locale)1