minor fixes for member (#13101)
This commit is contained in:
parent
e53a238665
commit
033eb779d4
@ -38,8 +38,11 @@ frappe.ui.form.on('Member', {
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
callback: function (data) {
|
callback: function (data) {
|
||||||
frappe.model.set_value(frm.doctype,frm.docname, "membership_expiry_date", data.message.to_date);
|
if(data.message) {
|
||||||
|
frappe.model.set_value(frm.doctype,frm.docname,
|
||||||
|
"membership_expiry_date", data.message.to_date);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
@ -6,7 +6,6 @@ from __future__ import unicode_literals
|
|||||||
from frappe.model.document import Document
|
from frappe.model.document import Document
|
||||||
from frappe.contacts.address_and_contact import load_address_and_contact
|
from frappe.contacts.address_and_contact import load_address_and_contact
|
||||||
|
|
||||||
STANDARD_USERS = ("Guest", "Administrator")
|
|
||||||
|
|
||||||
class Member(Document):
|
class Member(Document):
|
||||||
def onload(self):
|
def onload(self):
|
||||||
@ -15,10 +14,7 @@ class Member(Document):
|
|||||||
|
|
||||||
|
|
||||||
def validate(self):
|
def validate(self):
|
||||||
if self.name not in STANDARD_USERS:
|
self.validate_email_type(self.email)
|
||||||
self.validate_email_type(self.email)
|
|
||||||
self.validate_email_type(self.name)
|
|
||||||
|
|
||||||
|
|
||||||
def validate_email_type(self, email):
|
def validate_email_type(self, email):
|
||||||
from frappe.utils import validate_email_add
|
from frappe.utils import validate_email_add
|
||||||
|
Loading…
x
Reference in New Issue
Block a user