Merge branch 'lock_actions' into 'develop'

Profile now is saved to store on updates. Various fixes. application.submit restructured etc

See merge request !104
parents 64f0a4b0 64c71ff5
......@@ -83,6 +83,12 @@ class ApplicationSubmit extends ControllerBase {
'certificatetype' => $applicationForm[0][certificatetype],
//'lastam' => $applicationForm[0][lastam],
'currentclass' => $applicationForm[0][currentclass],
'guardian_name' => $applicationForm[0][cu_name],
'guardian_surname' => $applicationForm[0][cu_surname],
'guardian_fathername' => $applicationForm[0][cu_fathername],
'guardian_mothername' => $applicationForm[0][cu_mothername],
'agreement' => $applicationForm[0][disclaimer_checked],
//'currentepal' => $applicationForm[0][currentepal],
//'currentsector' => $applicationForm[0][currentsector],
'points' => $applicationForm[0][points],
......
......@@ -50,12 +50,30 @@ class CurrentUser extends ControllerBase
], Response::HTTP_FORBIDDEN);
}
$epalConfigs = $this->entityTypeManager->getStorage('epal_config')->loadByProperties(array('name' => 'epal_config'));
$epalConfig = reset($epalConfigs);
if (!$epalConfig) {
return $this->respondWithStatus([
'message' => t("Configuration not found"),
], Response::HTTP_FORBIDDEN);
}
$userRoles = $user->getRoles();
foreach ($userRoles as $userRole) {
if (($userRole === 'epal') || ($userRole === 'regioneduadmin') || ($userRole === 'eduadmin')) {
return $this->respondWithStatus([
'name' => $user->mail->value,
'title' => $user->init->value,
'cu_name' => $user->mail->value,
'cu_surname' => '',
'cu_fathername' => '',
'cu_mothername' => '',
'cu_email' => '',
'minedu_username' => '',
'minedu_userpassword' => '',
'lock_capacity' => $epalConfig->lock_school_capacity->value,
'lock_students' => $epalConfig->lock_school_students_view->value,
'lock_application' => $epalConfig->lock_application->value,
'disclaimer_checked' => "0",
'title' => $user->init->value
], Response::HTTP_OK);
} else if ($userRole === 'applicant') {
break;
......@@ -66,8 +84,24 @@ class CurrentUser extends ControllerBase
$epalUsers = $this->entityTypeManager->getStorage('epal_users')->loadByProperties(array('authtoken' => $authToken));
$epalUser = reset($epalUsers);
if ($epalUser) {
$userName = $epalUser->name->value;
$userSurname = $epalUser->surname->value;
$userFathername = $epalUser->fathername->value;
$userMothername = $epalUser->mothername->value;
$userEmail = $user->mail->value;
return $this->respondWithStatus([
'name' => $epalUser->name->value,
'cu_name' => mb_substr($epalUser->name->value,0,4,'UTF-8') !== "####" ? $epalUser->name->value : '',
'cu_surname' => mb_substr($epalUser->surname->value,0,4,'UTF-8') !== "####" ? $epalUser->surname->value : '',
'cu_fathername' => mb_substr($epalUser->fathername->value,0,4,'UTF-8') !== "####" ? $epalUser->fathername->value : '',
'cu_mothername' => mb_substr($epalUser->mothername->value,0,4,'UTF-8') !== "####" ? $epalUser->mothername->value : '',
'cu_email' => mb_substr($user->mail->value,0,4,'UTF-8') !== "####" ? $user->mail->value : '',
'minedu_username' => '',
'minedu_userpassword' => '',
'lock_capacity' => $epalConfig->lock_school_capacity->value,
'lock_students' => $epalConfig->lock_school_students_view->value,
'lock_application' => $epalConfig->lock_application->value,
'disclaimer_checked' => "0",
'verificationCodeVerified' => $epalUser->verificationcodeverified->value,
], Response::HTTP_OK);
} else {
return $this->respondWithStatus([
......
......@@ -206,7 +206,7 @@ class EpalConfig extends ContentEntityBase implements EpalConfigInterface {
->setSettings(array(
'text_processing' => 0,
))
->setRequired(TRUE)
->setRequired(FALSE)
->setDefaultValue(FALSE)
->setDisplayOptions('view', array(
'label' => 'above',
......@@ -226,7 +226,7 @@ class EpalConfig extends ContentEntityBase implements EpalConfigInterface {
->setSettings(array(
'text_processing' => 0,
))
->setRequired(TRUE)
->setRequired(FALSE)
->setDefaultValue(FALSE)
->setDisplayOptions('view', array(
'label' => 'above',
......@@ -246,7 +246,7 @@ class EpalConfig extends ContentEntityBase implements EpalConfigInterface {
->setSettings(array(
'text_processing' => 0,
))
->setRequired(TRUE)
->setRequired(FALSE)
->setDefaultValue(FALSE)
->setDisplayOptions('view', array(
'label' => 'above',
......
......@@ -505,7 +505,7 @@ class EpalStudent extends ContentEntityBase implements EpalStudentInterface {
->setLabel(t('Ημερομηνία γέννησης μαθητή'))
->setDescription(t('Δώσε την Ημερομηνία γέννησης μαθητή.'))
->setSetting('datetime_type', 'date')
->setRequired(false)
->setRequired(true)
->setDisplayOptions('view', array(
'label' => 'above',
'type' => 'string',
......@@ -543,7 +543,7 @@ class EpalStudent extends ContentEntityBase implements EpalStudentInterface {
'max_length' => 50,
'text_processing' => 0,
))
->setRequired(false)
->setRequired(true)
->setDefaultValue('')
->setDisplayOptions('view', array(
'label' => 'above',
......@@ -564,7 +564,7 @@ class EpalStudent extends ContentEntityBase implements EpalStudentInterface {
'max_length' => 50,
'text_processing' => 0,
))
->setRequired(false)
->setRequired(true)
->setDefaultValue('')
->setDisplayOptions('view', array(
'label' => 'above',
......@@ -585,7 +585,7 @@ class EpalStudent extends ContentEntityBase implements EpalStudentInterface {
'max_length' => 50,
'text_processing' => 0,
))
->setRequired(false)
->setRequired(true)
->setDefaultValue('')
->setDisplayOptions('view', array(
'label' => 'above',
......@@ -606,7 +606,7 @@ class EpalStudent extends ContentEntityBase implements EpalStudentInterface {
'max_length' => 50,
'text_processing' => 0,
))
->setRequired(false)
->setRequired(true)
->setDefaultValue('')
->setDisplayOptions('view', array(
'label' => 'above',
......@@ -627,6 +627,7 @@ class EpalStudent extends ContentEntityBase implements EpalStudentInterface {
'max_length' => 20,
'text_processing' => 0,
))
->setRequired(false)
->setDefaultValue('')
->setDisplayOptions('view', array(
'label' => 'above',
......@@ -647,6 +648,7 @@ class EpalStudent extends ContentEntityBase implements EpalStudentInterface {
'max_length' => 100,
'text_processing' => 0,
))
->setRequired(true)
->setDefaultValue('')
->setDisplayOptions('view', array(
'label' => 'above',
......@@ -667,27 +669,7 @@ class EpalStudent extends ContentEntityBase implements EpalStudentInterface {
'max_length' => 10,
'text_processing' => 0,
))
->setDefaultValue('')
->setDisplayOptions('view', array(
'label' => 'above',
'type' => 'string',
'weight' => -4,
))
->setDisplayOptions('form', array(
'type' => 'string_textfield',
'weight' => -4,
))
->setDisplayConfigurable('form', TRUE)
->setDisplayConfigurable('view', TRUE);
$fields['regionarea'] = BaseFieldDefinition::create('string')
->setLabel(t('Πόλη-Κοινότητα'))
->setDescription(t('Δώσε την πόλη ή κοινότητα που διαμένεις.'))
->setSettings(array(
'max_length' => 100,
'text_processing' => 0,
))
->setDefaultValue('')
->setRequired(true)
->setDisplayOptions('view', array(
'label' => 'above',
'type' => 'string',
......@@ -707,6 +689,7 @@ class EpalStudent extends ContentEntityBase implements EpalStudentInterface {
'max_length' => 100,
'text_processing' => 0,
))
->setRequired(true)
->setDefaultValue('')
->setDisplayOptions('view', array(
'label' => 'above',
......@@ -727,6 +710,7 @@ class EpalStudent extends ContentEntityBase implements EpalStudentInterface {
'max_length' => 50,
'text_processing' => 0,
))
->setRequired(true)
->setDefaultValue('')
->setDisplayOptions('view', array(
'label' => 'above',
......@@ -747,6 +731,7 @@ class EpalStudent extends ContentEntityBase implements EpalStudentInterface {
'max_length' => 10,
'text_processing' => 0,
))
->setRequired(false)
->setDefaultValue('')
->setDisplayOptions('view', array(
'label' => 'above',
......@@ -912,6 +897,7 @@ class EpalStudent extends ContentEntityBase implements EpalStudentInterface {
'max_length' => 50,
'text_processing' => 0,
))
->setRequired(true)
->setDefaultValue('')
->setDisplayOptions('view', array(
'label' => 'above',
......@@ -932,6 +918,7 @@ class EpalStudent extends ContentEntityBase implements EpalStudentInterface {
'max_length' => 50,
'text_processing' => 0,
))
->setRequired(true)
->setDefaultValue('')
->setDisplayOptions('view', array(
'label' => 'above',
......@@ -969,7 +956,7 @@ class EpalStudent extends ContentEntityBase implements EpalStudentInterface {
->setSettings(array(
'text_processing' => 0,
))
->setRequired(false)
->setRequired(true)
->setDisplayOptions('view', array(
'label' => 'above',
'type' => 'boolean',
......@@ -982,6 +969,90 @@ class EpalStudent extends ContentEntityBase implements EpalStudentInterface {
->setDisplayConfigurable('form', TRUE)
->setDisplayConfigurable('view', TRUE);
$fields['guardian_name'] = BaseFieldDefinition::create('string')
->setLabel(t('Όνομα κηδεμόνα'))
->setDescription(t('Δώσε το όνομα κηδεμόνα.'))
->setSettings(array(
'max_length' => 50,
'text_processing' => 0,
))
->setRequired(true)
->setDefaultValue('')
->setDisplayOptions('view', array(
'label' => 'above',
'type' => 'string',
'weight' => -4,
))
->setDisplayOptions('form', array(
'type' => 'string_textfield',
'weight' => -4,
))
->setDisplayConfigurable('form', TRUE)
->setDisplayConfigurable('view', TRUE);
$fields['guardian_surname'] = BaseFieldDefinition::create('string')
->setLabel(t('Επώνυμο κηδεμόνα'))
->setDescription(t('Δώσε το επώνυμο κηδεμόνα.'))
->setSettings(array(
'max_length' => 50,
'text_processing' => 0,
))
->setRequired(true)
->setDefaultValue('')
->setDisplayOptions('view', array(
'label' => 'above',
'type' => 'string',
'weight' => -4,
))
->setDisplayOptions('form', array(
'type' => 'string_textfield',
'weight' => -4,
))
->setDisplayConfigurable('form', TRUE)
->setDisplayConfigurable('view', TRUE);
$fields['guardian_fathername'] = BaseFieldDefinition::create('string')
->setLabel(t('Όνομα πατέρα κηδεμόνα'))
->setDescription(t('Δώσε το όνομα πατέρα του κηδεμόνα.'))
->setSettings(array(
'max_length' => 50,
'text_processing' => 0,
))
->setRequired(true)
->setDefaultValue('')
->setDisplayOptions('view', array(
'label' => 'above',
'type' => 'string',
'weight' => -4,
))
->setDisplayOptions('form', array(
'type' => 'string_textfield',
'weight' => -4,
))
->setDisplayConfigurable('form', TRUE)
->setDisplayConfigurable('view', TRUE);
$fields['guardian_mothername'] = BaseFieldDefinition::create('string')
->setLabel(t('Όνομα μητέρας κηδεμόνα'))
->setDescription(t('Δώσε το όνομα μητέρας του κηδεμόνα.'))
->setSettings(array(
'max_length' => 50,
'text_processing' => 0,
))
->setRequired(true)
->setDefaultValue('')
->setDisplayOptions('view', array(
'label' => 'above',
'type' => 'string',
'weight' => -4,
))
->setDisplayOptions('form', array(
'type' => 'string_textfield',
'weight' => -4,
))
->setDisplayConfigurable('form', TRUE)
->setDisplayConfigurable('view', TRUE);
$fields['status'] = BaseFieldDefinition::create('boolean')
->setLabel(t('Publishing status'))
->setDescription(t('A boolean indicating whether the EPAL Student is published.'))
......
import { LOGININFO_SAVE, LOGININFO_RECEIVED } from '../constants';
import { LOGININFO_SAVE, PROFILE_SAVE, LOGININFO_RECEIVED } from '../constants';
import { LOGININFO_INIT } from '../constants';
import { Injectable } from '@angular/core';
import { NgRedux } from 'ng2-redux';
......@@ -32,6 +32,15 @@ export class LoginInfoActions {
});
};
saveProfile = (profile) => {
return this._ngRedux.dispatch({
type: PROFILE_SAVE,
payload: {
profile
}
});
};
initLoginInfo = () => {
return this._ngRedux.dispatch({
......
......@@ -6,6 +6,7 @@ import { NgModule } from '@angular/core';
import { NgReduxModule, DevToolsExtension, NgRedux } from 'ng2-redux';
import {BrowserModule} from '@angular/platform-browser';
import { CookieModule } from 'ngx-cookie';
import { MyDatePickerModule } from 'mydatepicker';
import {
FormsModule,
ReactiveFormsModule,
......@@ -32,6 +33,8 @@ import {AuthService} from './services/auth.service';
import SchoolAuthGuard from './guards/school.auth.guard';
import StudentAuthGuard from './guards/student.auth.guard';
import RegionEduAuthGuard from './guards/regionedu.auth.guard';
import EduAdminAuthGuard from './guards/eduadmin.auth.guard';
import MinistryAuthGuard from './guards/ministry.auth.guard';
import { ACTION_PROVIDERS } from './actions';
import Home from './components/home';
......@@ -55,6 +58,7 @@ class MyLocalization extends NgLocalization {
@NgModule({
imports: [
BrowserModule,
MyDatePickerModule,
FormsModule,
RouterModule,
ReactiveFormsModule,
......@@ -81,7 +85,9 @@ class MyLocalization extends NgLocalization {
AuthService,
SchoolAuthGuard,
StudentAuthGuard,
RegionEduAuthGuard
RegionEduAuthGuard,
EduAdminAuthGuard,
MinistryAuthGuard
]
})
......
<div class = "loading" *ngIf="(showLoader$ | async) === true"></div>
<div id="headerNotice" (onHidden)="onHidden()" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header {{modalHeader | async}}" >
<h3 class="modal-title pull-left"><i class="fa fa-check-square-o"></i>&nbsp;&nbsp;{{ modalTitle | async }}</h3>
<button type="button" class="close pull-right" aria-label="Close" (click)="hideModal()">
<span aria-hidden="true"><i class="fa fa-times"></i></span>
</button>
</div>
<div class="modal-body">
<p>{{ modalText | async }}</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">Κλείσιμο</button>
</div>
</div>
</div>
</div>
<div class="header-wrapper">
<header id="navbar" role="banner" class="navbar navbar-default">
......
......@@ -28,6 +28,9 @@ export default class HeaderComponent implements OnInit, OnDestroy {
private loginInfo$: BehaviorSubject<ILoginInfo>;
public cuser :any;
private showLoader$: BehaviorSubject<boolean>;
private modalTitle: BehaviorSubject<string>;
private modalText: BehaviorSubject<string>;
private modalHeader: BehaviorSubject<string>;
constructor( private _ata: LoginInfoActions,
private _hds: HelperDataService,
......@@ -46,10 +49,14 @@ export default class HeaderComponent implements OnInit, OnDestroy {
this.cuName = '';
this.loginInfo$ = new BehaviorSubject(LOGININFO_INITIAL_STATE);
this.showLoader$ = new BehaviorSubject(false);
this.modalTitle = new BehaviorSubject("");
this.modalText = new BehaviorSubject("");
this.modalHeader = new BehaviorSubject("");
};
ngOnInit() {
(<any>$('#headerNotice')).appendTo("body");
this._ngRedux.select(state => {
if (state.loginInfo.size > 0) {
state.loginInfo.reduce(({}, loginInfoToken) => {
......@@ -66,6 +73,7 @@ export default class HeaderComponent implements OnInit, OnDestroy {
}
ngOnDestroy() {
(<any>$('#headerNotice')).remove();
this.loginInfo$.unsubscribe();
}
......@@ -104,4 +112,12 @@ export default class HeaderComponent implements OnInit, OnDestroy {
});
}
public showModal():void {
(<any>$('#headerNotice')).modal('show');
}
public hideModal():void {
(<any>$('#headerNotice')).modal('hide');
}
}
......@@ -32,6 +32,7 @@ import { API_ENDPOINT, API_ENDPOINT_PARAMS } from '../app.settings';
</button>
</div>
</div>
</form>
</div>
`
......
......@@ -116,8 +116,7 @@ export default class MinistryHome implements OnInit {
if (success) {
this.authRole = 'supervisor';
this._hds.setMineduCurrentUser(this.userDataGroup.value['minedu_username'], this.userDataGroup.value['minedu_userpassword'], this.authRole);
console.log("MPHKA");
//this.validLogin = true;
this.validLogin = 1;
this.userDataGroup.value['cu_name'] = this.userDataGroup.value['minedu_username'];
this.userDataGroup.value['auth_role'] = 'supervisor';
......
<div class="row">
<breadcrumbs></breadcrumbs>
</div>
<div class = "loading" *ngIf="(criteria$ | async).size === 0"></div>
<div class = "loading" *ngIf="(criteria$ | async).size === 0 || (loginInfo$ | async).size === 0"></div>
<div id="applicationFormNotice" (onHidden)="onHidden()" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header {{modalHeader | async}}" >
<h3 class="modal-title pull-left"><i class="fa fa-check-square-o"></i>&nbsp;&nbsp;{{ modalTitle | async }}</h3>
<button type="button" class="close pull-right" aria-label="Close" (click)="hideModal()">
<span aria-hidden="true"><i class="fa fa-times"></i></span>
</button>
</div>
<div class="modal-body">
<p>{{ modalText | async }}</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">Κλείσιμο</button>
</div>
</div>
</div>
</div>
<h4> Προσωπικά Στοιχεία Μαθητή </h4>
<form novalidate [formGroup]="studentDataGroup" #form>
<form [formGroup]="applicantDataGroup">
<p style="margin-top: 20px; line-height: 2em;"> Παρακαλώ συμπληρώστε τα στοιχεία του μαθητή και στη συνέχεια επιλέξτε <i>Συνέχεια</i>. <strong>Προσοχη!</strong> Παρακαλώ να συμπληρώσετε τα στοιχεία ακριβώς όπως είναι στον τελευταίο τίτλο κτήσης απολυτηρίου/ πτυχίου του μαθητή.</p>
<p style="margin-top: 20px; line-height: 2em;"> <strong> Η ακρίβεια των στοιχείων που υποβάλλονται με αυτή τη δήλωση μπορεί να ελεγχθεί με βάση το αρχείο άλλων υπηρεσιών (άρθρο 8 παρ. 4 Ν. 1599/1986)</strong></p>
<p style="margin-top: 20px; line-height: 2em;"> <b> Η ακρίβεια των στοιχείων που υποβάλλονται με αυτή τη δήλωση μπορεί να ελεγχθεί με βάση το αρχείο άλλων υπηρεσιών (άρθρο 8 παρ. 4 Ν. 1599/1986)</b></p>
<p style="margin-top: 20px; line-height: 2em;"> <b> Όλα τα πεδία που συνοδεύονται από (*) είναι απαραίτητο να συμπληρωθούν</b></p>
<table>
<tr><td>
<div class="form-group">
<label for="guardianfirstname">Όνομα κηδεμόνα</label><input class="form-control" type="text" formControlName="guardianfirstname" disabled = "true">
<div *ngFor="let loginInfoRow$ of loginInfo$ | async; let i=index;" style = "margin-bottom: 20px;" >
<div class="row evenin" style="margin: 0px 2px 0px 2px; line-height: 2em;">
<div class="col-md-12" style="font-size: 1em; font-weight: bold; text-align: center;">Στοιχεία αιτούμενου</div>
</div>
</td>
<td>
<div class="form-group">
<label for="guardiansurname">Επώνυμο κηδεμόνα</label><input class="form-control" type="text" formControlName="guardiansurname" disabled = "true">
<div class="row oddin" style="margin: 0px 2px 0px 2px; line-height: 2em;">
<div class="col-md-3" style="font-size: 0.8em;">Όνομα</div>
<div class="col-md-3" style="font-size: 0.8em; font-weight: bold">{{ loginInfoRow$.cu_name }}</div>
<div class="col-md-3" style="font-size: 0.8em;">Επώνυμο</div>
<div class="col-md-3" style="font-size: 0.8em; font-weight: bold">{{ loginInfoRow$.cu_surname }}</div>
</div>
</td></tr>
</table>
</form>
<div class="row oddin" style="margin: 0px 2px 0px 2px; line-height: 2em;">
<div class="col-md-3" style="font-size: 0.8em;">Όνομα πατέρα</div>
<div class="col-md-3" style="font-size: 0.8em; font-weight: bold">{{ loginInfoRow$.cu_fathername }}</div>
<div class="col-md-3" style="font-size: 0.8em;">Όνομα μητέρας</div>
<div class="col-md-3" style="font-size: 0.8em; font-weight: bold">{{ loginInfoRow$.cu_mothername }}</div>
</div>
</div>
<div class="form-group">
<label for="name">Όνομα μαθητή</label><input class="form-control" type="text" formControlName="name">
<label for="name">Όνομα μαθητή(<span style="color: #ff0000;">*</span>)</label><input class="form-control" type="text" formControlName="name">
</div>
<div class="alert alert-danger" *ngIf="studentDataGroup.get('name').touched && studentDataGroup.get('name').hasError('required')">
Το πεδίο δεν μπορεί να αφεθεί κενό!
......@@ -34,7 +60,7 @@
</div>
<div class="form-group">
<label for="studentsurname">Επώνυμο μαθητή</label><input class="form-control" type="text" formControlName="studentsurname">
<label for="studentsurname">Επώνυμο μαθητή(<span style="color: #ff0000;">*</span>)</label><input class="form-control" type="text" formControlName="studentsurname">
</div>
<div class="alert alert-danger" *ngIf="studentDataGroup.get('studentsurname').touched && studentDataGroup.get('studentsurname').hasError('required')">
Το πεδίο δεν μπορεί να αφεθεί κενό!
......@@ -44,7 +70,7 @@
</div>
<div class="form-group">
<label for="fatherfirstname">Όνομα πατέρα</label><input class="form-control" type="text" formControlName="fatherfirstname">
<label for="fatherfirstname">Όνομα πατέρα(<span style="color: #ff0000;">*</span>)</label><input class="form-control" type="text" formControlName="fatherfirstname">
</div>
<div class="alert alert-danger" *ngIf="studentDataGroup.get('fatherfirstname').touched && studentDataGroup.get('fatherfirstname').hasError('required')">
Το πεδίο δεν μπορεί να αφεθεί κενό!
......@@ -54,7 +80,7 @@
</div>
<div class="form-group">
<label for="fathersurname">Επώνυμο πατέρα</label><input class="form-control" type="text" formControlName="fathersurname">
<label for="fathersurname">Επώνυμο πατέρα(<span style="color: #ff0000;">*</span>)</label><input class="form-control" type="text" formControlName="fathersurname">
</div>
<div class="alert alert-danger" *ngIf="studentDataGroup.get('fathersurname').touched && studentDataGroup.get('fathersurname').hasError('required')">
Το πεδίο δεν μπορεί να αφεθεί κενό!
......@@ -64,7 +90,7 @@
</div>
<div class="form-group">
<label for="motherfirstname">Όνομα μητέρας</label><input class="form-control" type="text" formControlName="motherfirstname">
<label for="motherfirstname">Όνομα μητέρας(<span style="color: #ff0000;">*</span>)</label><input class="form-control" type="text" formControlName="motherfirstname">
</div>
<div class="alert alert-danger" *ngIf="studentDataGroup.get('motherfirstname').touched && studentDataGroup.get('motherfirstname').hasError('required')">
Το πεδίο δεν μπορεί να αφεθεί κενό!
......@@ -74,7 +100,7 @@
</div>
<div class="form-group">
<label for="mothersurname">Γένος μητέρας</label><input class="form-control" type="text" formControlName="mothersurname">
<label for="mothersurname">Γένος μητέρας(<span style="color: #ff0000;">*</span>)</label><input class="form-control" type="text" formControlName="mothersurname">
</div>
<div class="alert alert-danger" *ngIf="studentDataGroup.get('mothersurname').touched && studentDataGroup.get('mothersurname').hasError('required')">
Το πεδίο δεν μπορεί να αφεθεί κενό!
......@@ -83,35 +109,21 @@
Δεν επιτρέπονται ψηφία ή άλλοι μη έγκυροι χαρακτήρες σε αυτό το πεδίο!
</div>
<!--
<div class="form-group">
<label for="studentbirthdate">Ημερομηνία γέννησης</label>
<input class="form-control" type="text" formControlName="studentbirthdate">
</div>
<div class="alert alert-danger" *ngIf="studentDataGroup.get('studentbirthdate').pristine ">
Η ημερομηνία γέννησης πρέπει να είναι της μορφής ΗΗ/ΜΜ/ΕΕΕΕ
</div>
<div class="alert alert-danger" *ngIf="studentDataGroup.get('studentbirthdate').dirty && studentDataGroup.get('studentbirthdate').hasError('pattern')">
Η ημερομηνία γέννησης πρέπει να είναι της μορφής ΗΗ/ΜΜ/ΕΕΕΕ
</div>
-->
<div class="form-group">
<label for="studentbirthdate">Ημερομηνία γέννησης</label>
<input class="form-control" type="date" formControlName="studentbirthdate">
<label for="studentbirthdate">Ημερομηνία γέννησης - Δεν πληκτρολογείτε. Επιλέξτε το εικονίδιο δεξιά!(<span style="color: #ff0000;">*</span>)</label>
<my-date-picker name="studentbirthdate" [options]="myDatePickerOptions"
formControlName="studentbirthdate" locale="el"></my-date-picker>
</div>
<div class="alert alert-danger" *ngIf="studentDataGroup.get('studentbirthdate').touched && studentDataGroup.get('studentbirthdate').hasError('required')">
Συμπληρώστε την ημερομηνία γέννησης του μαθητή!
</div>
<table>
<tr>
<td>
<div class="form-group">
<label for="regionaddress">Διεύθυνση κατοικίας</label><input class="form-control" type="text" formControlName="regionaddress">
<label for="regionaddress">Διεύθυνση κατοικίας(<span style="color: #ff0000;">*</span>)</label><input class="form-control" type="text" formControlName="regionaddress">
</div>
<div class="alert alert-danger" *ngIf="studentDataGroup.get('regionaddress').touched && studentDataGroup.get('regionaddress').hasError('required')">
Το πεδίο δεν μπορεί να αφεθεί κενό!
......@@ -122,7 +134,7 @@
</td>
<td>
<div class="form-group">
<label for="regiontk">TK </label><input class="form-control" type="text" formControlName="regiontk">
<label for="regiontk">TK(<span style="color: #ff0000;">*</span>)</label><input class="form-control" type="text" formControlName="regiontk">
</div>
<div class="alert alert-danger" *ngIf="studentDataGroup.get('regiontk').touched && studentDataGroup.get('regiontk').hasError('required')">
Το πεδίο δεν μπορεί να αφεθεί κενό!
......@@ -133,7 +145,7 @@
</td>
<td>
<div class="form-group">
<label for="regionarea">Πόλη/Περιοχή</label><input class="form-control" type="text" formControlName="regionarea">
<label for="regionarea">Πόλη/Περιοχή(<span style="color: #ff0000;">*</span>)</label><input class="form-control" type="text" formControlName="regionarea">
</div>
<div class="alert alert-danger" *ngIf="studentDataGroup.get('regionarea').touched && studentDataGroup.get('regionarea').hasError('required')">