From eb75c92dcb8f092f61524bffedf7249404bccb70 Mon Sep 17 00:00:00 2001 From: Salman Afzal Date: Wed, 1 Apr 2020 12:38:50 +0300 Subject: [PATCH] added ar text for timeinput as well --- .../app/absence/submit-absence/submit-absence.component.ts | 6 ++++-- Mohem/src/app/eit/add-eit/add-eit.component.ts | 6 ++++-- Mohem/src/app/uI-elements/date-time.input.ts | 7 +++++-- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/Mohem/src/app/absence/submit-absence/submit-absence.component.ts b/Mohem/src/app/absence/submit-absence/submit-absence.component.ts index 27a914b5..45f7acad 100644 --- a/Mohem/src/app/absence/submit-absence/submit-absence.component.ts +++ b/Mohem/src/app/absence/submit-absence/submit-absence.component.ts @@ -376,7 +376,8 @@ export class SubmitAbsenceComponent implements OnInit { containerId, feildsList[i].MOBILE_ENABLED, feildsList[i].DISPLAY_FLAG, - feildsList[i].REQUIRED_FLAG + feildsList[i].REQUIRED_FLAG, + this.direction ); } else { this.datetimeInput = new DateTimeInput( @@ -386,7 +387,8 @@ export class SubmitAbsenceComponent implements OnInit { containerId, feildsList[i].MOBILE_ENABLED, feildsList[i].DISPLAY_FLAG, - feildsList[i].REQUIRED_FLAG + feildsList[i].REQUIRED_FLAG, + this.direction ); } const elem = document.getElementById( diff --git a/Mohem/src/app/eit/add-eit/add-eit.component.ts b/Mohem/src/app/eit/add-eit/add-eit.component.ts index 3ecea472..48ab9c4d 100644 --- a/Mohem/src/app/eit/add-eit/add-eit.component.ts +++ b/Mohem/src/app/eit/add-eit/add-eit.component.ts @@ -254,7 +254,8 @@ export class AddEitComponent implements OnInit { containerId, feildsList[i].MOBILE_ENABLED, feildsList[i].DISPLAY_FLAG, - feildsList[i].REQUIRED_FLAG + feildsList[i].REQUIRED_FLAG, + this.direction ); } else { this.datetimeInput = new DateTimeInput( @@ -264,7 +265,8 @@ export class AddEitComponent implements OnInit { containerId, feildsList[i].MOBILE_ENABLED, feildsList[i].DISPLAY_FLAG, - feildsList[i].REQUIRED_FLAG + feildsList[i].REQUIRED_FLAG, + this.direction ); } const elem = document.getElementById( diff --git a/Mohem/src/app/uI-elements/date-time.input.ts b/Mohem/src/app/uI-elements/date-time.input.ts index 9225c9fc..05e63bad 100644 --- a/Mohem/src/app/uI-elements/date-time.input.ts +++ b/Mohem/src/app/uI-elements/date-time.input.ts @@ -8,7 +8,8 @@ export class DateTimeInput extends UiElement { private containerId: string, private disabled: string, private hidden: string, - private required: string) { + private required: string, + private language: string = 'en') { super(elementId, containerId, ''); this.createElement(this.getTemplate()); @@ -20,6 +21,8 @@ export class DateTimeInput extends UiElement { } public getTemplate() { let requiredClass: string = ""; + const doneText = this.language === 'en' ? 'Done' : 'تم'; + const cancelText = this.language === 'en' ? 'Cancel' : 'إلغاء'; let disaledClass = ""; //let timeValue=null; //let dateValue=null; @@ -45,7 +48,7 @@ export class DateTimeInput extends UiElement { "" + " " + this.label + "" + // "
" + this.value + "
" + - "" + + "" + // " "+ // " "+ // " "+