Move mod_rewrite detection to the client side

This commit is contained in:
Kijin Sung 2016-01-10 15:11:29 +09:00
parent 86bd1b531d
commit 43098721b1
5 changed files with 55 additions and 57 deletions

View file

@ -6,6 +6,28 @@ jQuery(function($){
$("p.db_type_" + $(this).val()).show();
}).triggerHandler("click");
}
if($("#mod_rewrite_checking").size()) {
var checking = $("#mod_rewrite_checking");
$.ajax({
url: checking.data("url"),
cache : false,
dataType: "text",
success: function(data) {
if($.trim(data) === checking.data("verify")) {
$("#mod_write_status span.ok").show();
$("#mod_write_status span.no").hide();
$("#task-checklist-confirm").attr("href", $("#task-checklist-confirm").attr("href") + "&rewrite=Y");
} else {
$("#mod_rewrite_no_support").show();
}
checking.hide();
},
error: function() {
$("#mod_rewrite_no_support").show();
checking.hide();
}
});
}
if($("input[name='user_id']").size() && $("input[name='email_address']").size()) {
var user_id_input = $("input[name='user_id']");
var email_input = $("input[name='email_address']");