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
bd0ccab1
Commit
bd0ccab1
authored
4 years ago
by
srosse
Browse files
Options
Downloads
Patches
Plain Diff
OO-4894: edit user life cycle body template in text area
parent
2178a7be
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/org/olat/user/ui/admin/lifecycle/UserAdminLifecycleConfigurationController.java
+18
-13
18 additions, 13 deletions
.../lifecycle/UserAdminLifecycleConfigurationController.java
with
18 additions
and
13 deletions
src/main/java/org/olat/user/ui/admin/lifecycle/UserAdminLifecycleConfigurationController.java
+
18
−
13
View file @
bd0ccab1
...
...
@@ -91,7 +91,6 @@ public class UserAdminLifecycleConfigurationController extends FormBasicControll
formLayout
.
add
(
buttonsLayout
);
uifactory
.
addFormSubmitButton
(
"save"
,
buttonsLayout
);
}
protected
void
initDeactivationForm
(
FormItemContainer
formLayout
)
{
String
[]
onValues
=
new
String
[]
{
translate
(
"enabled"
)
};
...
...
@@ -115,8 +114,8 @@ public class UserAdminLifecycleConfigurationController extends FormBasicControll
initDays
(
numberOfDayBeforeDeactivationMailEl
);
// subject + content mail
TranslationBundle
beforeBundleSubject
=
initForm
(
"mail.before.deactivation.subject.label"
,
"mail.before.deactivation.subject"
,
formLayout
);
TranslationBundle
beforeBundle
=
initForm
(
"mail.before.deactivation.body.label"
,
"mail.before.deactivation.body"
,
formLayout
);
TranslationBundle
beforeBundleSubject
=
initForm
(
"mail.before.deactivation.subject.label"
,
"mail.before.deactivation.subject"
,
false
,
formLayout
);
TranslationBundle
beforeBundle
=
initForm
(
"mail.before.deactivation.body.label"
,
"mail.before.deactivation.body"
,
true
,
formLayout
);
mailBeforeDeactivationBundles
=
new
TranslationBundles
(
beforeBundleSubject
,
beforeBundle
);
// enable mail after
...
...
@@ -125,8 +124,8 @@ public class UserAdminLifecycleConfigurationController extends FormBasicControll
enableMailAfterDeactivationEl
.
select
(
onKeys
[
0
],
userModule
.
isMailAfterDeactivation
());
// subject + content mail
TranslationBundle
afterBundleSubject
=
initForm
(
"mail.after.deactivation.subject.label"
,
"mail.after.deactivation.subject"
,
formLayout
);
TranslationBundle
afterBundle
=
initForm
(
"mail.after.deactivation.body.label"
,
"mail.after.deactivation.body"
,
formLayout
);
TranslationBundle
afterBundleSubject
=
initForm
(
"mail.after.deactivation.subject.label"
,
"mail.after.deactivation.subject"
,
false
,
formLayout
);
TranslationBundle
afterBundle
=
initForm
(
"mail.after.deactivation.body.label"
,
"mail.after.deactivation.body"
,
true
,
formLayout
);
mailAfterDeactivationBundles
=
new
TranslationBundles
(
afterBundleSubject
,
afterBundle
);
}
...
...
@@ -151,8 +150,8 @@ public class UserAdminLifecycleConfigurationController extends FormBasicControll
initDays
(
numberOfDayBeforeDeletionMailEl
);
// subject + content mail
TranslationBundle
beforeBundleSubject
=
initForm
(
"mail.before.deletion.subject.label"
,
"mail.before.deletion.subject"
,
formLayout
);
TranslationBundle
beforeBundle
=
initForm
(
"mail.before.deletion.body.label"
,
"mail.before.deletion.body"
,
formLayout
);
TranslationBundle
beforeBundleSubject
=
initForm
(
"mail.before.deletion.subject.label"
,
"mail.before.deletion.subject"
,
false
,
formLayout
);
TranslationBundle
beforeBundle
=
initForm
(
"mail.before.deletion.body.label"
,
"mail.before.deletion.body"
,
true
,
formLayout
);
mailBeforeDeletionBundles
=
new
TranslationBundles
(
beforeBundleSubject
,
beforeBundle
);
// enable mail after
...
...
@@ -161,17 +160,17 @@ public class UserAdminLifecycleConfigurationController extends FormBasicControll
enableMailAfterDeletionEl
.
select
(
onKeys
[
0
],
userModule
.
isMailAfterDeletion
());
// subject + content mail
TranslationBundle
afterBundleSubject
=
initForm
(
"mail.after.deletion.subject.label"
,
"mail.after.deletion.subject"
,
formLayout
);
TranslationBundle
afterBundle
=
initForm
(
"mail.after.deletion.body.label"
,
"mail.after.deletion.body"
,
formLayout
);
TranslationBundle
afterBundleSubject
=
initForm
(
"mail.after.deletion.subject.label"
,
"mail.after.deletion.subject"
,
false
,
formLayout
);
TranslationBundle
afterBundle
=
initForm
(
"mail.after.deletion.body.label"
,
"mail.after.deletion.body"
,
true
,
formLayout
);
mailAfterDeletionBundles
=
new
TranslationBundles
(
afterBundleSubject
,
afterBundle
);
}
private
TranslationBundle
initForm
(
String
labelI18nKey
,
String
textI18nKey
,
FormItemContainer
formLayout
)
{
private
TranslationBundle
initForm
(
String
labelI18nKey
,
String
textI18nKey
,
boolean
textArea
,
FormItemContainer
formLayout
)
{
String
text
=
translate
(
textI18nKey
);
StaticTextElement
viewEl
=
uifactory
.
addStaticTextElement
(
"view."
+
counter
++,
labelI18nKey
,
text
,
formLayout
);
FormLink
translationLink
=
uifactory
.
addFormLink
(
"translate."
+
counter
++,
"translation.edit"
,
null
,
formLayout
,
Link
.
LINK
);
TranslationBundle
bundle
=
new
TranslationBundle
(
textI18nKey
,
labelI18nKey
,
viewEl
,
translationLink
);
TranslationBundle
bundle
=
new
TranslationBundle
(
textI18nKey
,
labelI18nKey
,
viewEl
,
translationLink
,
textArea
);
translationLink
.
setUserObject
(
bundle
);
return
bundle
;
}
...
...
@@ -274,7 +273,7 @@ public class UserAdminLifecycleConfigurationController extends FormBasicControll
if
(
guardModalController
(
translatorCtrl
))
return
;
translatorCtrl
=
new
SingleKeyTranslatorController
(
ureq
,
getWindowControl
(),
bundle
.
getI18nKey
(),
UserAdminLifecycleConfigurationController
.
class
);
UserAdminLifecycleConfigurationController
.
class
,
bundle
.
isTextArea
()
);
translatorCtrl
.
setUserObject
(
bundle
);
listenTo
(
translatorCtrl
);
...
...
@@ -290,12 +289,14 @@ public class UserAdminLifecycleConfigurationController extends FormBasicControll
private
static
class
TranslationBundle
{
private
final
boolean
textArea
;
private
final
String
i18nKey
;
private
final
String
labelI18nKey
;
private
final
StaticTextElement
viewEl
;
private
final
FormLink
translationLink
;
public
TranslationBundle
(
String
i18nKey
,
String
labelI18nKey
,
StaticTextElement
viewEl
,
FormLink
translationLink
)
{
public
TranslationBundle
(
String
i18nKey
,
String
labelI18nKey
,
StaticTextElement
viewEl
,
FormLink
translationLink
,
boolean
textArea
)
{
this
.
textArea
=
textArea
;
this
.
i18nKey
=
i18nKey
;
this
.
viewEl
=
viewEl
;
this
.
labelI18nKey
=
labelI18nKey
;
...
...
@@ -305,6 +306,10 @@ public class UserAdminLifecycleConfigurationController extends FormBasicControll
public
StaticTextElement
getViewEl
()
{
return
viewEl
;
}
public
boolean
isTextArea
()
{
return
textArea
;
}
public
String
getI18nKey
()
{
return
i18nKey
;
...
...
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