mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-07 15:12:51 +00:00
[login] [disable signup] option to disable signup link in login page
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
import webnotes, conf, os
|
import webnotes, conf, os
|
||||||
|
from webnotes.utils import cint, cstr
|
||||||
|
|
||||||
def get_templates_path():
|
def get_templates_path():
|
||||||
return os.path.join(os.path.dirname(conf.__file__), "app", "website", "templates")
|
return os.path.join(os.path.dirname(conf.__file__), "app", "website", "templates")
|
||||||
@@ -61,15 +62,17 @@ def update_template_args(page_name, args):
|
|||||||
|
|
||||||
settings = webnotes.doc("Website Settings", "Website Settings")
|
settings = webnotes.doc("Website Settings", "Website Settings")
|
||||||
for k in ["banner_html", "brand_html", "copyright", "address", "twitter_share_via",
|
for k in ["banner_html", "brand_html", "copyright", "address", "twitter_share_via",
|
||||||
"favicon", "facebook_share", "google_plus_one", "twitter_share", "linked_in_share"]:
|
"favicon", "facebook_share", "google_plus_one", "twitter_share", "linked_in_share",
|
||||||
|
"disable_signup"]:
|
||||||
if k in settings.fields:
|
if k in settings.fields:
|
||||||
args[k] = settings.fields.get(k)
|
args[k] = settings.fields.get(k)
|
||||||
|
|
||||||
for k in ["facebook_share", "google_plus_one", "twitter_share", "linked_in_share"]:
|
for k in ["facebook_share", "google_plus_one", "twitter_share", "linked_in_share",
|
||||||
args[k] = int(args.get(k) or 0)
|
"disable_signup"]:
|
||||||
|
args[k] = cint(args.get(k) or 0)
|
||||||
|
|
||||||
args.url = quote(str(get_request_site_address(full_address=True)), str(""))
|
args.url = quote(cstr(get_request_site_address(full_address=True)), cstr(""))
|
||||||
args.encoded_title = quote(str(args.title or ""), str(""))
|
args.encoded_title = quote(cstr(args.title or ""), cstr(""))
|
||||||
|
|
||||||
return args
|
return args
|
||||||
|
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"creation": "2013-03-26 06:51:18",
|
"creation": "2013-04-30 12:58:46",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-04-17 11:51:30",
|
"modified": "2013-05-02 15:51:14",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
@@ -219,13 +219,16 @@
|
|||||||
"reqd": 0
|
"reqd": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "Enter domain names associated to this website, each on a new line",
|
|
||||||
"doctype": "DocField",
|
"doctype": "DocField",
|
||||||
"fieldname": "domain_list",
|
"fieldname": "column_break_28",
|
||||||
"fieldtype": "Text",
|
"fieldtype": "Column Break"
|
||||||
"hidden": 1,
|
},
|
||||||
"label": "Domain List",
|
{
|
||||||
"reqd": 0
|
"description": "Disable Customer Signup link in Login page",
|
||||||
|
"doctype": "DocField",
|
||||||
|
"fieldname": "disable_signup",
|
||||||
|
"fieldtype": "Check",
|
||||||
|
"label": "Disable Signup"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"create": 1,
|
"create": 1,
|
||||||
|
|||||||
Reference in New Issue
Block a user