added optional forum terms of use to ACP, closes #775

v1.18.x
psychobunny 11 years ago
parent 267e7a3d5b
commit 4647b88071

@ -12,5 +12,7 @@
"confirm_password": "Confirm Password",
"confirm_password_placeholder": "Confirm Password",
"register_now_button": "Register Now",
"alternative_registration": "Alternative Registration"
"alternative_registration": "Alternative Registration",
"terms_of_use": "Terms of Use",
"agree_to_terms_of_use": "I agree to the Terms of Use"
}

@ -11,6 +11,7 @@ define(function() {
email_notify = $('#email-notify'),
password_notify = $('#password-notify'),
password_confirm_notify = $('#password-confirm-notify'),
agreeTerms = $('#agree-terms'),
validationError = false,
successIcon = '<i class="fa fa-check"></i>';
@ -154,6 +155,18 @@ define(function() {
e.preventDefault();
}
});
if(agreeTerms.length) {
agreeTerms.on('click', function() {
if ($(this).prop('checked')) {
register.removeAttr('disabled');
} else {
register.attr('disabled', 'disabled');
}
});
register.attr('disabled', 'disabled');
}
};
return Register;

@ -94,6 +94,8 @@
<input type="text" class="form-control" value="6" data-field="minimumPasswordLength"><br />
<strong>Maximum Signature Length</strong><br />
<input type="text" class="form-control" value="255" data-field="maximumSignatureLength"><br />
<strong>Forum Terms of Use <small>(Leave blank to disable)</small></strong><br />
<textarea class="form-control" data-field="termsOfUse"></textarea><br />
</div>
</form>
</div>

@ -58,6 +58,21 @@
</div>
</div>
</div>
<!-- IF termsOfUse -->
<div class="form-group">
<label class="col-lg-4 control-label">&nbsp;</label>
<div class="col-lg-8">
<hr />
<strong>[[register:terms_of_use]]</strong>
<textarea readonly class="form-control" rows=6>{termsOfUse}</textarea>
<div class="checkbox">
<label>
<input type="checkbox" name="agree-terms" id="agree-terms"> [[register:agree_to_terms_of_use]]
</label>
</div>
</div>
</div>
<!-- ENDIF termsOfUse -->
<div class="form-group">
<div class="col-lg-offset-4 col-lg-8">
<hr />

@ -161,9 +161,10 @@ var path = require('path'),
data.authentication = login_strategies;
data.token = res.locals.csrf_token;
data.minimumUsernameLength = meta.config['minimumUsernameLength'];
data.maximumUsernameLength = meta.config['maximumUsernameLength'];
data.minimumPasswordLength = meta.config['minimumPasswordLength'];
data.minimumUsernameLength = meta.config.minimumUsernameLength;
data.maximumUsernameLength = meta.config.maximumUsernameLength;
data.minimumPasswordLength = meta.config.minimumPasswordLength;
data.termsOfUse = meta.config.termsOfUse;
res.json(data);
});

Loading…
Cancel
Save