fix: username validations

This commit is contained in:
pateljannat
2021-08-06 14:41:11 +05:30
parent 63d70fc037
commit 844fcc9bca
3 changed files with 89 additions and 6 deletions

View File

@@ -1,7 +1,14 @@
frappe.ready(function () {
frappe.web_form.after_load = () => {
if (!frappe.utils.get_url_arg("name")) {
window.location.href = `/edit-profile?name=${frappe.session.user}`;
}
}
frappe.web_form.after_save = () => {
setTimeout(() => {
window.location.href = `/${frappe.web_form.get_value(["username"])}`;
})
}
})