Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KG - System Satisfaction Survey Not Showing #232

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 0 additions & 2 deletions app/assets/javascripts/review.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
#= require navigation

$(document).ready ->
#Save as Draft Notification
notification_open = false
$('#draft_notification').dialog
resizable: false,
height: 220,
Expand Down
9 changes: 4 additions & 5 deletions app/assets/javascripts/system_satisfaction.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ $(document).ready ->
autoOpen: false,
buttons:
"Yes": ->
$(this).dialog("close")
$('#processing_request').show()
survey_offered = true
$(this).dialog("close")
service_request_id = $('#service_request_id').val()
$('#participate_in_survey').load "/surveys/system-satisfaction-survey ", {survey_version: ""}, ->
$('#surveyor').load "/surveys/system-satisfaction-survey", {survey_version: ""}, ->
$('#survey_form').append("<input type='hidden' id='redirect_to' name='redirect_to' value='#{route_to}'>")
$('#survey_form div.next_section').append("<input type='button' name='cancel' value='Cancel'/>")
$('#surveyor').dialog
Expand Down Expand Up @@ -73,17 +73,16 @@ $(document).ready ->
return false
window.location.href = route_to

$(document).on('click', '#submit_services1, #submit_services2, #get_a_cost_estimate', (event)->
$(document).on 'click', '#submit_services1, #submit_services2, #get_a_cost_estimate', (event)->
event.preventDefault()
route_to = $(this).attr('href')

if survey_offered == false
$("#participate_in_survey").dialog("open")
return false
else
# this should never be the case but just in case some browser allows it let's just redirect to confirmation page
# this should never be the case but just in case some browser allows it lets just redirect to confirmation page
$(this).unbind('click')
$(this).click ->
return false
window.location.href = route_to
)
7 changes: 4 additions & 3 deletions app/views/service_requests/review.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@
= hidden_field_tag :validates, ''
= render :partial => 'steps'

#participate_in_survey{:title => t(:sr_review)[:participate_in_survey_title]}
= t(:sr_review)[:participate_in_survey]

- if SYSTEM_SATISFACTION_SURVEY != false
#participate_in_survey{:title => t(:sr_review)[:participate_in_survey_title]}
= t(:sr_review)[:participate_in_survey]
#surveyor
#draft_notification{:title => t(:sr_review)[:save_as_draft_notification_title], data: {sr_id: @service_request.id}}
= t(:sr_review)[:save_as_draft_notification]

Expand Down