Package org.olat.core.gui.components.form.flexible.impl

Examples of org.olat.core.gui.components.form.flexible.impl.FormLayoutContainer


    description = uifactory.addRichTextElementForStringDataMinimalistic("cif.description", "cif.description",
        (entry.getDescription() != null ? entry.getDescription() : " "), 10, -1, false, formLayout, ureq
            .getUserSession(), getWindowControl());
    description.setMandatory(true);
    //
    FormLayoutContainer buttonContainer = FormLayoutContainer.createButtonLayout("buttonContainer", getTranslator());
    formLayout.add("buttonContainer", buttonContainer);

    uifactory.addFormSubmitButton("submit", buttonContainer);
    if (!isSubWorkflow) {
      uifactory.addFormCancelButton("cancel", buttonContainer, ureq, getWindowControl());
View Full Code Here


        //normally not possible but...
        numOfVersions.select("10", true);
      }
    }
   
    final FormLayoutContainer buttonLayout = FormLayoutContainer.createButtonLayout("buttonLayout", getTranslator());
    formLayout.add(buttonLayout);
    uifactory.addFormSubmitButton("save", buttonLayout);
  }
View Full Code Here

      MultiUserEvent mue = new LanguageChangedEvent(loc, ureq);
      setLocale(loc, true);
      ureq.getUserSession().setLocale(loc);
      ureq.getUserSession().putEntry(LocaleNegotiator.NEGOTIATED_LOCALE, loc);
     
      FormLayoutContainer langLayout = (FormLayoutContainer)flc.getFormComponent("langLayout");
      langLayout.contextPut("languageCode", loc.toString());
      langLayout.contextPut("selectLanguage", translate("select.language"));
     
      if(fireStandardEvent) {
        fireEvent(ureq, mue);
      } else {
        OLATResourceable wrappedLocale = OresHelper.createOLATResourceableType(Locale.class);
View Full Code Here

    String[] langValues = StringHelper.getMapValuesAsStringArray(languages);
    ArrayHelper.sort(langKeys, langValues, false, true, false);
    // Build css classes for reference languages
    String[] langCssClasses = I18nManager.getInstance().createLanguageFlagsCssClasses(langKeys, "b_with_small_icon_left");
   
    final FormLayoutContainer langLayout = FormLayoutContainer.createCustomFormLayout("langLayout", getTranslator(), velocity_root + "/langchooser.html");
    formLayout.add(langLayout);
    langs = uifactory.addDropdownSingleselect("select.language", langLayout, langKeys, langValues, langCssClasses);
    langs.addActionListener(this, FormEvent.ONCHANGE);
    langs.select(curlang, true);
    Locale loc = I18nManager.getInstance().getLocaleOrDefault(curlang);
    langLayout.contextPut("languageCode", loc.toString());
    langLayout.contextPut("selectLanguage", translate("select.language"));
   
    final FormLayoutContainer buttonLayout = FormLayoutContainer.createButtonLayout("buttonLayout", getTranslator());
    formLayout.add(buttonLayout);
    uifactory.addFormSubmitButton("submit", buttonLayout);
    uifactory.addFormCancelButton("cancel", buttonLayout, ureq, getWindowControl());
  }
View Full Code Here

    if (readOnly) {
      // Disable when set to read only
      formLayout.setEnabled(!readOnly);
    } else {
      // Create submit and cancel buttons
      final FormLayoutContainer buttonLayout = FormLayoutContainer.createButtonLayout("buttonLayout", getTranslator());
      formLayout.add(buttonLayout);
      uifactory.addFormSubmitButton(DCL_ACCEPT, NLS_DISCLAIMER_OK, buttonLayout);
      uifactory.addFormCancelButton(NLS_DISCLAIMER_NOK, buttonLayout, ureq, getWindowControl());     
    }
  }
