Add privacy policy consent

revert-70aa11f8
charitha 7 years ago
parent d69ce0b9a1
commit f6d5498240

@ -54,6 +54,7 @@ $(document).ready(function(){
var emailInput = $("input#email"); var emailInput = $("input#email");
var passwordInput = $("input#password"); var passwordInput = $("input#password");
var passwordConfirmationInput = $("input#password_confirmation"); var passwordConfirmationInput = $("input#password_confirmation");
var privacyPolicyConsentInput = $("input#privacy-consent");
var username = usernameInput.val().trim(); var username = usernameInput.val().trim();
var firstname = firstnameInput.val(); var firstname = firstnameInput.val();
@ -61,6 +62,7 @@ $(document).ready(function(){
var emailAddress = emailInput.val(); var emailAddress = emailInput.val();
var password = passwordInput.val(); var password = passwordInput.val();
var passwordConfirmation = passwordConfirmationInput.val(); var passwordConfirmation = passwordConfirmationInput.val();
var privacyPolicyConsentChecked = privacyPolicyConsentInput.is(':checked');
var errorMsgWrapper = "#user-create-error-msg"; var errorMsgWrapper = "#user-create-error-msg";
var errorMsg = "#user-create-error-msg span"; var errorMsg = "#user-create-error-msg span";
@ -97,6 +99,9 @@ $(document).ready(function(){
} else if (password != passwordConfirmation) { } else if (password != passwordConfirmation) {
$(errorMsg).text("Please enter the same password for confirmation."); $(errorMsg).text("Please enter the same password for confirmation.");
$(errorMsgWrapper).removeClass("hidden"); $(errorMsgWrapper).removeClass("hidden");
} else if (!privacyPolicyConsentChecked) {
$(errorMsg).text("You need to agree with the Privacy policy in order to register with IoT Server.");
$(errorMsgWrapper).removeClass("hidden");
} else { } else {
$(errorMsgWrapper).addClass("hidden"); $(errorMsgWrapper).addClass("hidden");
$("#add-user-btn").prop('disabled', true); $("#add-user-btn").prop('disabled', true);

@ -3,7 +3,7 @@
{{#zone "content"}} {{#zone "content"}}
{{unit "uuf.unit.lib.form-validation"}} {{unit "uuf.unit.lib.form-validation"}}
<div class="container col-xs-12 col-sm-10 col-md-8 col-lg-6 col-centered wr-content wr-login col-centered sign-panel"> <div class="container col-xs-12 col-sm-10 col-md-8 col-lg-6 col-centered wr-content col-centered sign-panel">
<p class="page-sub-title">Register</p> <p class="page-sub-title">Register</p>
@ -59,11 +59,27 @@
class="form-control" placeholder="Confirm Password"/> class="form-control" placeholder="Confirm Password"/>
</div> </div>
<div class="alert alert-warning" style="border-radius:5px"><p class="doc-link"> <div class="form-group">
This site uses cookies. By logging in to the site, you are agreeing on the usage of cookies. For more information, refer <a href="{{@unit.publicUri}}/privacy-policies/cookie-policy" style="color:#ffffff;" <div class="alert alert-warning" style="border-radius:5px;max-width: 750px;">
target="_blank"><u>cookie policy</u></a> and <p class="doc-link">
<a href="{{@unit.publicUri}}/privacy-policies/privacy-policy" style="color:#ffffff;" <b>This site uses cookies. By logging in to the site, you are agreeing on the usage of cookies.
target="_blank"><u>privacy policy</u></a></p> For more information, refer
<a href="/privacy-policies/cookie-policy" style="color:#ffffff;" target="_blank">
<u>Cookie policy</u>
</a>.
</b>
</p>
</div>
</div>
<div class="form-group">
<div class="checkbox form-control" style="border: none;">
<label>
<input class="permissionItem" id="privacy-consent" type="checkbox">
I hereby confirm that I have read and understood the
<a href="/privacy-policies/privacy-policy" target="_blank"><u>Privacy policy</u></a>.
</label>
</div>
</div> </div>
<div class="wr-input-control"> <div class="wr-input-control">

Loading…
Cancel
Save