def signup(full_name, email, subdomain, plan=None, distribution="erpnext", res=None): status = _signup(full_name, email, subdomain, plan=plan, distribution=distribution, reseller=res) if status == 'success': location = frappe.redirect_to_message( _('Verify your Email'), """<div><p>You will receive an email at <strong>{}</strong>, asking you to verify this account request.<p><br> <p>It may take a few minutes before you receive this email. If you don't find it, please check your SPAM folder.</p> </div>""".format(email), indicator_color='blue') elif status == 'retry': return {} else: # something went wrong location = frappe.redirect_to_message( _('Something went wrong'), 'Please try again or drop an email to [email protected]', indicator_color='red') return {'location': location}
def signup(full_name, email, subdomain, plan="Free", distribution="erpnext"): status = _signup( full_name, email, subdomain, plan=plan, distribution='erpnext' if distribution == 'schools' else distribution) context = { 'pathname': 'schools/signup' if distribution == 'schools' else 'signup' } if status == 'success': location = frappe.redirect_to_message( _('Thank you for signing up'), """<div><p>You will receive an email at <strong>{}</strong>, asking you to verify this account request.<br> If you are unable to find the email in your inbox, please check your SPAM folder. It may take a few minutes before you receive this email.</p> <p>Once you click on the verification link, your account will be ready in a few minutes.</p> </div>""".format(email), context=context) elif status == 'retry': return {} else: # something went wrong location = frappe.redirect_to_message( _('Something went wrong'), 'Please try again or drop an email to [email protected]', context=context) return {'location': location}
def signup(full_name, email, phone_number, subdomain, industry_type, plan=None, distribution="erpnext", res=None, number_of_users=1, passphrase=None, country=None, timezone=None, currency=None, language=None): resp = _signup(full_name, email, phone_number, subdomain, industry_type, plan=plan, distribution=distribution, reseller=res, users=number_of_users, password=passphrase, country=country, timezone=timezone, currency=currency, language=language) if resp.get("redirect_to"): return { "location": resp['redirect_to'] } elif resp['status'] == 'success': location = frappe.redirect_to_message(_('Verify your Email'), """<div><p>You will receive an email at <strong>{}</strong>, asking you to verify this account request.<p><br> <p>It may take a few minutes before you receive this email. If you don't find it, please check your SPAM folder.</p> </div>""".format(email), indicator_color='blue') elif resp['status']=='retry': return {} else: # something went wrong location = frappe.redirect_to_message(_('Something went wrong'), 'Please try again or drop an email to [email protected]', indicator_color='red') return { 'location': location }
def signup(full_name, email, subdomain, plan="Free", distribution="erpnext", res=None): status = _signup(full_name, email, subdomain, plan=plan, distribution=distribution, reseller=res) if status == 'success': location = frappe.redirect_to_message(_('Verify your Email'), """<div><p>You will receive an email at <strong>{}</strong>, asking you to verify this account request.<p><br> <p>It may take a few minutes before you receive this email. If you don't find it, please check your SPAM folder.</p> </div>""".format(email), indicator_color='blue') elif status=='retry': return {} else: # something went wrong location = frappe.redirect_to_message(_('Something went wrong'), 'Please try again or drop an email to [email protected]', indicator_color='red') return { 'location': location }