use of org.olat.core.gui.components.form.flexible.impl.elements.FormSubmit in project OpenOLAT by OpenOLAT.
the class FileCreatorController method initForm.
@Override
protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) {
setFormTitle("filecreator.text.newfile");
// Global target directory
String path = "/ " + baseContainer.getName();
VFSContainer container = baseContainer.getParentContainer();
while (container != null) {
path = "/ " + container.getName() + " " + path;
container = container.getParentContainer();
}
uifactory.addStaticTextElement("ul.target", path, formLayout);
// Sub path, can be modified
targetSubPath = uifactory.addInlineTextElement("ul.target.child", subfolderPath, formLayout, this);
targetSubPath.setLabel("ul.target.child", null);
// The file name of the new file
fileNameElement = FormUIFactory.getInstance().addTextElement("fileName", "filecreator.filename", 50, "", formLayout);
fileNameElement.setPlaceholderKey("filecreator.filename.placeholder", null);
fileNameElement.setMandatory(true);
// Add buttons
FormLayoutContainer buttons = FormLayoutContainer.createButtonLayout("buttonGroupLayout", getTranslator());
formLayout.add(buttons);
Submit createFile = new FormSubmit("submit", "button.create");
buttons.add(createFile);
uifactory.addFormCancelButton("cancel", buttons, ureq, getWindowControl());
}
use of org.olat.core.gui.components.form.flexible.impl.elements.FormSubmit in project OpenOLAT by OpenOLAT.
the class SearchAdminForm method initForm.
@Override
protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) {
setFormTitle("search.admin.form.title");
indexInterval = uifactory.addTextElement("indexInterval", "search.admin.label.index.interval", 20, "", formLayout);
indexInterval.setRegexMatchCheck("\\d+", "error.index.interval.must.be.number");
// indexInterval.setMinValueCheck(0, "error.index.interval.must.be.number");
indexInterval.setDisplaySize(4);
blackList = uifactory.addTextAreaElement("search.admin.label.blackList", 3, 80, "", formLayout);
blackList.setExampleKey("search.admin.label.blackList.example", null);
excelFileEnabled = uifactory.addCheckboxesHorizontal("search.admin.label.enableExcel", formLayout, new String[] { "on" }, new String[] { "" });
pptFileEnabled = uifactory.addCheckboxesHorizontal("search.admin.label.enablePpt", formLayout, new String[] { "on" }, new String[] { "" });
pdfFileEnabled = uifactory.addCheckboxesHorizontal("search.admin.label.enablePdf", formLayout, new String[] { "on" }, new String[] { "" });
submit = new FormSubmit("submit", "submit");
formLayout.add(submit);
}
use of org.olat.core.gui.components.form.flexible.impl.elements.FormSubmit in project OpenOLAT by OpenOLAT.
the class FormUIFactory method addFormSubmitButton.
/**
* Add a form submit button.
*
* @param id A fix identifier for state-less behavior, must be unique or null
* @param name the button name (identifier)
* @param i18nKey The display key
* @param formItemContiner The container where to add the button
* @return the new form button
*/
public FormSubmit addFormSubmitButton(String id, String name, String i18nKey, FormItemContainer formLayout) {
FormSubmit subm = new FormSubmit(id, name, i18nKey);
formLayout.add(subm);
return subm;
}
use of org.olat.core.gui.components.form.flexible.impl.elements.FormSubmit in project OpenOLAT by OpenOLAT.
the class ChoiceController method initForm.
/**
* @see org.olat.core.gui.components.form.flexible.impl.FormBasicController#initForm(org.olat.core.gui.components.form.flexible.FormItemContainer,
* org.olat.core.gui.control.Controller, org.olat.core.gui.UserRequest)
*/
@Override
protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) {
if (singleSelection && layoutVertical) {
entrySelector = uifactory.addRadiosVertical(selectionName, null, formLayout, keysIn, translatedKeys);
} else if (singleSelection && !layoutVertical) {
entrySelector = uifactory.addRadiosHorizontal(selectionName, null, formLayout, keysIn, translatedKeys);
} else if (!singleSelection && layoutVertical) {
entrySelector = uifactory.addCheckboxesVertical(selectionName, null, formLayout, keysIn, translatedKeys, 1);
} else if (!singleSelection && !layoutVertical) {
entrySelector = uifactory.addCheckboxesHorizontal(selectionName, null, formLayout, keysIn, translatedKeys);
}
// add Submit
Submit subm = new FormSubmit("subm", submitI18nKey);
formLayout.add(subm);
}
use of org.olat.core.gui.components.form.flexible.impl.elements.FormSubmit in project OpenOLAT by OpenOLAT.
the class ChooseScormRunModeForm method initForm.
@Override
protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) {
mode = uifactory.addRadiosVertical("mode", null, formLayout, modeKeys, modeValues);
mode.select(ScormConstants.SCORM_MODE_NORMAL, true);
mode.setVisible(showOptions && !readOnly);
mode.setElementCssClass("o_scorm_mode");
String startLabel = readOnly ? "form.scormmode.browse" : "command.showscorm";
FormSubmit showButton = uifactory.addFormSubmitButton("command.showscorm", startLabel, formLayout);
showButton.setElementCssClass("o_sel_start_scorm");
}
Aggregations