Skip to content

Commit

Permalink
[UPS-4769] Feat: changes for registration of -16
Browse files Browse the repository at this point in the history
  • Loading branch information
hirviid committed Dec 15, 2023
1 parent 6092d80 commit 3a65be8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 18 deletions.
4 changes: 0 additions & 4 deletions app/scripts/registration/registration-modal.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,6 @@ function RegistrationModalController (
};

controller.submitContactDataForm = function(contactDataForm) {
if (controller.passholder.isUnderAge()) {
controller.excludeEmail = true;
}

if (controller.hasEmailOrEmailConfirmedState === emailFieldStatus.initial && !controller.passholder.contact.email && !controller.excludeEmail) {
controller.hasEmailOrEmailConfirmedState = emailFieldStatus.needsConfirmation;
return;
Expand Down
17 changes: 7 additions & 10 deletions app/views/registration/contact-data-step.html
Original file line number Diff line number Diff line change
@@ -1,29 +1,26 @@
<form name="contactDataForm" ng-submit="prc.submitContactDataForm(contactDataForm)" novalidate ng-disabled="prc.formSubmitBusy">
<div class="modal-body">
<div class="container-fluid">
<p style="text-align: center; color: #777777" ng-show="prc.passholder.isUnderAge()">
<strong>Voor -16 jarigen kan je geen contactgegevens invullen<br/> n.a.v. privacywetgeving minderjarigen.</strong>
</p>
<fieldset ng-disabled="prc.formSubmitBusy">
<div class="field-group">
<label class="control-label" for="telephone">
Telefoon
Telefoon <span ng-show="prc.passholder.isUnderAge()">van ouder</span>
</label>
<input type="text" class="form-control" id="telephone" name="telephone" ng-model="prc.passholder.contact.telephoneNumber" ng-disabled="prc.passholder.isUnderAge()">
<input type="text" class="form-control" id="telephone" name="telephone" ng-model="prc.passholder.contact.telephoneNumber">
</div>
<div class="field-group">
<label class="control-label" for="gsm">
GSM
GSM <span ng-show="prc.passholder.isUnderAge()">van ouder</span>
</label>
<input type="text" class="form-control" id="gsm" name="gsm" ng-model="prc.passholder.contact.mobileNumber" ng-disabled="prc.passholder.isUnderAge()">
<input type="text" class="form-control" id="gsm" name="gsm" ng-model="prc.passholder.contact.mobileNumber">
</div>
<div class="field-group" ng-class="{ 'has-error': prc.showFieldError(contactDataForm, 'email') || (prc.hasEmailOrEmailConfirmedState === 'notConfirmed' && !prc.passholder.contact.email && !prc.excludeEmail) }">
<label class="control-label" for="email">
E-mailadres
E-mailadres <span ng-show="prc.passholder.isUnderAge()">van ouder</span>
</label>
<input type="email" class="form-control" id="email" name="email" ng-model="prc.passholder.contact.email"
ng-required="prc.hasEmailOrEmailConfirmedState === 'notConfirmed' && !prc.excludeEmail" ng-change="prc.emailChanged(contactDataForm)" ubr-ignore-field="prc.excludeEmail"
ng-disabled="prc.excludeEmail || prc.passholder.isUnderAge()" ng-pattern ='/^(([^<>()\[\]\.,;:\s@\"]+(\.[^<>()\[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i'>
ng-disabled="prc.excludeEmail" ng-pattern ='/^(([^<>()\[\]\.,;:\s@\"]+(\.[^<>()\[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i'>
<div ng-if="prc.showFieldError(contactDataForm, 'email')" class="text-danger small">
<div ng-show="contactDataForm.email.$error.pattern || contactDataForm.email.$error.email">Het e-mailadres heeft een verkeerd formaat.</div>
<div ng-show="contactDataForm.email.$error.inUse">Het e-mailadres is reeds in gebruik.</div>
Expand All @@ -32,7 +29,7 @@
</div>
<div ng-show="prc.emailValidated" class="text-danger small">Controleer het e-mailadres voor je naar de volgende stap gaat. Er staat misschien een fout in.</div>

<div ng-hide="prc.passholder.isUnderAge()" style="margin-top: 8px">
<div style="margin-top: 8px">
<p>
<strong>Vul het e-mailadres in zodat de pashouder alles uit z’n UiTPAS kan halen.</strong><br />
Zo kan de pashouder gebruikmaken van uitpas.be en de app om:
Expand Down
8 changes: 4 additions & 4 deletions app/views/registration/opt-ins-data-step.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
Privacy-en gebruiksvoorwaarden
</label>
<div class="checkbox">
<label for="legal-terms-digital" ng-class="{'disabled': prc.passholder.contact.email || prc.excludeEmail}"><input name="LegalTermsDigital" id="legal-terms-digital" type="checkbox" ng-model="prc.legalTermsDigital" ng-disabled="prc.passholder.contact.email || prc.excludeEmail"> Informatie wordt bezorgd via e-mail</label>
<label for="legal-terms-digital" ng-class="{'disabled': prc.excludeEmail}"><input name="LegalTermsDigital" id="legal-terms-digital" type="checkbox" ng-model="prc.legalTermsDigital" ng-disabled="prc.excludeEmail"> Informatie wordt bezorgd via e-mail</label>
</div>
<div class="checkbox">
<label for="legal-terms-paper"><input name="LegalTermsPaper" id="legal-terms-paper" type="checkbox" ng-model="prc.legalTermsPaper"> Folder over voorwaarden is overhandigd</label>
Expand All @@ -25,15 +25,15 @@
</label>
<p class="field-group-description">Pashouder wil informatie ontvangen via:</p>
<div class="checkbox">
<label for="optin-email" ng-class="{'disabled': prc.passholder.isUnderAge() || prc.excludeEmail}"><input name="optInEmail" id="optin-email" type="checkbox" ng-model="prc.optInEmail" ng-disabled="prc.passholder.isUnderAge() || prc.excludeEmail"> <strong ng-hide="prc.passholder.isUnderAge() || prc.excludeEmail">E-mail</strong><span ng-show="prc.passholder.isUnderAge() || prc.excludeEmail">E-mail</span>
<small ng-hide="prc.passholder.isUnderAge() || prc.excludeEmail">
<label for="optin-email" ng-class="{'disabled': prc.excludeEmail}"><input name="optInEmail" id="optin-email" type="checkbox" ng-model="prc.optInEmail" ng-disabled="prc.excludeEmail"> <strong ng-hide="prc.excludeEmail">E-mail</strong><span ng-show="prc.excludeEmail">E-mail</span>
<small ng-hide="prc.excludeEmail">
<br />
Hierdoor blijft de pashouder op de hoogte van leuke UiTPAS voordelen en activiteiten.
</small>
</label>
</div>
<div class="checkbox">
<label for="optin-sms" ng-class="{'disabled': prc.passholder.isUnderAge() || !prc.passholder.contact.mobileNumber}"><input name="optInSms" id="optin-sms" type="checkbox" ng-model="prc.passholder.optInPreferences.sms" ng-disabled="prc.passholder.isUnderAge() || !prc.passholder.contact.mobileNumber"> SMS</label>
<label for="optin-sms" ng-class="{'disabled': !prc.passholder.contact.mobileNumber}"><input name="optInSms" id="optin-sms" type="checkbox" ng-model="prc.passholder.optInPreferences.sms" ng-disabled="!prc.passholder.contact.mobileNumber"> SMS</label>
</div>
<div class="checkbox">
<label for="optin-post"><input name="optInPost" id="optin-post" type="checkbox" ng-model="prc.passholder.optInPreferences.post"> Post</label>
Expand Down

0 comments on commit 3a65be8

Please sign in to comment.