|
@@ -52,11 +52,11 @@ frappe.ready(function() { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if(!args.old_password && !args.key) { |
|
|
if(!args.old_password && !args.key) { |
|
|
frappe.msgprint(__("Old Password Required.")); |
|
|
|
|
|
|
|
|
frappe.msgprint("{{ _("Old Password Required.") }}"); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
if(!args.new_password) { |
|
|
if(!args.new_password) { |
|
|
frappe.msgprint(__("New Password Required.")) |
|
|
|
|
|
|
|
|
frappe.msgprint("{{ _("New Password Required.") }}"); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@@ -68,7 +68,7 @@ frappe.ready(function() { |
|
|
statusCode: { |
|
|
statusCode: { |
|
|
401: function() { |
|
|
401: function() { |
|
|
$('.page-card-head .indicator').removeClass().addClass('indicator red') |
|
|
$('.page-card-head .indicator').removeClass().addClass('indicator red') |
|
|
.text(__('Invalid Password')); |
|
|
|
|
|
|
|
|
.text("{{ _('Invalid Password') }}"); |
|
|
}, |
|
|
}, |
|
|
200: function(r) { |
|
|
200: function(r) { |
|
|
$("input").val(""); |
|
|
$("input").val(""); |
|
@@ -76,9 +76,9 @@ frappe.ready(function() { |
|
|
strength_message.addClass('hidden'); |
|
|
strength_message.addClass('hidden'); |
|
|
$('.page-card-head .indicator') |
|
|
$('.page-card-head .indicator') |
|
|
.removeClass().addClass('indicator green') |
|
|
.removeClass().addClass('indicator green') |
|
|
.html(__('Password Updated')); |
|
|
|
|
|
|
|
|
.html("{{ _('Password Updated') }}"); |
|
|
if(r.message) { |
|
|
if(r.message) { |
|
|
frappe.msgprint(__("Password Updated")); |
|
|
|
|
|
|
|
|
frappe.msgprint("{{ _("Password Updated") }}"); |
|
|
setTimeout(function() { |
|
|
setTimeout(function() { |
|
|
window.location.href = r.message; |
|
|
window.location.href = r.message; |
|
|
}, 2000); |
|
|
}, 2000); |
|
@@ -108,7 +108,7 @@ frappe.ready(function() { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (!args.new_password) { |
|
|
if (!args.new_password) { |
|
|
set_strength_indicator('grey', {'warning': __('Please enter the password') }); |
|
|
|
|
|
|
|
|
set_strength_indicator('grey', {'warning': "{{ _('Please enter the password') }}" }); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@@ -122,7 +122,7 @@ frappe.ready(function() { |
|
|
statusCode: { |
|
|
statusCode: { |
|
|
401: function() { |
|
|
401: function() { |
|
|
$('.page-card-head .indicator').removeClass().addClass('indicator red') |
|
|
$('.page-card-head .indicator').removeClass().addClass('indicator red') |
|
|
.text(__('Invalid Password')); |
|
|
|
|
|
|
|
|
.text("{{ _('Invalid Password') }}"); |
|
|
}, |
|
|
}, |
|
|
200: function(r) { |
|
|
200: function(r) { |
|
|
if (r.message && r.message.entropy) { |
|
|
if (r.message && r.message.entropy) { |
|
@@ -148,7 +148,7 @@ frappe.ready(function() { |
|
|
var message = []; |
|
|
var message = []; |
|
|
feedback.help_msg = ""; |
|
|
feedback.help_msg = ""; |
|
|
if(!feedback.password_policy_validation_passed){ |
|
|
if(!feedback.password_policy_validation_passed){ |
|
|
feedback.help_msg = "<br>" + __("Hint: Include symbols, numbers and capital letters in the password"); |
|
|
|
|
|
|
|
|
feedback.help_msg = "<br>" + "{{ _("Hint: Include symbols, numbers and capital letters in the password") }}"; |
|
|
} |
|
|
} |
|
|
if (feedback) { |
|
|
if (feedback) { |
|
|
if(!feedback.password_policy_validation_passed){ |
|
|
if(!feedback.password_policy_validation_passed){ |
|
@@ -160,7 +160,7 @@ frappe.ready(function() { |
|
|
message.push(feedback.help_msg); |
|
|
message.push(feedback.help_msg); |
|
|
|
|
|
|
|
|
} else { |
|
|
} else { |
|
|
message.push(__('Success! You are good to go 👍')); |
|
|
|
|
|
|
|
|
message.push("{{ _('Success! You are good to go 👍') }}"); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|