Skip to content
Snippets Groups Projects
Commit 455062ba authored by srosse's avatar srosse
Browse files

OO-3444 fix i18n key setter for FormCancel

parent afe7ec74
No related branches found
No related tags found
No related merge requests found
...@@ -153,7 +153,7 @@ public class FormCancel extends FormItemImpl implements Disposable, Cancel { ...@@ -153,7 +153,7 @@ public class FormCancel extends FormItemImpl implements Disposable, Cancel {
* @see org.olat.core.gui.components.form.flexible.elements.Cancel#setI18nKey(java.lang.String) * @see org.olat.core.gui.components.form.flexible.elements.Cancel#setI18nKey(java.lang.String)
*/ */
public void setI18nKey(String i18n) { public void setI18nKey(String i18n) {
cancelLink.setTitle(i18n); cancelLink.setCustomDisplayText(translator.translate(i18n));
} }
/** /**
......
...@@ -24,6 +24,7 @@ import org.olat.core.gui.components.form.flexible.FormItemContainer; ...@@ -24,6 +24,7 @@ import org.olat.core.gui.components.form.flexible.FormItemContainer;
import org.olat.core.gui.components.form.flexible.elements.MultipleSelectionElement; import org.olat.core.gui.components.form.flexible.elements.MultipleSelectionElement;
import org.olat.core.gui.components.form.flexible.impl.FormBasicController; import org.olat.core.gui.components.form.flexible.impl.FormBasicController;
import org.olat.core.gui.components.form.flexible.impl.FormLayoutContainer; import org.olat.core.gui.components.form.flexible.impl.FormLayoutContainer;
import org.olat.core.gui.components.form.flexible.impl.elements.FormCancel;
import org.olat.core.gui.control.Controller; import org.olat.core.gui.control.Controller;
import org.olat.core.gui.control.Event; import org.olat.core.gui.control.Event;
import org.olat.core.gui.control.WindowControl; import org.olat.core.gui.control.WindowControl;
...@@ -118,7 +119,8 @@ public class DisclaimerFormController extends FormBasicController { ...@@ -118,7 +119,8 @@ public class DisclaimerFormController extends FormBasicController {
formLayout.add(buttonLayout); formLayout.add(buttonLayout);
buttonLayout.setElementCssClass("o_sel_disclaimer_buttons"); buttonLayout.setElementCssClass("o_sel_disclaimer_buttons");
uifactory.addFormSubmitButton(DCL_ACCEPT, NLS_DISCLAIMER_OK, buttonLayout); uifactory.addFormSubmitButton(DCL_ACCEPT, NLS_DISCLAIMER_OK, buttonLayout);
uifactory.addFormCancelButton(NLS_DISCLAIMER_NOK, buttonLayout, ureq, getWindowControl()); FormCancel cancelButton = uifactory.addFormCancelButton(NLS_DISCLAIMER_NOK, buttonLayout, ureq, getWindowControl());
cancelButton.setI18nKey(NLS_DISCLAIMER_NOK);
} }
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment