Package org.olat.core.gui.formelements

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


        PasswordElement pe = (PasswordElement) fe;
        renderPasswordElement(f, pe, sb);
      } else if (fe instanceof TextElement) {
        renderTextElement(f, (TextElement) fe, sb, ubu);
      } else if (fe instanceof CheckBoxElement) {
        CheckBoxElement cbe = (CheckBoxElement) fe;
        renderCheckBox(f, cbe, sb, translator);
      } else if (fe instanceof RadioButtonGroupElement) {
        RadioButtonGroupElement rbe = (RadioButtonGroupElement) fe;
        renderRadioButtonGroup(f, rbe, translator, sb);
      } else if (fe instanceof SingleSelectionElement) {
View Full Code Here


    String[] skipKeys = new String[] { Boolean.TRUE.toString(), Boolean.FALSE.toString() };
    String[] skipValues = new String[] { translate("yes"), translate("no") };
    sendMailSwitchElem = new StaticSingleSelectionElement("mailtemplateform.sendMailSwitchElem", skipKeys, skipValues);
    sendMailSwitchElem.select(Boolean.TRUE.toString(), true);
    addFormElement("sendMailSwitchElem", sendMailSwitchElem);
    ccSender = new CheckBoxElement(NLS_CONTACT_SEND_CP_FROM, true);
    addFormElement("tcpfrom", ccSender);
    String value = template.getSubjectTemplate();
    subjectElem = new TextElement("mailtemplateform.subject", value, true, 60, 128);
    addFormElement("subjectElem", subjectElem);
View Full Code Here

   * @param name  Name of the form
   */
  public VarForm(String name, Translator translator, boolean showMenu, boolean showNavButtons, String height, boolean isAssessable, int cutValue) {
    super(name, translator);

    showMenuEl = new CheckBoxElement("showmenu.label", showMenu);
    addFormElement("showmenu", showMenuEl);

    showNavButtonsEl = new CheckBoxElement("shownavbuttons.label", showNavButtons);
    addFormElement("shownavbuttons", showNavButtonsEl);

    String[] keys = new String[]{ ScormEditController.CONFIG_HEIGHT_AUTO, "460", "480",
        "500", "520", "540", "560", "580",
        "600", "620", "640", "660", "680",
        "700", "720", "730", "760", "780",
        "800", "820", "840", "860", "880",
        "900", "920", "940", "960", "980",
        "1000", "1020", "1040", "1060", "1080",
        "1100", "1120", "1140", "1160", "1180",
        "1200", "1220", "1240", "1260", "1280",
        "1300", "1320", "1340", "1360", "1380" };
    String[] values = new String[]{ translator.translate("height.auto"), "460px", "480px",
        "500px", "520px", "540px", "560px", "580px",
        "600px", "620px", "640px", "660px", "680px",
        "700px", "720px", "730px", "760px", "780px",
        "800px", "820px", "840px", "860px", "880px",
        "900px", "920px", "940px", "960px", "980px",
        "1000px", "1020px", "1040px", "1060px", "1080px",
        "1100px", "1120px", "1140px", "1160px", "1180px",
        "1200px", "1220px", "1240px", "1260px", "1280px",
        "1300px", "1320px", "1340px", "1360px", "1380px" };
   
    heightEl = new StaticSingleSelectionElement("height.label", keys, values);
    addFormElement("height", heightEl);
    // preselect given height. Check first if this height is selectable,
    // otherwhise just use the auto height (in case this list is modified somewhen later)
    if (Arrays.asList(keys).contains(height)) {
      heightEl.select(height, true);
    } else {
      heightEl.select(ScormEditController.CONFIG_HEIGHT_AUTO, true);
    }
   
    isAssessableEl = new CheckBoxElement("assessable.label", isAssessable);
    addFormElement("isassessable", isAssessableEl);
   
    cutValueEl = new IntegerElement("cutvalue.label", cutValue);
    addFormElement("cutvalue", cutValueEl);

View Full Code Here

   * @param name Name of the form
   */
  public AjaxForm(String name, Translator translator, boolean ajaxOn, boolean ajaxOnGlobally) {
    super(name, translator);

    CheckBoxElement ajaxOnGloballyEl = new CheckBoxElement("ajaxon.global.label", ajaxOnGlobally);
    ajaxOnGloballyEl.setReadOnly(true);
    addFormElement("ajaxonglobal", ajaxOnGloballyEl);

    ajaxOnByPreferences = new CheckBoxElement("ajaxon.label", ajaxOn);
    addFormElement("ajaxon", ajaxOnByPreferences);
    addSubmitKey("save", "save");
  }
View Full Code Here

   * @param name Name of the form
   */
  public AccessibilityForm(String name, Translator translator, boolean web2aModeOn) {
    super(name, translator);

    web2aModePreferences = new CheckBoxElement("accessibility.web2aMode.label", web2aModeOn);
    addFormElement("web2aModeOn", web2aModePreferences);
    addSubmitKey("save", "save");
  }
View Full Code Here

/**
*
* @see org.olat.user.propertyhandlers.UserPropertyHandler#getFormElement(java.util.Locale, org.olat.core.id.User, java.lang.String, boolean)
*/
  public FormElement getFormElement(Locale locale, User user, String usageIdentifyer, boolean isAdministrativeUser) {
    CheckBoxElement ui = null;
    UserManager um = UserManager.getInstance();
   
    String value = getInternalValue(user);
    boolean isEnabled = value != null && value.equals("true") ? Boolean.TRUE : Boolean.FALSE;
    ui = new CheckBoxElement(i18nFormElementLabelKey(), isEnabled);
    if ( um.isUserViewReadOnly(usageIdentifyer, this) && ! isAdministrativeUser) {
      ui.setReadOnly(true);
    }
    if (um.isMandatoryUserProperty(usageIdentifyer, this)) {
      ui.setMandatory(true);
    }
    return ui;
  }
View Full Code Here

  public BulkReplayUserFrom(String name, Translator translator) {
    super(name, translator);
    tuser = new TextAreaElement("bulkuserreplay.tt", 10, 60, null);
    addFormElement("bulkuserreplay.tt", tuser);
    isOn = new CheckBoxElement("bulkuserreplay.chkbx.onoff", true);
    addFormElement("isOn", isOn);
   
    addOlatPasswordAuthentication = new PasswordElement("bulkuserreplay.addOlatPasswordAuthentication", 255);
    addFormElement("addOlatPasswordAuthentication", addOlatPasswordAuthentication);
   
View Full Code Here

  public void init() {
   
    RepositoryHandler handler = null;
    handler = RepositoryHandlerFactory.getInstance().getRepositoryHandler(entry);
   
    canCopy = new CheckBoxElement("cif.canCopy", entry.getCanCopy());
    addFormElement("cif_canCopy", canCopy);

    canReference = new CheckBoxElement("cif.canReference", entry.getCanReference());
    addFormElement("cif_canReference", canReference);
   
    if (handler != null && handler.supportsLaunch()) {
      canLaunch = new CheckBoxElement("cif.canLaunch", entry.getCanLaunch());
      addFormElement("cif_canLaunch", canLaunch);
    } else { // launch not supported
      canLaunch = null;
      addFormElement("cif_canLaunch", new StaticHTMLTextElement("cif.canLaunch", translate("cif.canLaunch.na"), 255));
    }

    if (handler != null && handler.supportsDownload()) {
      canDownload = new CheckBoxElement("cif.canDownload", entry.getCanDownload());
      addFormElement("cif_canDownload", canDownload);
    } else { // download not supported
      canDownload = null;
      addFormElement("cif_canDownload", new StaticHTMLTextElement("cif.canDownload", translate("cif.canDownload.na"), 255));
    }
View Full Code Here

      logLevelSelectstat.select("" + stat.intValue(), true);
      addFormElement("logLevelstat", logLevelSelectstat);
    }*/
   
    if (InstantMessagingModule.isEnabled()&& CourseModule.isCourseChatEnabled()) {
      chatIsOn = new CheckBoxElement("chkbx.chat.onoff", cc.isChatEnabled());
      addFormElement("chatIsOn", chatIsOn);
    }

    // FIXME: remove "" and fix package...
    String[] values = new String[] { cc.getCssLayoutRef(), "" + translate("form.layout.setsystemcss") };
    String[] keys = new String[] { KEY_NO, KEY_YES };
    layout = new StaticSingleSelectionElement("form.layout.cssfile", keys, values);
    if (cc.hasCustomCourseCSS()) layout.select(KEY_NO, true);
    else layout.select(KEY_YES, true);
    addFormElement("layout", layout);

    String name;
    String softkey = cc.getSharedFolderSoftkey();

    RepositoryEntry re = RepositoryManager.getInstance().lookupRepositoryEntryBySoftkey(softkey, false);
    if (re == null) {
      cc.setSharedFolderSoftkey(CourseConfig.VALUE_EMPTY_SHAREDFOLDER_SOFTKEY);
      name = translate("sf.notconfigured");
    } else {
      name = re.getDisplayname();
    }
    String[] sfvalues = new String[] { name, translate("sf.notconfigured") };
    String[] sfkeys = new String[] { KEY_NO, KEY_YES };
    sfolder = new StaticSingleSelectionElement("sf.resourcetitle", sfkeys, sfvalues);
    if (cc.hasCustomSharedFolder()) sfolder.select(KEY_NO, true);
    else sfolder.select(KEY_YES, true);
    addFormElement("sfolder", sfolder);

    efficencyStatement = new CheckBoxElement("chkbx.efficency.onoff", cc.isEfficencyStatementEnabled());
    addFormElement("efficencyStatement", efficencyStatement);

    calendar = new CheckBoxElement("chkbx.calendar.onoff", cc.isCalendarEnabled());
    addFormElement("calendar", calendar);

   
    /*
     * glossary show name instead of check box OLAT-2126
View Full Code Here

    this.readOnly = readOnly;
    this.recipientsAreEditable = hasRecipientsEditable;
    setRecipientsEditableTo(recipientsAreEditable);
    setEmailFrom(emailFrom);
    addFormElement("tto", new StaticTextElement(NLS_CONTACT_TO, " "));
    addFormElement("tcpfrom", new CheckBoxElement(NLS_CONTACT_SEND_CP_FROM, true));
    setSubject(null);
    setBody(null);
   
    addSubmitKey("msg.save");
    if (isCanceable) {
View Full Code Here

TOP

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

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.