View Full Code Here

    initForm(ureq);   
  }
 
  @Override
  protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) {
    FormLayoutContainer horizontalL = FormLayoutContainer.createHorizontalFormLayout("horiz", getTranslator());
    formLayout.add(horizontalL);
    gotoDate = uifactory.addDateChooser("goto",null, "",horizontalL);//null because no label is desired.
    gotoDate.setMandatory(false);
    gotoDate.setDate(new Date());
    gotoDateLink = new FormLinkImpl("cal.search.gotodate.button");
    horizontalL.add(gotoDateLink);
 
View Full Code Here

    disabledRichTextElement = uifactory.addRichTextElementForStringData("guidemo.form.richtext.simple3", "guidemo.form.richtext.simple", "this <i>is</i> <b>disabled</b>", -1, -1, true, false, null, null, formLayout, ureq.getUserSession(), getWindowControl());
    disabledRichTextElement.setEnabled(false);

    // Button layout
    final FormLayoutContainer buttonLayout = FormLayoutContainer.createButtonLayout("button_layout", getTranslator());
    formLayout.add(buttonLayout);

    // Submit and cancel buttons (without effect)
    uifactory.addFormSubmitButton("advanced_form.submit", buttonLayout);
    uifactory.addFormLink("advanced_form.cancel", buttonLayout, Link.BUTTON);
View Full Code Here

   */
  protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) {
    setFormTitle("fieldset.legend.feedback");
    setFormContextHelp("org.olat.ims.qti.editor", "qed-feedback.html", "help.hover.qti-feedback");

    FormLayoutContainer switchLayout = FormLayoutContainer.createDefaultFormLayout("switchLayout", getTranslator());
    overallFeedbackLayout = FormLayoutContainer.createDefaultFormLayout("overallFeedbackLayout", getTranslator());
    responseLevelHintsLayout = FormLayoutContainer.createCustomFormLayout("responseLevelHintsLayout", getTranslator(), Util
        .getPackageVelocityRoot(this.getClass())
        + "/response_level_feedback.html");
    // add the layouts to the custom layout
    formLayout.add(switchLayout);
    formLayout.add(overallFeedbackLayout);
    formLayout.add(responseLevelHintsLayout);

    String[] yesNoKeys, yesNoValues;
    yesNoKeys = new String[] { YES, NO };
    yesNoValues = new String[] { translate(YES), translate(NO) };

    feedbackSwitch = uifactory.addRadiosHorizontal("feedbackswitch", switchLayout, yesNoKeys, yesNoValues);
    feedbackSwitch.addActionListener(this, FormEvent.ONCLICK);
    if (control.isFeedback()) {
      feedbackSwitch.select(yesNoKeys[0], true);
    } else {
      // defaults to 'not showing feedback'
      feedbackSwitch.select(yesNoKeys[1], true);
    }

    responseLevelHintsLayout.contextPut("mediaBaseUrl", mediaBaseUrl);

    masteryMat = QTIEditHelper.getFeedbackMasteryMaterial(item);
    masteryMat = masteryMat == null ? new Material() : masteryMat;
    failureMat = QTIEditHelper.getFeedbackFailMaterial(item);
    failureMat = failureMat == null ? new Material() : failureMat;

    VFSContainer baseContainer = qtiPackage.getBaseDir();

    // Mastery Layout
    FormLayoutContainer masteryEditLayout = FormLayoutContainer.createCustomFormLayout("masteryEditLayout", getTranslator(), Util
        .getPackageVelocityRoot(this.getClass())
        + "/rich_text_and_edit_link.html");
    masteryEditLayout.setLabel("item_feedback_mastery", null);
    overallFeedbackLayout.add(masteryEditLayout);
    RichTextElement masteryFeedback = uifactory.addRichTextElementForStringData("richTextElement", "item_feedback_mastery", masteryMat
        .renderAsHtml(mediaBaseUrl), 4, -1, true, true, baseContainer, null, masteryEditLayout, ureq.getUserSession(), getWindowControl());
    FormLink editLink = uifactory.addFormLink("editLink", masteryEditLayout, Link.NONTRANSLATED + Link.LINK_CUSTOM_CSS);
    ((Link) editLink.getComponent()).setCustomDisplayText("");
    ((Link) editLink.getComponent()).setCustomEnabledLinkCSS("b_small_icon b_edit_icon qti_edit_link");
    registerFeedbackElement(masteryMat, masteryFeedback, editLink);

    // One Failure Layout
    FormLayoutContainer failureEditLayout = FormLayoutContainer.createCustomFormLayout("failureEditLayout", getTranslator(), Util
        .getPackageVelocityRoot(this.getClass())
        + "/rich_text_and_edit_link.html");
    failureEditLayout.setLabel("item_feedback_fail", null);
    overallFeedbackLayout.add(failureEditLayout);
    RichTextElement failureFeedback = uifactory.addRichTextElementForStringData("richTextElement", "item_feedback_fail", failureMat
        .renderAsHtml(mediaBaseUrl), 4, -1, true, true, baseContainer, null, failureEditLayout, ureq.getUserSession(), getWindowControl());
    failureFeedback.setLabel("item_feedback_fail", null);
    FormLink failureLink = uifactory.addFormLink("editLink", failureEditLayout, Link.NONTRANSLATED + Link.LINK_CUSTOM_CSS);
View Full Code Here

   * @param formItemsFactory
   * @param form
   */
  private void addSublayout(FormItemContainer form) {
    // Default Sublayout
    final FormLayoutContainer subLayout = FormLayoutContainer.createDefaultFormLayout("why_not_form", getTranslator());
    // This doesn't work for some reason
    // subLayout.setVisible(false);
    form.add(subLayout);

    // Add a text element
View Full Code Here

    String[] values = { "HTML", "PDF", "Word", "Excel", "PowerPoint", translate("cpfileuploadcontroller.form.all.types") };
    checkboxes = uifactory.addCheckboxesVertical("checkboxes", "cpfileuploadcontroller.form.file.types", this.flc, keys, values, null, 1);
    checkboxes.setVisible(false);

    // Submit and cancel buttons
    final FormLayoutContainer buttonLayout = FormLayoutContainer.createButtonLayout("button_layout", getTranslator());
    this.flc.add(buttonLayout);
    uifactory.addFormSubmitButton("submit", "cpfileuploadcontroller.import.button", buttonLayout);
    cancelButton = uifactory.addFormLink("cancel", buttonLayout, Link.BUTTON);
  }
View Full Code Here

TOP

Related Classes of org.olat.core.gui.components.form.flexible.impl.FormLayoutContainer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.