use of org.olat.core.gui.components.form.flexible.FormItemContainer in project openolat by klemens.
the class TranslationToolStartCrumbController method initSearchItemsElements.
private void initSearchItemsElements(FormUIFactory formFactory, FormItemContainer formLayout, String[] bundlesKeys, String[] bundlesValues) {
FormItemContainer searchLayoutContainer = FormLayoutContainer.createDefaultFormLayout("searchLayoutContainer", getTranslator());
formLayout.add(searchLayoutContainer);
// Add search input field
searchInput = formFactory.addTextElement("searchInput", "start.search.input", 100, "", searchLayoutContainer);
// Add search selecton for searching in keys or values
String[] searchKeyValueKeys = new String[] { KEYS_KEY, KEYS_VALUE };
String[] searchKeyValueValues = new String[] { translate("generic.key"), translate("generic.value") };
searchKeyValueSelection = formFactory.addRadiosHorizontal("searchKeyValueSelection", "start.search.in", searchLayoutContainer, searchKeyValueKeys, searchKeyValueValues);
searchKeyValueSelection.select(KEYS_VALUE, true);
// Add search selecton for reference or target search
String[] searchReferenceTargetKeys = new String[] { KEYS_REFERENCE, KEYS_TARGET };
String[] searchReferenceTargetValues;
if (customizingMode) {
searchReferenceTargetValues = new String[] { translate("generic.customize.lang.reference"), translate("generic.customize.lang.target") };
} else {
searchReferenceTargetValues = new String[] { translate("generic.lang.reference"), translate("generic.lang.target") };
}
searchReferenceTargetSelection = formFactory.addRadiosHorizontal("searchReferenceTargetSelection", "start.search.in", searchLayoutContainer, searchReferenceTargetKeys, searchReferenceTargetValues);
searchReferenceTargetSelection.select(KEYS_TARGET, true);
// Add search bundles selector : reuse keys from above
searchBundlesSelection = formFactory.addDropdownSingleselect("searchBundlesSelection", searchLayoutContainer, bundlesKeys, bundlesValues, null);
searchBundlesSelection.setLabel("generic.limit.bundles", null);
searchBundlesSelection.addActionListener(FormEvent.ONCHANGE);
searchBundlesSelection.select(ALL_BUNDLES_IDENTIFYER, true);
// Add search bundles children switch
searchBundlesIncludeBundlesChildrenSwitch = formFactory.addCheckboxesHorizontal("searchBundlesIncludeBundlesChildrenSwitch", "generic.limit.bundles.includeChildren", searchLayoutContainer, new String[] { KEYS_ENABLED }, new String[] { KEYS_EMPTY });
searchBundlesIncludeBundlesChildrenSwitch.select(KEYS_ENABLED, true);
searchBundlesIncludeBundlesChildrenSwitch.addActionListener(FormEvent.ONCLICK);
searchBundlesIncludeBundlesChildrenSwitch.setEnabled(false);
// Add priority sort switch
searchBundlesPrioritySortSwitch = formFactory.addCheckboxesHorizontal("searchBundlesPrioritySortSwitch", "generic.sort.by.priority", searchLayoutContainer, new String[] { KEYS_ENABLED }, new String[] { KEYS_EMPTY });
searchBundlesPrioritySortSwitch.select(KEYS_ENABLED, true);
searchBundlesPrioritySortSwitch.addActionListener(FormEvent.ONCLICK);
formLayout.add(searchBundlesPrioritySortSwitch);
// Add button to trigger search
FormItemContainer searchButtonLayoutContainer = FormLayoutContainer.createButtonLayout("searchButtonLayoutContainer", getTranslator());
searchLayoutContainer.add(searchButtonLayoutContainer);
searchListButton = uifactory.addFormLink("searchListButton", "generic.listButton", null, searchButtonLayoutContainer, Link.BUTTON);
searchTranslateButton = uifactory.addFormLink("searchTranslateButton", "generic.translateButton", null, searchButtonLayoutContainer, Link.BUTTON);
}
use of org.olat.core.gui.components.form.flexible.FormItemContainer in project openolat by klemens.
the class CPMetadataEditController method initForm.
@Override
protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) {
formLayout.setElementCssClass("o_sel_cp_metadata");
// title-field
String titleString = page.getTitle();
title = uifactory.addTextElement("title", "cpmd.flexi.title", 256, titleString, formLayout);
title.setElementCssClass("o_sel_cp_title");
title.setDisplaySize(32);
title.setMandatory(true);
title.setNotEmptyCheck("cpmd.flexi.mustbefilled");
FormItemContainer buttonContainer = FormLayoutContainer.createButtonLayout("buttonContainer", getTranslator());
formLayout.add(buttonContainer);
uifactory.addFormSubmitButton("save", buttonContainer);
uifactory.addFormCancelButton("cancel", buttonContainer, ureq, getWindowControl());
}
use of org.olat.core.gui.components.form.flexible.FormItemContainer in project openolat by klemens.
the class OAuthAdminController method initCustomProviders.
private void initCustomProviders() {
// remove old ones
for (ConfigurableProviderWrapper providerWrapper : providerWrappers) {
FormItemContainer layoutCont = providerWrapper.getLayoutCont();
customProvidersCont.remove(layoutCont);
}
providerWrappers.clear();
List<OAuthSPI> configurableSpies = oauthModule.getAllConfigurableSPIs();
for (OAuthSPI configurableSpi : configurableSpies) {
if (configurableSpi instanceof OpenIdConnectFullConfigurableProvider) {
ConfigurableProviderWrapper wrapper = initOpenIDConnectIFFullConfigurableProviders(customProvidersCont, (OpenIdConnectFullConfigurableProvider) configurableSpi);
if (wrapper != null) {
providerWrappers.add(wrapper);
}
}
}
}
Aggregations