CC-4728: Support Feedback save action does not use ajax
-done
This commit is contained in:
parent
ab55bb73bb
commit
89e0458500
3 changed files with 31 additions and 10 deletions
|
@ -11,8 +11,23 @@ function showErrorSections() {
|
|||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
setUpEventListeners();
|
||||
});
|
||||
|
||||
function setUpEventListeners() {
|
||||
var form = $("form");
|
||||
|
||||
$("#support_save").click( function() {
|
||||
var data = $("#support-feedback-form").serializeArray();
|
||||
var url = baseUrl+'/Preference/support-setting';
|
||||
|
||||
$.post(url, {format:"json", data: data}, function(data){
|
||||
var json = $.parseJSON(data);
|
||||
$("#support-feedback-view").parent().empty().append(json.html);
|
||||
setUpEventListeners();
|
||||
});
|
||||
});
|
||||
|
||||
$("#SupportFeedback").click( function(){
|
||||
var pub = $("#Publicise");
|
||||
if( !$(this).is(':checked') ){
|
||||
|
@ -81,4 +96,4 @@ $(document).ready(function() {
|
|||
logoEl.find(".errors").remove();
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue