Skip to content
This repository has been archived by the owner on Feb 4, 2025. It is now read-only.

Commit

Permalink
Merge pull request #286 from CampusDual/BFS42024-342
Browse files Browse the repository at this point in the history
tarea 342
  • Loading branch information
javi2004 authored Jan 22, 2025
2 parents 9cd6f71 + 9124b56 commit 46fe8c3
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -336,4 +336,10 @@ fieldset {
font-size: 0.9rem;
margin-top: 5px;
gap: 5px;
}

.error-message {
color: red;
font-size: 12px;
margin-top: 5px;
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@
</div>
<div class="nombre">
<label for="name">{{'REQ_LNAME'|oTranslate}}</label>
<o-text-input attr="name" required="yes" id="name" [validators]="validatorsWithoutSpace" max-length="150"></o-text-input>
<o-text-input attr="name" required="yes" id="name" [validators]="validatorsWithoutSpace"
max-length="150"></o-text-input>
</div>
<div class="apellido">
<label for="surname1">{{'REQ_LSURNAME1'|oTranslate}}</label>
<o-text-input attr="surname1" [validators]="validatorsWithoutSpace" required="yes" max-length="150"></o-text-input>
<o-text-input attr="surname1" [validators]="validatorsWithoutSpace" required="yes"
max-length="150"></o-text-input>
</div>
<div class="apellido2">
<label for="surname2">{{'LSURNAME2' | oTranslate}}</label>
Expand Down Expand Up @@ -81,33 +83,36 @@
</div>
<div class="contraseña">
<label for="REQ_PASSWORD">{{'PASSWORD' | oTranslate}}</label>
<o-password-input attr="usr_password" required="no" max-length="60" show-password-button="false" in-length="8"
[validators]="validatorsNewPasswordArray">
<o-password-input attr="usr_password" required="no" max-length="60" show-password-button="false"
in-length="8" [validators]="validatorsNewPasswordArray">
<o-validator error-name="hasCapitalCase" error-text="VALIDATOR.HASCAPITALCASE"></o-validator>
<o-validator error-name="hasNumber" error-text="VALIDATOR.HASNUMBER"></o-validator>
<o-validator error-name="hasSmallCase" error-text="VALIDATOR.HASSMALLCASE"></o-validator>
</o-password-input>
</div>
</fieldset>
<br>
<div class="contacto">
<fieldset title="{{'Contact'|oTranslate}}">
<legend>{{"Contact"|oTranslate}}</legend>
<div class="telefono">
<label for="REQ_LPHONE">{{'LPHONE' | oTranslate}}</label>
<o-phone-input attr="phone" required="no" automatic-binding="false"
[data]="'+34 000000000'"></o-phone-input>
</div>
<div class="email">
<label for="Personal email">{{'REQ_LEMAIL'|oTranslate}}</label>
<o-email-input attr="personal_email" max-length="200" required="yes"></o-email-input>
</div>
<div class="emailCampus">
<label for="campus_email">{{'LCAMPUS_EMAIL' | oTranslate}}</label>
<o-email-input attr="campus_email" max-length="200" required="no"></o-email-input>
</div>
</fieldset>
</div>
<div class="contacto">
<fieldset title="{{'Contact'|oTranslate}}">
<legend>{{"Contact"|oTranslate}}</legend>
<div class="telefono">
<label for="REQ_LPHONE">{{'LPHONE' | oTranslate}}</label>

<o-phone-input attr="phone" required="no" automatic-binding="false" [data]="'+34 000000000'"
[(ngModel)]="phoneNumber" (ngModelChange)="validatePhoneNumber()">
</o-phone-input>

</div>
<div class="email">
<label for="Personal email">{{'REQ_LEMAIL'|oTranslate}}</label>
<o-email-input attr="personal_email" max-length="200" required="yes"></o-email-input>
</div>
<div class="emailCampus">
<label for="campus_email">{{'LCAMPUS_EMAIL' | oTranslate}}</label>
<o-email-input attr="campus_email" max-length="200" required="no"></o-email-input>
</div>
</fieldset>
</div>
</div>
</div>
</mat-tab>
Expand All @@ -128,7 +133,7 @@
</div>
<div class="fctStart">
<label for="fct_start">{{'LFCT_START' | oTranslate}}</label>
<o-date-input #startdate attr="fct_start" required="no" format="DD/MM/YYYY"
<o-date-input #startdate attr="fct_start" required="no" format="DD/MM/YYYY"
(onValueChange)="throwChange(enddate)">
<o-validator error-name="wrongendate" error-text="END_DATE_MORE_THAN_INIT_DATE"></o-validator>
</o-date-input>
Expand All @@ -144,4 +149,4 @@
</div>
</mat-tab>
</mat-tab-group>
</o-form>
</o-form>
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,18 @@ showAlert() {
}
}

phoneNumber: string = '+34 000000000';
invalidPhone: boolean = false;
validatePhoneNumber(): void {
const cleanedPhone = this.phoneNumber.replace(/\D/g, '');
if (cleanedPhone !== this.phoneNumber) {
this.invalidPhone = true;
} else {
this.invalidPhone = false;
}
this.phoneNumber = cleanedPhone;
}

}


Expand Down

0 comments on commit 46fe8c3

Please sign in to comment.