Skip to content
Snippets Groups Projects
Commit 6d533918 authored by srosse's avatar srosse
Browse files

OO-1739: double example shown in repository details editor

parent cc15c88f
No related branches found
No related tags found
No related merge requests found
......@@ -105,6 +105,9 @@ public class FileElementImpl extends FormItemImpl
private String i18nErrMimeType;
private String[] i18nErrMaxSizeArgs;
private String[] i18nErrMimeTypeArgs;
private String fileExampleKey;
private String[] fileExampleParams;
private WindowControl wControl;
private DialogBoxController dialogCtr;
......@@ -194,9 +197,9 @@ public class FileElementImpl extends FormItemImpl
}
private void doConfirmDelete(UserRequest ureq) {
Translator translator = Util.createPackageTranslator(FileElementImpl.class, ureq.getLocale(), getTranslator());
String title = translator.translate("confirm.delete.file.title");
String text = translator.translate("confirm.delete.file");
Translator fileTranslator = Util.createPackageTranslator(FileElementImpl.class, ureq.getLocale(), getTranslator());
String title = fileTranslator.translate("confirm.delete.file.title");
String text = fileTranslator.translate("confirm.delete.file");
dialogCtr = DialogBoxUIFactory.createOkCancelDialog(ureq, wControl, title, text);
dialogCtr.addControllerListener(this);
dialogCtr.activate();
......@@ -334,6 +337,23 @@ public class FileElementImpl extends FormItemImpl
clearError();
}
@Override
public String getExampleText() {
if(fileExampleKey != null) {
if(fileExampleParams != null) {
return translator.translate(fileExampleKey, fileExampleParams);
}
return translator.translate(fileExampleKey);
}
return null;
}
@Override
public void setExampleKey(String exampleKey, String[] params) {
this.fileExampleKey = exampleKey;
this.fileExampleParams = params;
}
@Override
public void setPreview(UserSession usess, boolean enable) {
if (enable) {
......
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