Package org.olat.core.gui.formelements

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


    }
    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

  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

   * @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

    return true;
  }

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

  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

   * 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

  public ChangeMessageForm(String name, Translator translator) {
    super(name, translator);
    //
    StaticTextElement userInfo = new StaticTextElement("form.chngmsg.infolabel", translate("form.chngmsg.info"));
    userMsg = new TextAreaElement("form.chngmsg.usermsg", 7, 80);
    chkbx = new CheckBoxElement("form.chngmsg.informlearners", true);
    addFormElement("userInfo", userInfo);
    addFormElement("userMsg", userMsg);
    addFormElement("learnerYes", chkbx);

    addSubmitKey("save");
View Full Code Here

   
    fileNameSuffixEl = new TextElement("form.filenamesuffix", suf, false, 5, 50);
    fileNameSuffixEl.setExample(translate("form.filenamesuffix.ex"));
    addFormElement("filenamesuffix", fileNameSuffixEl);
   
    taglessMattext = new CheckBoxElement("form.taglessmattext", false);
    addFormElement("taglessmattext", taglessMattext);
   
    addSubmitKey("form.finished"); // wizard style
  }
View Full Code Here

    // Single Choice
    if(hasSCQ){
      scqTitleEl = new TitleElement("form.scqtitle");
      addFormElement(SCQ_TITLE, scqTitleEl);
     
      scqItemCols = new CheckBoxElement("form.itemcols", ((QTIExportItemFormatConfig) mapWithConfigs.get(QTIExportSCQItemFormatConfig.class)).hasResponseCols());
      scqPosCol = new CheckBoxElement("form.poscol", ((QTIExportItemFormatConfig) mapWithConfigs.get(QTIExportSCQItemFormatConfig.class)).hasPositionsOfResponsesCol());
      scqPointCol = new CheckBoxElement("form.pointcol", ((QTIExportItemFormatConfig) mapWithConfigs.get(QTIExportSCQItemFormatConfig.class)).hasPointCol());
      scqTimeCols = new CheckBoxElement("form.timecols", ((QTIExportItemFormatConfig) mapWithConfigs.get(QTIExportSCQItemFormatConfig.class)).hasTimeCols());
     
      addFormElement(SCQ_ITEMCOLS, scqItemCols);
      addFormElement(SCQ_POSCOL, scqPosCol);
      addFormElement(SCQ_POINTCOL, scqPointCol);
      addFormElement(SCQ_TIMECOLS, scqTimeCols);
    }
    // Multiple Choice
    if(hasMCQ){
      mcqTitleEl = new TitleElement("form.mcqtitle");
      addFormElement(MCQ_TITLE, mcqTitleEl);
     
      mcqItemCols = new CheckBoxElement("form.itemcols", ((QTIExportItemFormatConfig) mapWithConfigs.get(QTIExportMCQItemFormatConfig.class)).hasResponseCols());
      mcqPosCol = new CheckBoxElement("form.poscol", ((QTIExportItemFormatConfig) mapWithConfigs.get(QTIExportMCQItemFormatConfig.class)).hasPositionsOfResponsesCol());
      mcqPointCol = new CheckBoxElement("form.pointcol", ((QTIExportItemFormatConfig) mapWithConfigs.get(QTIExportMCQItemFormatConfig.class)).hasPointCol());
      mcqTimeCols = new CheckBoxElement("form.timecols", ((QTIExportItemFormatConfig) mapWithConfigs.get(QTIExportMCQItemFormatConfig.class)).hasTimeCols());
     
      addFormElement(MCQ_ITEMCOLS, mcqItemCols);
      addFormElement(MCQ_POSCOL, mcqPosCol);
      addFormElement(MCQ_POINTCOL, mcqPointCol);
      addFormElement(MCQ_TIMECOLS, mcqTimeCols);
    }
    // KPRIM
    if(hasKRIM){
      kprimTitleEl = new TitleElement("form.kprimtitle");
      addFormElement(KPRIM_TITLE, kprimTitleEl);
     
      kprimItemCols = new CheckBoxElement("form.itemcols", ((QTIExportItemFormatConfig) mapWithConfigs.get(QTIExportKPRIMItemFormatConfig.class)).hasResponseCols());
      kprimPosCol = new CheckBoxElement("form.poscol", ((QTIExportItemFormatConfig) mapWithConfigs.get(QTIExportKPRIMItemFormatConfig.class)).hasPositionsOfResponsesCol());
      kprimPointCol = new CheckBoxElement("form.pointcol", ((QTIExportItemFormatConfig) mapWithConfigs.get(QTIExportKPRIMItemFormatConfig.class)).hasPointCol());
      kprimTimeCols = new CheckBoxElement("form.timecols", ((QTIExportItemFormatConfig) mapWithConfigs.get(QTIExportKPRIMItemFormatConfig.class)).hasTimeCols());
     
      addFormElement(KPRIM_ITEMCOLS, kprimItemCols);
      addFormElement(KPRIM_POSCOL, kprimPosCol);
      addFormElement(KPRIM_POINTCOL, kprimPointCol);
      addFormElement(KPRIM_TIMECOLS, kprimTimeCols);
    }
    // Fill in the Blank
    if(hasFIB){
      fibTitleEl = new TitleElement("form.fibtitle");
      addFormElement(FIB_TITLE, fibTitleEl);
     
      fibItemCols = new CheckBoxElement("form.itemcols", ((QTIExportItemFormatConfig) mapWithConfigs.get(QTIExportFIBItemFormatConfig.class)).hasResponseCols());
      fibPointCol = new CheckBoxElement("form.pointcol", ((QTIExportItemFormatConfig) mapWithConfigs.get(QTIExportFIBItemFormatConfig.class)).hasPointCol());
      fibTimeCols = new CheckBoxElement("form.timecols", ((QTIExportItemFormatConfig) mapWithConfigs.get(QTIExportFIBItemFormatConfig.class)).hasTimeCols());
     
      addFormElement(FIB_ITEMCOLS, fibItemCols);
      addFormElement(FIB_POINTCOL, fibPointCol);
      addFormElement(FIB_TIMECOLS, fibTimeCols);
    }
    // Essay
    if(hasEssay){
      essayTitleEl = new TitleElement("form.essaytitle");
      addFormElement(ESSAY_TITLE, essayTitleEl);
     
      essayItemCols = new CheckBoxElement("form.itemcols", ((QTIExportItemFormatConfig) mapWithConfigs.get(QTIExportEssayItemFormatConfig.class)).hasResponseCols());
      essayTimeCols = new CheckBoxElement("form.timecols", ((QTIExportItemFormatConfig) mapWithConfigs.get(QTIExportEssayItemFormatConfig.class)).hasTimeCols());
     
      addFormElement(ESSAY_ITEMCOLS, essayItemCols);
      addFormElement(ESSAY_TIMECOLS, essayTimeCols);
    }
    addSubmitKey("next"); // wizard style
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.