Search in sources :

Example 26 with FormSubmit

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());
}
Also used : FormSubmit(org.olat.core.gui.components.form.flexible.impl.elements.FormSubmit) VFSContainer(org.olat.core.util.vfs.VFSContainer) FormLayoutContainer(org.olat.core.gui.components.form.flexible.impl.FormLayoutContainer) Submit(org.olat.core.gui.components.form.flexible.elements.Submit) FormSubmit(org.olat.core.gui.components.form.flexible.impl.elements.FormSubmit)

Example 27 with FormSubmit

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);
}
Also used : FormSubmit(org.olat.core.gui.components.form.flexible.impl.elements.FormSubmit)

Example 28 with FormSubmit

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;
}
Also used : FormSubmit(org.olat.core.gui.components.form.flexible.impl.elements.FormSubmit)

Example 29 with FormSubmit

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);
}
Also used : FormSubmit(org.olat.core.gui.components.form.flexible.impl.elements.FormSubmit) Submit(org.olat.core.gui.components.form.flexible.elements.Submit) FormSubmit(org.olat.core.gui.components.form.flexible.impl.elements.FormSubmit)

Example 30 with FormSubmit

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");
}
Also used : FormSubmit(org.olat.core.gui.components.form.flexible.impl.elements.FormSubmit)

Aggregations

FormSubmit (org.olat.core.gui.components.form.flexible.impl.elements.FormSubmit)42 FormLayoutContainer (org.olat.core.gui.components.form.flexible.impl.FormLayoutContainer)16 HashSet (java.util.HashSet)4 StaticTextElement (org.olat.core.gui.components.form.flexible.elements.StaticTextElement)4 Submit (org.olat.core.gui.components.form.flexible.elements.Submit)4 VFSContainer (org.olat.core.util.vfs.VFSContainer)4 Date (java.util.Date)2 HashMap (java.util.HashMap)2 FormItem (org.olat.core.gui.components.form.flexible.FormItem)2 FormLink (org.olat.core.gui.components.form.flexible.elements.FormLink)2 RichTextElement (org.olat.core.gui.components.form.flexible.elements.RichTextElement)2 Translator (org.olat.core.gui.translator.Translator)2 BusinessControlFactory (org.olat.core.id.context.BusinessControlFactory)2 ContextEntry (org.olat.core.id.context.ContextEntry)2 Checkbox (org.olat.course.nodes.cl.model.Checkbox)2 DBCheck (org.olat.course.nodes.cl.model.DBCheck)2 DBCheckbox (org.olat.course.nodes.cl.model.DBCheckbox)2 RubricBlock (uk.ac.ed.ph.jqtiplus.node.content.variable.RubricBlock)2 TimeLimits (uk.ac.ed.ph.jqtiplus.node.test.TimeLimits)2