Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Maarch
MaarchParapheur
Commits
4e82e271
Commit
4e82e271
authored
May 31, 2021
by
Hamza HRAMCHI
Browse files
FIX #17005 TIME 0:05 make the message optional
parent
664f6206
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/frontend/app/administration/customization/customization.component.html
View file @
4e82e271
...
...
@@ -11,7 +11,7 @@
<ion-content>
<ion-list-header>
<ion-label
color=
"secondary"
>
{{ 'lang.loginMessage' | translate}}
<ng-container>
*
</ng-container>
{{ 'lang.loginMessage' | translate}}
</ion-label>
</ion-list-header>
<ion-item
lines=
"none"
>
...
...
src/frontend/app/administration/customization/customization.component.ts
View file @
4e82e271
...
...
@@ -59,19 +59,15 @@ export class CustomizationComponent implements OnInit {
onSubmit
()
{
this
.
loginMessage
=
tinymce
.
get
(
'
login_message
'
).
getContent
();
if
(
this
.
functions
.
empty
(
this
.
loginMessage
))
{
this
.
notificationService
.
error
(
this
.
translate
.
instant
(
'
lang.requiredField
'
));
}
else
{
this
.
http
.
put
(
'
../rest/customization
'
,
{
id
:
this
.
authService
.
user
.
id
,
loginMessage
:
this
.
loginMessage
}).
pipe
(
tap
(()
=>
{
this
.
notificationService
.
success
(
this
.
translate
.
instant
(
'
lang.messageSaved
'
));
}),
catchError
((
err
:
any
)
=>
{
this
.
notificationService
.
handleErrors
(
err
);
return
of
(
false
);
})
).
subscribe
();
}
this
.
http
.
put
(
'
../rest/customization
'
,
{
id
:
this
.
authService
.
user
.
id
,
loginMessage
:
this
.
loginMessage
}).
pipe
(
tap
(()
=>
{
this
.
notificationService
.
success
(
this
.
translate
.
instant
(
'
lang.messageSaved
'
));
}),
catchError
((
err
:
any
)
=>
{
this
.
notificationService
.
handleErrors
(
err
);
return
of
(
false
);
})
).
subscribe
();
}
initMce
()
{
...
...
src/frontend/app/login/login.component.html
View file @
4e82e271
...
...
@@ -2,7 +2,7 @@
<mat-icon
svgIcon=
"maarchLogo"
class=
"maarchLogo"
></mat-icon>
<ion-card
style=
"width: 400px;position: absolute;left: 50%;top: 50%;transform: translate(-50%,-50%);"
>
<ion-card-header>
<ion-card-header
*ngIf=
"!functions.empty(authService.loginMessage)"
>
<ion-card-subtitle
class=
"loginMessage"
>
<div
[innerHTML]=
"authService.loginMessage | safeHtml"
></div>
</ion-card-subtitle>
...
...
src/frontend/app/login/login.component.ts
View file @
4e82e271
...
...
@@ -11,6 +11,7 @@ import { tap, catchError } from 'rxjs/operators';
import
{
of
}
from
'
rxjs
'
;
import
{
LoadingController
,
MenuController
}
from
'
@ionic/angular
'
;
import
{
TranslateService
}
from
'
@ngx-translate/core
'
;
import
{
FunctionsService
}
from
'
../service/functions.service
'
;
@
Component
({
templateUrl
:
'
login.component.html
'
,
...
...
@@ -37,6 +38,7 @@ export class LoginComponent implements OnInit, AfterViewInit {
public
loadingController
:
LoadingController
,
private
translate
:
TranslateService
,
private
menu
:
MenuController
,
public
functions
:
FunctionsService
)
{
}
async
ngOnInit
()
{
...
...
@@ -49,7 +51,7 @@ export class LoginComponent implements OnInit, AfterViewInit {
this
.
environment
=
environment
;
this
.
signaturesService
.
reset
();
await
this
.
loadCommitInformation
();
await
this
.
loadCommitInformation
();
}
ionViewWillEnter
()
{
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment