added contact us

This commit is contained in:
Rushabh Mehta
2012-12-27 18:40:42 +05:30
parent 43eb513a43
commit d616413caa
11 changed files with 216 additions and 78 deletions

View File

@@ -4,7 +4,7 @@
"docstatus": 0,
"creation": "2012-12-27 14:24:35",
"modified_by": "Administrator",
"modified": "2012-12-27 15:51:11"
"modified": "2012-12-27 17:44:55"
},
{
"issingle": 1,
@@ -38,6 +38,13 @@
"name": "About Us Settings",
"doctype": "DocType"
},
{
"doctype": "DocField",
"label": "Help",
"fieldname": "help",
"fieldtype": "HTML",
"options": "<div class=\"alert\">Link for About Us Page is \"about.html\"</div>"
},
{
"description": "Introduce your company to the website visitor.",
"doctype": "DocField",

View File

@@ -0,0 +1,17 @@
# For license information, please see license.txt
from __future__ import unicode_literals
import webnotes
class DocType:
def __init__(self, d, dl):
self.doc, self.doclist = d, dl
def onload(self):
"""load address"""
if self.doc.query_options:
self.doc.query_options = filter(None, self.doc.query_options.replace(",", "\n").split())
else:
self.doc.query_options = ["Sales", "Support", "General"]
if self.doc.address:
self.address = webnotes.model_wrapper("Address", self.doc.address).doc

View File

@@ -0,0 +1,72 @@
[
{
"owner": "Administrator",
"docstatus": 0,
"creation": "2012-12-27 17:43:10",
"modified_by": "Administrator",
"modified": "2012-12-27 17:57:55"
},
{
"issingle": 1,
"description": "Settings for Contact Us Page",
"doctype": "DocType",
"module": "Website",
"name": "__common__"
},
{
"name": "__common__",
"parent": "Contact Us Settings",
"doctype": "DocField",
"parenttype": "DocType",
"permlevel": 0,
"parentfield": "fields"
},
{
"parent": "Contact Us Settings",
"read": 1,
"name": "__common__",
"create": 1,
"doctype": "DocPerm",
"write": 1,
"parenttype": "DocType",
"role": "Website Manager",
"permlevel": 0,
"parentfield": "permissions"
},
{
"name": "Contact Us Settings",
"doctype": "DocType"
},
{
"doctype": "DocField",
"label": "Help",
"fieldname": "help",
"fieldtype": "HTML",
"options": "<div class=\"alert\">Link for Contact Page is \"contact.html\"</div>"
},
{
"description": "Address to be displayed on the Contact Page",
"doctype": "DocField",
"label": "Address",
"fieldname": "address",
"fieldtype": "Link",
"options": "Address"
},
{
"description": "Contact options, like \"Sales Query, Support Query\" etc each on a new line or separated by commas.",
"doctype": "DocField",
"label": "Query Options",
"fieldname": "query_options",
"fieldtype": "Small Text"
},
{
"description": "Introductory information for the Contact Us Page",
"doctype": "DocField",
"label": "Introduction",
"fieldname": "introduction",
"fieldtype": "Text Editor"
},
{
"doctype": "DocPerm"
}
]