Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
OLAT CI-CD Testing Project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lars Oliver Dam
OLAT CI-CD Testing Project
Commits
6d533918
Commit
6d533918
authored
9 years ago
by
srosse
Browse files
Options
Downloads
Patches
Plain Diff
OO-1739: double example shown in repository details editor
parent
cc15c88f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/org/olat/core/gui/components/form/flexible/impl/elements/FileElementImpl.java
+23
-3
23 additions, 3 deletions
...mponents/form/flexible/impl/elements/FileElementImpl.java
with
23 additions
and
3 deletions
src/main/java/org/olat/core/gui/components/form/flexible/impl/elements/FileElementImpl.java
+
23
−
3
View file @
6d533918
...
...
@@ -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
t
ranslator
=
Util
.
createPackageTranslator
(
FileElementImpl
.
class
,
ureq
.
getLocale
(),
getTranslator
());
String
title
=
t
ranslator
.
translate
(
"confirm.delete.file.title"
);
String
text
=
t
ranslator
.
translate
(
"confirm.delete.file"
);
Translator
fileT
ranslator
=
Util
.
createPackageTranslator
(
FileElementImpl
.
class
,
ureq
.
getLocale
(),
getTranslator
());
String
title
=
fileT
ranslator
.
translate
(
"confirm.delete.file.title"
);
String
text
=
fileT
ranslator
.
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
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment