generated from jric11/baseProject
Codex's updates...
This commit is contained in:
+3
-3
@@ -83,7 +83,7 @@ $(document).ready(function () {
|
||||
$("#addUser").submit(function (e) {
|
||||
|
||||
var user_name = $("#user_name"),
|
||||
user_client_name = $("#user_client_name"),
|
||||
user_first_name = $("#user_first_name"),
|
||||
user_email = $("#user_email"),
|
||||
user_role = $("#user_role");
|
||||
|
||||
@@ -108,8 +108,8 @@ $(document).ready(function () {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (isBlank(user_client_name)) {
|
||||
createInputError(user_client_name, "Client Name is required");
|
||||
if (isBlank(user_first_name)) {
|
||||
createInputError(user_first_name, "Client Name is required");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
+14
@@ -1,3 +1,17 @@
|
||||
// Attach the session CSRF token to existing forms and same-origin AJAX requests.
|
||||
$.ajaxPrefilter(function (options, original, xhr) {
|
||||
if (!options.crossDomain && !/^(GET|HEAD|OPTIONS)$/i.test(options.type)) {
|
||||
xhr.setRequestHeader('X-CSRF-Token', $('meta[name="csrf-token"]').attr('content') || '');
|
||||
}
|
||||
});
|
||||
$(function () {
|
||||
$('form[method="post" i]').each(function () {
|
||||
if (!$(this).find('[name="csrf_token"]').length) {
|
||||
$('<input>', {type: 'hidden', name: 'csrf_token', value: $('meta[name="csrf-token"]').attr('content') || ''}).appendTo(this);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
// ==============
|
||||
// Base Functions
|
||||
|
||||
+3
-3
@@ -97,7 +97,7 @@ $(document).ready(function () {
|
||||
var user_name = $("#user_name"),
|
||||
user_email = $("#user_email"),
|
||||
user_role = $("#user_role"),
|
||||
user_client_name = $("#user_client_name");
|
||||
user_first_name = $("#user_first_name");
|
||||
|
||||
clearInputErrors();
|
||||
|
||||
@@ -114,8 +114,8 @@ $(document).ready(function () {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (isBlank(user_client_name)) {
|
||||
createInputError(user_client_name, "Client Name is required");
|
||||
if (isBlank(user_first_name)) {
|
||||
createInputError(user_first_name, "Client Name is required");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ $(document).ready(function () {
|
||||
// Use our Bootstrap validation messages.
|
||||
$login.add($signUp).add($resetPassword).attr("novalidate", "novalidate");
|
||||
|
||||
$(".btnSignUp").on("click", function (e) {
|
||||
$("#login .btnSignUp").on("click", function (e) {
|
||||
e.preventDefault();
|
||||
window.location.href = "./?Xaction=signup";
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user