use of org.olat.modules.taxonomy.TaxonomyLevelManagedFlag in project OpenOLAT by OpenOLAT.
the class EditTaxonomyCompetenceController method initForm.
@Override
protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) {
String fullName = userManager.getUserDisplayName(competence.getIdentity());
uifactory.addStaticTextElement("taxonomy.competence.fullName", fullName, formLayout);
TaxonomyCompetenceTypes competenceType = competence.getCompetenceType();
String type = translate(competenceType.name());
uifactory.addStaticTextElement("taxonomy.competence.type", type, formLayout);
TaxonomyLevelManagedFlag marker = TaxonomyLevelManagedFlag.getCorrespondingFlag(competenceType);
expirationEl = uifactory.addDateChooser("taxonomy.competence.expiration", competence.getExpiration(), formLayout);
expirationEl.setEnabled(!TaxonomyLevelManagedFlag.isManaged(taxonomyLevel, marker));
FormLayoutContainer buttonsCont = FormLayoutContainer.createButtonLayout("buttons", getTranslator());
formLayout.add(buttonsCont);
uifactory.addFormCancelButton("cancel", buttonsCont, ureq, getWindowControl());
if (expirationEl.isEnabled()) {
// save only if there is something to update
uifactory.addFormSubmitButton("save", buttonsCont);
}
}
use of org.olat.modules.taxonomy.TaxonomyLevelManagedFlag in project openolat by klemens.
the class EditTaxonomyCompetenceController method initForm.
@Override
protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) {
String fullName = userManager.getUserDisplayName(competence.getIdentity());
uifactory.addStaticTextElement("taxonomy.competence.fullName", fullName, formLayout);
TaxonomyCompetenceTypes competenceType = competence.getCompetenceType();
String type = translate(competenceType.name());
uifactory.addStaticTextElement("taxonomy.competence.type", type, formLayout);
TaxonomyLevelManagedFlag marker = TaxonomyLevelManagedFlag.getCorrespondingFlag(competenceType);
expirationEl = uifactory.addDateChooser("taxonomy.competence.expiration", competence.getExpiration(), formLayout);
expirationEl.setEnabled(!TaxonomyLevelManagedFlag.isManaged(taxonomyLevel, marker));
FormLayoutContainer buttonsCont = FormLayoutContainer.createButtonLayout("buttons", getTranslator());
formLayout.add(buttonsCont);
uifactory.addFormCancelButton("cancel", buttonsCont, ureq, getWindowControl());
if (expirationEl.isEnabled()) {
// save only if there is something to update
uifactory.addFormSubmitButton("save", buttonsCont);
}
}
use of org.olat.modules.taxonomy.TaxonomyLevelManagedFlag in project openolat by klemens.
the class IdentityCompetenceRow method isManaged.
public boolean isManaged() {
TaxonomyLevel level = competence.getTaxonomyLevel();
TaxonomyCompetenceTypes competenceType = competence.getCompetenceType();
TaxonomyLevelManagedFlag marker = TaxonomyLevelManagedFlag.getCorrespondingFlag(competenceType);
return TaxonomyLevelManagedFlag.isManaged(level, marker);
}
use of org.olat.modules.taxonomy.TaxonomyLevelManagedFlag in project OpenOLAT by OpenOLAT.
the class IdentityCompetenceRow method isManaged.
public boolean isManaged() {
TaxonomyLevel level = competence.getTaxonomyLevel();
TaxonomyCompetenceTypes competenceType = competence.getCompetenceType();
TaxonomyLevelManagedFlag marker = TaxonomyLevelManagedFlag.getCorrespondingFlag(competenceType);
return TaxonomyLevelManagedFlag.isManaged(level, marker);
}
Aggregations