tatFeedbackPagesPortlet_INSTANCE_ffiq&p_p_lifecycle=2&p_p_state=normal&p_p_mode=view&p_p_resource_id=%2Fsubmit_feedback_captcha&p_p_cacheability=cacheLevelPage', data: { _com_digitallab_gastat_GastatFeedbackPagesPortlet_INSTANCE_ffiq_feedbackReason: feedbackReason, _com_digitallab_gastat_GastatFeedbackPagesPortlet_INSTANCE_ffiq_feedbackValue: feedbackValue }, success: function (response) { if (response) switchViews(true, response === 'true') } }) }) submitAgainBtn.click(function () { switchViews(false,undefined) }) function switchViews(showSuccessSection, isSuccess) { if (showSuccessSection) { feedbackSection.hide() let body = isSuccess ? `

شكرًا.

شكرآ لك على ملاحظاتك!

` : `

خطأ

عذرًا، حدث شيء خاطئ

` feedbackBody.html(body.trim()); feedbackResponseSection.show() } else { feedbackSection.show() feedbackBody.html('') feedbackResponseSection.hide() } } const hideOrShowReasonInput = (value, labelText) => { let shouldShow = value > 3; label.html(labelText + reason + ' *') input.prop('required', shouldShow); $("input[name=_com_digitallab_gastat_GastatFeedbackPagesPortlet_INSTANCE_ffiq_feedbackReason]").val('') shouldShow ? unsatisfiedInputGroup.show() : unsatisfiedInputGroup.hide(); } })
0 eturn; let feedbackReason = $("input[name=_com_digitallab_gastat_GastatFeedbackPagesPortlet_INSTANCE_ffiq_feedbackReason]").val(); let feedbackValue = $("input[name=_com_digitallab_gastat_GastatFeedbackPagesPortlet_INSTANCE_ffiq_feedbackValue]:checked").val(); $.ajax({ type: 'POST', url: 'https://stats.gov.sa/ar/news?p_p_id=com_digitallab_gastat_GastatFeedbackPagesPortlet_INSTANCE_ffiq&p_p_lifecycle=2&p_p_state=normal&p_p_mode=view&p_p_resource_id=%2Fsubmit_feedback_captcha&p_p_cacheability=cacheLevelPage', data: { _com_digitallab_gastat_GastatFeedbackPagesPortlet_INSTANCE_ffiq_feedbackReason: feedbackReason, _com_digitallab_gastat_GastatFeedbackPagesPortlet_INSTANCE_ffiq_feedbackValue: feedbackValue }, success: function (response) { if (response) switchViews(true, response === 'true') } }) }) submitAgainBtn.click(function () { switchViews(false,undefined) }) function switchViews(showSuccessSection, isSuccess) { if (showSuccessSection) { feedbackSection.hide() let body = isSuccess ? `

شكرًا.

شكرآ لك على ملاحظاتك!

` : `

خطأ

عذرًا، حدث شيء خاطئ

` feedbackBody.html(body.trim()); feedbackResponseSection.show() } else { feedbackSection.show() feedbackBody.html('') feedbackResponseSection.hide() } } const hideOrShowReasonInput = (value, labelText) => { let shouldShow = value > 3; label.html(labelText + reason + ' *') input.prop('required', shouldShow); $("input[name=_com_digitallab_gastat_GastatFeedbackPagesPortlet_INSTANCE_ffiq_feedbackReason]").val('') shouldShow ? unsatisfiedInputGroup.show() : unsatisfiedInputGroup.hide(); } })