Skip to content

Commit

Permalink
Merge pull request #7 from venkykandagaddala/dev-16
Browse files Browse the repository at this point in the history
Dev 16
  • Loading branch information
vishnubansaltarento authored Aug 29, 2024
2 parents 7de6df5 + beb8d00 commit 02b0826
Show file tree
Hide file tree
Showing 11 changed files with 352 additions and 275 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,12 @@
createEventForm?.controls['description'].errors?.required">
Description is mandatory
</mat-error>
<mat-error [hidden]="false" i18n="description Error|Explains description is required"
i18n-aria-label aria-label="description Error|Explains description is required "
*ngIf="createEventForm?.controls['description']?.touched &&
createEventForm?.controls['description'].errors?.noHtml">
HTML and javascript is not allowed
</mat-error>
<mat-hint>{{description.value.length}}/1000 characters</mat-hint>
</mat-form-field>
</div>
Expand All @@ -149,6 +155,10 @@
*ngIf="createEventForm?.controls['agenda']?.touched && createEventForm?.controls['agenda'].errors?.required">
Agenda is mandatory
</mat-error>
<mat-error [hidden]="false"
*ngIf="createEventForm?.controls['agenda']?.touched && createEventForm?.controls['agenda'].errors?.noHtml">
HTML and javascript is not allowed
</mat-error>
<mat-hint>{{agenda.value.length}}/500 characters</mat-hint>
</mat-form-field>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { MomentDateAdapter } from '@angular/material-moment-adapter'
import _ from 'lodash'
import { TelemetryEvents } from '../../events/model/telemetry.event.model'
import { ProfileV2UtillService } from '../services/home-utill.service'
import { preventHtmlAndJs } from '../../../validators/prevent-html-and-js.validator'
/* tslint:enable */

export const MY_FORMATS = {
Expand Down Expand Up @@ -146,8 +147,8 @@ export class CreateEventComponent implements OnInit {
eventPicture: new FormControl('', [Validators.required]),
eventTitle: new FormControl('', [Validators.required]),
// summary: new FormControl('', [Validators.required]),
description: new FormControl('', [Validators.required]),
agenda: new FormControl('', []),
description: new FormControl('', [Validators.required, preventHtmlAndJs()]),
agenda: new FormControl('', [preventHtmlAndJs()]),
// isItKarmayogiTalk: new FormControl('', []),
eventType: new FormControl('', [Validators.required]),
eventDate: new FormControl('', [Validators.required]),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,15 @@
<mat-error [hidden]="false" i18n="description Error|Explains description is required"
i18n-aria-label aria-label="description Error|Explains description is required "
*ngIf="createEventForm?.controls['description']?.touched &&
createEventForm?.controls['description'].errors?.required">
createEventForm?.controls['description'].errors?.required">
Description is mandatory
</mat-error>
<mat-error [hidden]="false" i18n="description Error|Explains description is required"
i18n-aria-label aria-label="description Error|Explains description is required "
*ngIf="createEventForm?.controls['description']?.touched &&
createEventForm?.controls['description'].errors?.noHtml">
HTML and javascript is not allowed
</mat-error>
<mat-hint>{{description.value.length}}/1000 characters</mat-hint>
</mat-form-field>
</div>
Expand All @@ -155,6 +161,10 @@
*ngIf="createEventForm?.controls['agenda']?.touched && createEventForm?.controls['agenda'].errors?.required">
Agenda is mandatory
</mat-error>
<mat-error [hidden]="false"
*ngIf="createEventForm?.controls['agenda']?.touched && createEventForm?.controls['agenda'].errors?.noHtml">
HTML or Js is not allowed
</mat-error>
<mat-hint>{{agenda.value.length}}/500 characters</mat-hint>
</mat-form-field>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import _ from 'lodash'
import { TelemetryEvents } from '../model/telemetry.event.model'
import { ProfileV2UtillService } from '../services/home-utill.service'
import { MomentDateAdapter } from '@angular/material-moment-adapter'
import { preventHtmlAndJs } from '../../../validators/prevent-html-and-js.validator'
/* tslint:enable */

export const MY_FORMATS = {
Expand Down Expand Up @@ -151,8 +152,8 @@ export class EditEventComponent implements OnInit {
eventPicture: new FormControl('', [Validators.required]),
eventTitle: new FormControl('', [Validators.required]),
// summary: new FormControl('', []),
description: new FormControl('', [Validators.required]),
agenda: new FormControl('', []),
description: new FormControl('', [Validators.required, preventHtmlAndJs()]),
agenda: new FormControl('', [preventHtmlAndJs()]),
// isItKarmayogiTalk: new FormControl('', []),
eventType: new FormControl('', [Validators.required]),
eventDate: new FormControl('', [Validators.required]),
Expand Down
Loading

0 comments on commit 02b0826

Please sign in to comment.