Package org.olat.core.gui.formelements

Examples of org.olat.core.gui.formelements.SpacerElement


    if (fe instanceof TitleElement) {
      TitleElement te = (TitleElement) fe;
      sb.append("<h4>").append(translator.translate(te.getTitleKey())).append("</h4>");
     
    } else if (fe instanceof SpacerElement) {
      SpacerElement spe = (SpacerElement) fe;
      if (spe.isHr()) sb.append("<hr class=\"b_form_spacer\" />");
      if (spe.isBr()) sb.append("<div class=\"b_form_spacer\" />");
     
    } else {
      // real form field follow now
      sb.append("<div class=\"b_form_element_label \">");
     
View Full Code Here


    toogleVisibility = new RadioButtonGroupElement(false, "form.onlinelist", ynKeys, ynValue);
    if (imPrefs.isVisibleToOthers()) toogleVisibility.select(Boolean.TRUE.toString(), true);
    else toogleVisibility.select(Boolean.FALSE.toString(), true);
    addFormElement(ONLINELIST, toogleVisibility);
   
    SpacerElement s1 = new SpacerElement(true, false);
    addFormElement("s1", s1);
   
    // online time visible switch
    String[] onlineTimeSwitchKeys = new String[] { Boolean.TRUE.toString(), Boolean.FALSE.toString() };
    String[] onlineTimeSwitchValues = new String[] { translate("yes"), translate("no") };
    onlineTimeSwitch = new StaticSingleSelectionElement("form.onlinetime", onlineTimeSwitchKeys, onlineTimeSwitchValues);
    if (imPrefs.isOnlineTimeVisible()) onlineTimeSwitch.select(Boolean.TRUE.toString(), true);
    else onlineTimeSwitch.select(Boolean.FALSE.toString(), true);   
    addFormElement(ONLINETIME, onlineTimeSwitch);
   
    SpacerElement s2 = new SpacerElement(true, false);
    addFormElement("s2", s2);
   
    // course name visible
    String[] courseNameSwitchKeys = new String[] { Boolean.TRUE.toString(), Boolean.FALSE.toString() };
    String[] courseNameSwitchValues = new String[] { translate("yes"), translate("no") };
    courseNameSwitch = new StaticSingleSelectionElement("form.coursename", courseNameSwitchKeys, courseNameSwitchValues);
    if (imPrefs.isAwarenessVisible()) courseNameSwitch.select(Boolean.TRUE.toString(), true);
    else courseNameSwitch.select(Boolean.FALSE.toString(), true);
    addFormElement(COURSENAME, courseNameSwitch);
   
    SpacerElement s3 = new SpacerElement(true, false);
    addFormElement("s3", s3);
   
    // rules
    VisibilityDependsOnSelectionRule rule;
View Full Code Here

        if (isOLATAdmin || uLogV)
            addFormElement("logUser", logUser);
        if (isOLATAdmin || sLogV)
            addFormElement("logStat", logStat);
       
        addFormElement("spacer1", new SpacerElement());
       
        this.beginDate = new DateElement("logfilechooserform.begindate", locale);
        this.beginDate.setExample(Formatter.getInstance(locale).formatDate(new Date()));
        addFormElement("startdate", this.beginDate);
       
View Full Code Here

    addFormElement("cal.form.end", end);
   
    allDayEvent = new CheckBoxElement("cal.form.allday", event.isAllDayEvent());
    addFormElement("cal.form.allday", allDayEvent);

    spacer = new SpacerElement(true, false);
    addFormElement("spacer1", spacer);
    // recurrence
    String currentRecur = CalendarUtils.getRecurrence(event.getRecurrenceRule());
    VisibilityDependsOnSelectionRule rule;
    String[] keysRecurrence = new String[] {
View Full Code Here

    keys = new String[] { "1", "2", "3", "4" };
    lables = new String[] { "square", "circle", "rectangle", "triangle" };
    StaticMultipleSelectionElement checkbox = new StaticMultipleSelectionElement("guidemo.form.checkbox", keys, lables, true);
    addFormElement("checkbox", checkbox);
   
    spacer = new SpacerElement();
    addFormElement("spacer", spacer);
   
    textarea = new TextAreaElement("guidemo.form.textarea", 10, 50);
    addFormElement("textarea", textarea);
View Full Code Here

    String fullURI = getFullURL(proto, host, port, uri, query).toString();
   
    thost = new TextElement("TUConfigForm.url", fullURI, true, 60, 255);
    thost.setExample("http://www.yourserver.com/page.html");
    addFormElement("host", thost);
    addFormElement("st", new SpacerElement(true, false));
   
    // new radio button element
    String[] selectableValues = new String[] {
        OPTION_TUNNEL_THROUGH_OLAT_INLINE,
        OPTION_TUNNEL_THROUGH_OLAT_IFRAME,
        OPTION_SHOW_IN_OLAT_IN_AN_IFRAME,
        OPTION_SHOW_IN_NEW_BROWSER_WINDOW
    };
    String[] selectableLabels = new String[] {
        translate(NLS_OPTION_TUNNEL_INLINE_LABEL),
        translate(NLS_OPTION_TUNNEL_IFRAME_LABEL),
        translate(NLS_OPTION_OLAT_IFRAME_LABEL),
        translate(NLS_OPTION_EXTERN_PAGE_LABEL)
    };
    StaticHTMLTextElement expl = new StaticHTMLTextElement(NLS_DESCRIPTION_LABEL, translate(NLS_DESCRIPTION_PREAMBLE), 32600);
    addFormElement("expl", expl);
   
    String loadedConfig = convertConfigToNewStyle(config);
    selectables = new RadioButtonGroupElement(true, NLS_DISPLAY_CONFIG_EXTERN, selectableValues, selectableLabels);
    selectables.select(loadedConfig, true);
    selectables.setNoLabel(true);
    selectables.setHTMLIsAllowed(true);
    addFormElement("selectables",  selectables);
    addFormElement("s3", new SpacerElement(false, true));

    tuser = new TextElement("TUConfigForm.user", (user == null) ? "" : user, 255);
    tpass = new PasswordElement("TUConfigForm.pass", 255);
    tpass.setValue((pass == null) ? "" : pass);
View Full Code Here

    // assessable child nodes
    scoreNodeIdents = initNodeSelectionElement("scform.scoreNodeIndents", scoreCalculator, (scoreCalculator == null ? null
        : scoreCalculator.getSumOfScoreNodes()), nodeIdentList);
    addFormElement("scoreNodeIdents", scoreNodeIdents);

    SpacerElement spacer = new SpacerElement(true, false);
    addFormElement("spacer", spacer);

    // passed configuration

    String[] passedTypeKeys = new String[] { ScoreCalculator.PASSED_TYPE_NONE, ScoreCalculator.PASSED_TYPE_CUTVALUE,
View Full Code Here

  }

  public void finishInitialization() {
    VisibilityDependsOnSelectionRule disableWhenGuestRule;
   
    SpacerElement spacer = new SpacerElement(true, false);

    if (isAnonymous != null) {
      addFormElement("isAnonymous", isAnonymous);
      addFormElement("spacer1", spacer);
      disableWhenGuestRule = new VisibilityDependsOnSelectionRule(isAnonymous, spacer, "true", false, "", true);
View Full Code Here

    for (UserPropertyHandler userPropertyHandler : userPropertyHandlers) {
      if (userPropertyHandler == null) continue;
      FormElement ui = userPropertyHandler.getFormElement(getLocale(), null, formIdentifyer, true);
      String group = userPropertyHandler.getGroup();
      if (!group.equals(currentGroup)) {
        if (currentGroup != null) addFormElement("spacer_" + group, new SpacerElement());
        currentGroup = group;
      }
      addFormElement(userPropertyHandler.getName(), ui);
    }

    // role constraint
    addFormElement("space1", new SpacerElement(true, false));
    addFormElement("title.roles", new TitleElement("search.form.title.roles"));
    admin = new CheckBoxElement("search.form.constraint.admin");
    addFormElement("admin", admin);
    author = new CheckBoxElement("search.form.constraint.author");
    addFormElement("author", author);
    groupmanager = new CheckBoxElement("search.form.constraint.groupmanager");
    addFormElement("groupmanager", groupmanager);
    usermanager = new CheckBoxElement("search.form.constraint.usermanager");
    addFormElement("usermanager", usermanager);
    oresmanager = new CheckBoxElement("search.form.constraint.oresmanager");
    addFormElement("oresmanager", oresmanager);

    // authentication constraints
    addFormElement("space2", new SpacerElement(true, false));
    addFormElement("title.auth", new TitleElement("search.form.title.authentications"));
    // take all providers from the config file
    // convention is that a translation key "search.form.constraint.auth." +
    // providerName
    // must exist. the element is stored using the name "auth." + providerName
    Collection providers = LoginModule.getAuthenticationProviders();
    Iterator iter = providers.iterator();
    while (iter.hasNext()) {
      AuthenticationProvider provider = (AuthenticationProvider) iter.next();
      if (provider.isEnabled()) {
        String providerName = provider.getName();
        CheckBoxElement authElem = new CheckBoxElement("search.form.constraint.auth." + providerName);
        addFormElement("auth." + providerName, authElem);
      }
    }
    if(WebDAVManager.getInstance().isEnabled()) {
      CheckBoxElement authElem = new CheckBoxElement("search.form.constraint.auth." + WebDAVAuthManager.PROVIDER_WEBDAV);
      addFormElement("auth." + WebDAVAuthManager.PROVIDER_WEBDAV, authElem);
    }
   
    // add additional no authentication element
    noAuth = new CheckBoxElement("search.form.constraint.auth.none");
    addFormElement("noAuth", noAuth);
    // special case login denied
    addFormElement("status", createStatusSelectionElement());

    // creation date constraints
    addFormElement("space3", new SpacerElement(true, false));
    addFormElement("title.date", new TitleElement("search.form.title.date"));
    afterDate = new DateElement("search.form.afterDate", getLocale());
    addFormElement("afterDate", afterDate);
    beforeDate = new DateElement("search.form.beforeDate", getLocale());
    addFormElement("beforeDate", beforeDate);
View Full Code Here

    //
    partips = new CheckBoxElement("form.message.chckbx.partips", config.getBooleanEntry(COEditController.CONFIG_KEY_EMAILTOPARTICIPANTS)
        .booleanValue());
    addFormElement("partips", partips);
    //
    SpacerElement s1 = new SpacerElement(true, false);
    addFormElement("s1", s1);
    //
    group = new TextElement("form.message.group", (String) config.get(COEditController.CONFIG_KEY_EMAILTOGROUPS), false, 3000);
    group.setExample(translate("form.message.example.group"));
    PopupData pd = new PopupData("popupchoosegroups" + this.hashCode(), "popupchoosegroups", "popupchoosegroups", 800, 400);
    group.setPopupData(pd);
    addFormElement(FormRenderer.JSELEMENTID +"popupchoosegroups"+this.hashCode(), group);
    //
    area = new TextElement("form.message.area", (String) config.get(COEditController.CONFIG_KEY_EMAILTOAREAS), false, 3000);
    area.setExample(translate("form.message.example.area"));
    PopupData pda = new PopupData("popupchooseareas" + this.hashCode(), "popupchooseareas", "popupchooseareas", 800, 400);
    area.setPopupData(pda);
    addFormElement(FormRenderer.JSELEMENTID +"popupchooseareas"+this.hashCode(), area);
    //
    SpacerElement s2 = new SpacerElement(true, false);
    addFormElement("s2", s2);

    this.eList = (List) config.get(COEditController.CONFIG_KEY_EMAILTOADRESSES);
    String emailToAdresses = "";
    if (eList != null) {
View Full Code Here

TOP

Related Classes of org.olat.core.gui.formelements.SpacerElement

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.