Add consent check to feedback form

This commit is contained in:
Atanas Keranov 2018-05-17 18:48:35 +03:00
Родитель 72bdab229e
Коммит 9751fba0d8
3 изменённых файлов: 11 добавлений и 3 удалений

Просмотреть файл

@ -16,7 +16,8 @@ $(document).ready(function () {
outdatedSample: false,
inaccurateOutdatedCodeSamplesText: "",
otherFeedback: false,
textFeedback: ""
textFeedback: "",
acceptFeedbackContact: false
};
$("#feedback-checkbox-area").click(function (e) {
@ -224,11 +225,12 @@ $(document).ready(function () {
emptyFormValidator.validate() &&
emailValidator.validate()) {
win.close();
setCookieByName("submittingFeedback")
setCookieByName("submittingFeedback");
formModel.yesNoFeedback = getCookieByName("yesNoFeedback") || "Not submitted";
formModel.uuid = getCookieByName("uuid");
formModel.path = currentPath;
formModel.sheetId = $("#hidden-sheet-id").val();
formModel.email = formModel.acceptFeedbackContact ? formModel.email : '';
$.ajax({
url: "https://baas.kinvey.com/rpc/kid_Hk57KwIFf/custom/saveFeedback",
method: "POST",

Просмотреть файл

@ -1224,7 +1224,10 @@ footer,
margin-top: 2px !important; }
#feedback-checkbox-area label {
display: block;
display: -webkit-flex;
display: flex;
flex-direction: row;
align-items: flex-start;
margin: 5px 0 0;
padding: 5px 0 0; }

Просмотреть файл

@ -56,6 +56,9 @@
</textarea>
<input id="feedback-email-input" type="email" placeholder="email (optional)" data-email-msg="Email format is not valid."
class="feedback-extw__input input" data-bind="value: email" />
<label>
<input type="checkbox" data-bind="checked: acceptFeedbackContact" /> By checking this box you consent to Progress contacting you by email about your response on this page.
</label>
</div>
</form>
<div class="feedback-extw__foot">