File tree Expand file tree Collapse file tree 3 files changed +29
-13
lines changed
apps/octra/src/app/core/modals Expand file tree Collapse file tree 3 files changed +29
-13
lines changed Original file line number Diff line number Diff line change @@ -46,8 +46,8 @@ <h5 class="modal-title" id="modal-title">
46
46
[(ngModel)] ="profile.username "
47
47
/>
48
48
< label for ="inputName " class ="form-label "> {{
49
- 'g.name' | transloco
50
- }}</ label >
49
+ 'g.name' | transloco
50
+ }}</ label >
51
51
</ div >
52
52
</ div >
53
53
< div class ="col-6 ">
@@ -62,26 +62,25 @@ <h5 class="modal-title" id="modal-title">
62
62
63
63
/>
64
64
< label for ="inputEmail " class ="form-label "> {{
65
- 'g.email' | transloco
66
- }}</ label >
65
+ 'g.email' | transloco
66
+ }}</ label >
67
67
</ div >
68
68
</ div >
69
69
</ div >
70
70
< div class ="row ">
71
71
< div class ="col-12 ">
72
- < div class ="form-floating mb-3 ">
73
- < textarea
72
+ < div class ="d-block mb-3 ">
73
+ < label for ="bgDescr "> {{ 'g.description' | transloco }}:</ label >
74
+ < ngx-jodit
74
75
[(ngModel)] ="bgdescr "
75
- class ="form-control "
76
+ [options] ="joditOptions "
77
+ class ="w-100 "
78
+ style ="display: flex !important; flex-direction: column; flex: auto; height: 100% !important; "
76
79
aria-describedby ="bgDescr "
77
- [placeholder] ="'g.description' | transloco "
78
80
id ="bgDescr "
79
81
maxlength ="1000 "
80
- rows ="3 "
81
82
name ="bgdescr "
82
- style ="height: 100px "
83
- > </ textarea >
84
- < label for ="bgDescr "> {{ 'g.description' | transloco }}</ label >
83
+ > </ ngx-jodit >
85
84
< div id ="emailHelp " class ="form-text "> German or English</ div >
86
85
</ div >
87
86
</ div >
@@ -99,7 +98,7 @@ <h5 class="modal-title" id="modal-title">
99
98
class ="upload-screenshot "
100
99
>
101
100
< span (click) ="removeScreenshot(i) " class ="cross rounded-circle "
102
- > X</ span
101
+ > X</ span
103
102
>
104
103
< input
105
104
#uploadInput2
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import { BugReportService } from '../../shared/service/bug-report.service';
5
5
import { OctraModal } from '../types' ;
6
6
import { NgbActiveModal , NgbModalOptions } from '@ng-bootstrap/ng-bootstrap' ;
7
7
import { AuthenticationStoreService } from '../../store/authentication' ;
8
+ import { JoditConfig } from 'ngx-jodit' ;
8
9
9
10
@Component ( {
10
11
selector : 'octra-bugreport-modal' ,
@@ -18,6 +19,11 @@ export class BugreportModalComponent extends OctraModal implements OnInit {
18
19
backdrop : true ,
19
20
} ;
20
21
22
+ joditOptions : JoditConfig = {
23
+ maxHeight : 300 ,
24
+ statusbar : false ,
25
+ placeholder : 'Please write a message in German or English...' ,
26
+ } ;
21
27
public visible = false ;
22
28
public bgdescr = '' ;
23
29
public sendProObj = true ;
@@ -66,6 +72,15 @@ export class BugreportModalComponent extends OctraModal implements OnInit {
66
72
}
67
73
68
74
sendBugReport ( ) {
75
+ if ( this . bgdescr . length > 10000 ) {
76
+ alert (
77
+ `Please write a message with less 10000 letters. Remove ${
78
+ this . bgdescr . length - 10000
79
+ } letters.`
80
+ ) ;
81
+ return ;
82
+ }
83
+
69
84
this . sendStatus = 'sending' ;
70
85
this . subscrManager . add (
71
86
this . bugService
Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ import { ReAuthenticationModalComponent } from './re-authentication-modal/re-aut
46
46
import { AuthenticationComponent } from '../component/authentication-component/authentication-component.component' ;
47
47
import { AboutModalComponent } from './about-modal/about-modal.component' ;
48
48
import { FeedbackNoticeModalComponent } from './feedback-notice-modal/feedback-notice-modal.component' ;
49
+ import { NgxJoditComponent } from 'ngx-jodit' ;
49
50
50
51
@Injectable ( { providedIn : 'root' } )
51
52
export class TranslocoHttpLoader implements TranslocoLoader {
@@ -100,6 +101,7 @@ export class TranslocoHttpLoader implements TranslocoLoader {
100
101
NgbModalModule ,
101
102
OctraUtilitiesModule ,
102
103
NgbAccordionCollapse ,
104
+ NgxJoditComponent ,
103
105
] ,
104
106
exports : [
105
107
BugreportModalComponent ,
You can’t perform that action at this time.
0 commit comments