Examples of CheckBoxElement


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

    Iterator iter = providers.iterator();
    while (iter.hasNext()) {
      AuthenticationProvider provider = (AuthenticationProvider) iter.next();
      if (provider.isEnabled()) {
        String providerName = provider.getName();
        CheckBoxElement authElem = searchform.getCheckBoxElement("auth." + providerName);
        if (authElem != null && authElem.isChecked()) {
          authProvidersList.add(providerName);
        }
      }
    }
   
    if(WebDAVManager.getInstance().isEnabled()) {
      CheckBoxElement authElem = searchform.getCheckBoxElement("auth." + WebDAVAuthManager.PROVIDER_WEBDAV);
      if (authElem != null && authElem.isChecked()) {
        authProvidersList.add(WebDAVAuthManager.PROVIDER_WEBDAV);
      }
    }
   
    // add null provider as special case
View Full Code Here

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

    // 1) general accout type
    String[] isAnonymousKeys = {"true", "false"};
    String[] isAnonymousValues = {translate("rightsForm.isAnonymous.true"), translate("rightsForm.isAnonymous.false")};
    isAnonymous = new StaticSingleSelectionElement("rightsForm.isAnonymous", isAnonymousKeys, isAnonymousValues);
    // 2) system roles
    isUsermanager = new CheckBoxElement("rightsForm.isUsermanager");
    isGroupmanager = new CheckBoxElement("rightsForm.isGroupmanager");
    isAuthor = new CheckBoxElement("rightsForm.isAuthor");
    isAdmin = new CheckBoxElement("rightsForm.isAdmin");
   
//    TODO allow arguments for label to inform user about the institution which will be affected by this option
//    if(institution != null) {
//      isInstitutionalResourceManager = new CheckBoxElement("rightsForm.isInstitutionalResourceManager.institution");
//      isInstitutionalResourceManager.setLabelKeyArgs(new String[] {institution});
//    } else {
      isInstitutionalResourceManager = new CheckBoxElement("rightsForm.isInstitutionalResourceManager");
//    }
   
    // 3) other security config
    statusSelectionElement = createStatusSelectionElement();
    // now use setXXX methods and then finishInitialization
View Full Code Here

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

    }

    // 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
View Full Code Here

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

   * @param withCancel true: cancel button is rendered, false: no cancel button
   */
  public COConfigForm(String name, Translator translator, ModuleConfiguration config, boolean withCancel) {
    super(name, translator);
    //
    coaches = new CheckBoxElement("form.message.chckbx.coaches", config.getBooleanEntry(COEditController.CONFIG_KEY_EMAILTOCOACHES)
        .booleanValue());
    addFormElement("coaches", coaches);
    //
    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);
View Full Code Here

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

    }
    confirmation = new TextAreaElement("form.dropbox.confirmation", 4, 40, sConfirmation != null ? sConfirmation : "");
    addFormElement("confirmation", confirmation);
   
    Boolean enableMail = (Boolean)config.get(TACourseNode.CONF_DROPBOX_ENABLEMAIL);
    enablemail = new CheckBoxElement("form.dropbox.enablemail", enableMail != null ? enableMail.booleanValue() : true);
    addFormElement("enablemail", enablemail);

    setSubmitKey("submit");
  }
View Full Code Here

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

  CheckBoxElement copyTools, copyAreas, copyOwners, copyParticipants, copyMembersVisibility, copyRights;
  CheckBoxElement copyWaitingList;

  BGCopyWizardCopyForm(BGConfigFlags flags, Translator translator, BusinessGroup businessGroup) {
    super("wizzard2", translator);
    copyTools = new CheckBoxElement("bgcopywizard.copyform.tools", true);
    addFormElement("copyTools", copyTools);
    if (flags.isEnabled(BGConfigFlags.AREAS)) {
      copyAreas = new CheckBoxElement("bgcopywizard.copyform.areas", true);
      addFormElement("copyAreas", copyAreas);
    }
    if (flags.isEnabled(BGConfigFlags.RIGHTS)) {
      copyRights = new CheckBoxElement("bgcopywizard.copyform.rights", false);
      addFormElement("copyRights", copyRights);
    }
    if (flags.isEnabled(BGConfigFlags.GROUP_OWNERS)) {
      copyOwners = new CheckBoxElement("bgcopywizard.copyform.owners", false);
      addFormElement("copyOwners", copyOwners);
    }
    copyParticipants = new CheckBoxElement("bgcopywizard.copyform.participants", false);
    addFormElement("copyParticipants", copyParticipants);
    copyMembersVisibility = new CheckBoxElement("bgcopywizard.copyform.membersvisibility", true);
    addFormElement("membersVisibility", copyMembersVisibility);
    if ( businessGroup.getWaitingListEnabled().booleanValue()) {       
      // WaitingList is enabled => show checkbox
      copyWaitingList = new CheckBoxElement("bgcopywizard.copyform.waitingList", false);
      addFormElement("copyWaitingList", copyWaitingList);
    }
    addSubmitKey("next", "next");
  }
View Full Code Here

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

   * @param hasOwners
   */
  public DisplayMemberSwitchForm(String name, Translator translator, boolean hasOwners, boolean hasPartips, boolean hasWaitingList) {
    super(name, translator);
    if (hasOwners) {
      showOwners = new CheckBoxElement("chkBox.show.owners", false);
      addFormElement("ShowOwners", showOwners);
    }
    if (hasPartips) {
      showPartips = new CheckBoxElement("chkBox.show.partips", false);
      addFormElement("ShowPartips", showPartips);
    }
    if (hasWaitingList) {
      showWaitingList = new CheckBoxElement("chkBox.show.waitingList", false);
      addFormElement("ShowWaitingList", showWaitingList);
    }
    addSubmitKey("save");
  }
View Full Code Here

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

    return true;
  }

  public void setWaitingListReadOnly(boolean b) {
    if (showWaitingList == null) {
      showWaitingList = new CheckBoxElement("chkBox.show.waitingList", false);
    }
    showWaitingList.setReadOnly(b);
  }
View Full Code Here

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

  public void init() {
    RepositoryHandler handler = null;
    String typeName = entry.getOlatResource().getResourceableTypeName();
    if (typeName != null) handler = RepositoryHandlerFactory.getInstance().getRepositoryHandler(typeName);
   
    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

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

   * Initialize form.
   */
  public void init() {

    Boolean taskEnabled = (Boolean)config.get(TACourseNode.CONF_TASK_ENABLED);
    task = new CheckBoxElement("form.modules.task", taskEnabled != null ? taskEnabled.booleanValue() : true);
    addFormElement("task", task);
   
    Boolean dropboxEnabled = (Boolean)config.get(TACourseNode.CONF_DROPBOX_ENABLED);
    boolean dropboxEnabledValue = dropboxEnabled != null ? dropboxEnabled.booleanValue() : true;
    dropbox = new CheckBoxElement("form.modules.dropbox", dropboxEnabledValue);
    addFormElement("dropbox", dropbox);
   
    Boolean returnboxEnabled = (Boolean)config.get(TACourseNode.CONF_RETURNBOX_ENABLED);
    returnbox = new CheckBoxElement("form.modules.returnbox", returnboxEnabled != null ? returnboxEnabled.booleanValue() : dropboxEnabledValue);
    addFormElement("returnbox", returnbox);

    Boolean scoringEnabled = (Boolean)config.get(TACourseNode.CONF_SCORING_ENABLED);
    scoring = new CheckBoxElement("form.modules.scoring", scoringEnabled != null ? scoringEnabled.booleanValue() : true);
    addFormElement("scoring", scoring);

    Boolean solutionEnabled = (Boolean)config.get(TACourseNode.CONF_SOLUTION_ENABLED);
    solution = new CheckBoxElement("form.modules.sample", solutionEnabled != null ? solutionEnabled.booleanValue() : true);
    addFormElement("sample", solution);

    addSubmitKey("submit");
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.