Minor tweaks on homepage and delete unecessary files

This commit is contained in:
Raghavendra Kamath
2018-03-01 18:06:05 +05:30
parent 6ccf302555
commit b7e567b7e5
15 changed files with 5 additions and 2344 deletions

View File

@@ -1024,7 +1024,7 @@ img.blog-cover-image,
padding-bottom: 1.5rem; padding-bottom: 1.5rem;
} }
.feature-img { .feature-img {
width: 300px; max-width: 250px;
} }
.community-bg { .community-bg {
background-image: linear-gradient(to bottom, rgba(117, 116, 254, 0.52), #7574fe), url("/assets/foundation/img/community-2016.jpg"); background-image: linear-gradient(to bottom, rgba(117, 116, 254, 0.52), #7574fe), url("/assets/foundation/img/community-2016.jpg");

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View File

@@ -1014,7 +1014,7 @@ img.blog-cover-image,
} }
.feature-img { .feature-img {
width: 300px; max-width: 250px;
} }
.community-bg { .community-bg {

View File

@@ -129,7 +129,7 @@
</p> </p>
</div> </div>
<div class="columns"> <div class="columns">
<p>Content licensed under <a class="secondary-link" href="https://creativecommons.org/licenses/by-sa/3.0/" target="_blank"> CC-BY-SA 3.0</a>. Read the <a href="/terms" class="secondary-link">terms of use</a>. <p>Content licensed under <a class="secondary-link" href="https://creativecommons.org/licenses/by-sa/3.0/" target="_blank"> CC-BY-SA 3.0</a> | <a href="/terms" class="secondary-link">Terms of use</a>.
</p> </p>
</div> </div>
</div> </div>

View File

@@ -1,48 +0,0 @@
[{
"allow_comments": 0,
"allow_edit": 1,
"allow_multiple": 1,
"doc_type": "Event",
"docstatus": 0,
"doctype": "Web Form",
"introduction_text": "Add events",
"login_required": 1,
"name": "manage-events",
"owner": "Administrator",
"page_name": "manage-events",
"published": 1,
"success_url": "/manage-events",
"title": "Manage Events",
"web_form_fields": [
{
"doctype": "Web Form Field",
"fieldname": "subject",
"fieldtype": "Data",
"hidden": 0,
"idx": 1,
"label": "Title",
"read_only": 0,
"reqd": 1
},
{
"doctype": "Web Form Field",
"fieldname": "starts_on",
"fieldtype": "Date",
"hidden": 0,
"idx": 2,
"label": "Event Date",
"read_only": 0,
"reqd": 1
},
{
"doctype": "Web Form Field",
"fieldname": "description",
"fieldtype": "Text",
"hidden": 0,
"idx": 3,
"label": "Description",
"read_only": 0,
"reqd": 0
}
]
}]

View File

@@ -1,68 +0,0 @@
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt
from __future__ import unicode_literals
import frappe
import unittest, json
from frappe.website.render import build_page
from frappe.website.doctype.web_form.web_form import accept
test_records = frappe.get_test_records('Web Form')
class TestWebForm(unittest.TestCase):
def setUp(self):
frappe.conf.disable_website_cache = True
frappe.local.path = None
def tearDown(self):
frappe.conf.disable_website_cache = False
frappe.local.path = None
def test_basic(self):
frappe.set_user("Guest")
html = build_page("manage-events")
self.assertTrue('<div class="login-required">' in html)
def test_logged_in(self):
frappe.set_user("Administrator")
html = build_page("manage-events")
self.assertFalse('<div class="login-required">' in html)
self.assertTrue('"/manage-events?new=1"' in html)
def test_new(self):
frappe.set_user("Administrator")
frappe.local.form_dict.new = 1
html = build_page("manage-events")
self.assertTrue('name="subject"' in html)
def test_accept(self):
frappe.set_user("Administrator")
accept(web_form='manage-events', data=json.dumps({
'doctype': 'Event',
'subject': '_Test Event Web Form',
'description': '_Test Event Description',
'starts_on': '2014-09-09'
}))
self.event_name = frappe.db.get_value("Event",
{"subject": "_Test Event Web Form"})
self.assertTrue(self.event_name)
def test_edit(self):
self.test_accept()
doc={
'doctype': 'Event',
'subject': '_Test Event Web Form',
'description': '_Test Event Description 1',
'starts_on': '2014-09-09',
'name': self.event_name
}
self.assertNotEquals(frappe.db.get_value("Event",
self.event_name, "description"), doc.get('description'))
accept(web_form='manage-events', data=json.dumps(doc))
self.assertEquals(frappe.db.get_value("Event",
self.event_name, "description"), doc.get('description'))

View File

@@ -1,80 +0,0 @@
frappe.web_form = {
set_fieldname_select: function(frm) {
var me = this,
doc = frm.doc;
if (doc.doc_type) {
frappe.model.with_doctype(doc.doc_type, function() {
var fields = $.map(frappe.get_doc("DocType", frm.doc.doc_type).fields, function(d) {
if (frappe.model.no_value_type.indexOf(d.fieldtype) === -1 ||
d.fieldtype === 'Table') {
return { label: d.label + ' (' + d.fieldtype + ')', value: d.fieldname }
} else {
return null;
}
})
var currency_fields = $.map(frappe.get_doc("DocType", frm.doc.doc_type).fields, function(d) {
if (d.fieldtype === 'Currency' || d.fieldtype === 'Float') {
return { label: d.label, value: d.fieldname }
} else {
return null;
}
})
frappe.meta.get_docfield("Web Form Field", "fieldname", frm.doc.name).options = [""].concat(fields);
frappe.meta.get_docfield("Web Form", "amount_field", frm.doc.name).options = [""].concat(currency_fields);
frm.refresh_field("amount_field");
});
}
}
}
frappe.ui.form.on("Web Form", {
refresh: function(frm) {
// show is-standard only if developer mode
frm.get_field("is_standard").toggle(frappe.boot.developer_mode);
frappe.web_form.set_fieldname_select(frm);
if (frm.doc.is_standard && !frappe.boot.developer_mode) {
frm.set_read_only();
frm.disable_save();
}
},
title: function(frm) {
if (frm.doc.__islocal) {
var page_name = frm.doc.title.toLowerCase().replace(/ /g, "-");
frm.set_value("route", page_name);
frm.set_value("success_url", "/" + page_name);
}
},
doc_type: function(frm) {
frappe.web_form.set_fieldname_select(frm);
}
});
frappe.ui.form.on("Web Form Field", {
fieldtype: function(frm, doctype, name) {
var doc = frappe.get_doc(doctype, name);
if (['Section Break', 'Column Break', 'Page Break'].includes(doc.fieldtype)) {
doc.fieldname = '';
frm.refresh_field("web_form_fields");
}
},
fieldname: function(frm, doctype, name) {
var doc = frappe.get_doc(doctype, name);
var df = $.map(frappe.get_doc("DocType", frm.doc.doc_type).fields, function(d) {
return doc.fieldname == d.fieldname ? d : null;
})[0];
doc.label = df.label;
doc.reqd = df.reqd;
doc.options = df.options;
doc.fieldtype = frappe.meta.get_docfield("Web Form Field", "fieldtype")
.options.split("\n").indexOf(df.fieldtype) === -1 ? "Data" : df.fieldtype;
doc.description = df.description;
doc["default"] = df["default"];
}
});

File diff suppressed because it is too large Load Diff

View File

@@ -1,485 +0,0 @@
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe, json, os
from frappe.website.website_generator import WebsiteGenerator
from frappe import _, scrub
from frappe.utils import cstr
from frappe.utils.file_manager import save_file, remove_file_by_url
from frappe.website.utils import get_comment_list
from frappe.custom.doctype.customize_form.customize_form import docfield_properties
from frappe.utils.file_manager import get_max_file_size
from frappe.modules.utils import export_module_json, get_doc_module
from six.moves.urllib.parse import urlencode
from frappe.integrations.utils import get_payment_gateway_controller
from six import iteritems
class WebForm(WebsiteGenerator):
website = frappe._dict(
no_cache = 1
)
def onload(self):
super(WebForm, self).onload()
if self.is_standard and not frappe.conf.developer_mode:
self.use_meta_fields()
def validate(self):
super(WebForm, self).validate()
if not self.module:
self.module = frappe.db.get_value('DocType', self.doc_type, 'module')
if (not (frappe.flags.in_install or frappe.flags.in_patch or frappe.flags.in_test or frappe.flags.in_fixtures)
and self.is_standard and not frappe.conf.developer_mode):
frappe.throw(_("You need to be in developer mode to edit a Standard Web Form"))
if not frappe.flags.in_import:
self.validate_fields()
if self.accept_payment:
self.validate_payment_amount()
def validate_fields(self):
'''Validate all fields are present'''
from frappe.model import no_value_fields
missing = []
meta = frappe.get_meta(self.doc_type)
for df in self.web_form_fields:
if df.fieldname and (df.fieldtype not in no_value_fields and not meta.has_field(df.fieldname)):
missing.append(df.fieldname)
if missing:
frappe.throw(_('Following fields are missing:') + '<br>' + '<br>'.join(missing))
def validate_payment_amount(self):
if self.amount_based_on_field and not self.amount_field:
frappe.throw(_("Please select a Amount Field."))
elif not self.amount_based_on_field and not self.amount > 0:
frappe.throw(_("Amount must be greater than 0."))
def reset_field_parent(self):
'''Convert link fields to select with names as options'''
for df in self.web_form_fields:
df.parent = self.doc_type
def use_meta_fields(self):
'''Override default properties for standard web forms'''
meta = frappe.get_meta(self.doc_type)
for df in self.web_form_fields:
meta_df = meta.get_field(df.fieldname)
if not meta_df:
continue
for prop in docfield_properties:
if df.fieldtype==meta_df.fieldtype and prop not in ("idx",
"reqd", "default", "description", "default", "options",
"hidden", "read_only", "label"):
df.set(prop, meta_df.get(prop))
# TODO translate options of Select fields like Country
# export
def on_update(self):
"""
Writes the .txt for this page and if write_content is checked,
it will write out a .html file
"""
path = export_module_json(self, self.is_standard, self.module)
if path:
# js
if not os.path.exists(path + '.js'):
with open(path + '.js', 'w') as f:
f.write("""frappe.ready(function() {
// bind events here
})""")
# py
if not os.path.exists(path + '.py'):
with open(path + '.py', 'w') as f:
f.write("""from __future__ import unicode_literals
import frappe
def get_context(context):
# do your magic here
pass
""")
def get_context(self, context):
'''Build context to render the `web_form.html` template'''
self.set_web_form_module()
context._login_required = False
if self.login_required and frappe.session.user == "Guest":
context._login_required = True
doc, delimeter = make_route_string(frappe.form_dict)
context.doc = doc
context.delimeter = delimeter
# check permissions
if frappe.session.user == "Guest" and frappe.form_dict.name:
frappe.throw(_("You need to be logged in to access this {0}.").format(self.doc_type), frappe.PermissionError)
if frappe.form_dict.name and not has_web_form_permission(self.doc_type, frappe.form_dict.name):
frappe.throw(_("You don't have the permissions to access this document"), frappe.PermissionError)
self.reset_field_parent()
if self.is_standard:
self.use_meta_fields()
if not context._login_required:
if self.allow_edit:
if self.allow_multiple:
if not frappe.form_dict.name and not frappe.form_dict.new:
self.build_as_list(context)
else:
if frappe.session.user != 'Guest' and not frappe.form_dict.name:
frappe.form_dict.name = frappe.db.get_value(self.doc_type, {"owner": frappe.session.user}, "name")
if not frappe.form_dict.name:
# only a single doc allowed and no existing doc, hence new
frappe.form_dict.new = 1
# always render new form if login is not required or doesn't allow editing existing ones
if not self.login_required or not self.allow_edit:
frappe.form_dict.new = 1
self.load_document(context)
context.parents = self.get_parents(context)
if self.breadcrumbs:
context.parents = frappe.safe_eval(self.breadcrumbs, { "_": _ })
context.has_header = ((frappe.form_dict.name or frappe.form_dict.new)
and (frappe.session.user!="Guest" or not self.login_required))
if context.success_message:
context.success_message = frappe.db.escape(context.success_message.replace("\n",
"<br>"))
self.add_custom_context_and_script(context)
if not context.max_attachment_size:
context.max_attachment_size = get_max_file_size() / 1024 / 1024
def load_document(self, context):
'''Load document `doc` and `layout` properties for template'''
if frappe.form_dict.name or frappe.form_dict.new:
context.layout = self.get_layout()
context.parents = [{"route": self.route, "label": _(self.title) }]
if frappe.form_dict.name:
context.doc = frappe.get_doc(self.doc_type, frappe.form_dict.name)
context.title = context.doc.get(context.doc.meta.get_title_field())
context.doc.add_seen()
context.reference_doctype = context.doc.doctype
context.reference_name = context.doc.name
if self.allow_comments:
context.comment_list = get_comment_list(context.doc.doctype,
context.doc.name)
def build_as_list(self, context):
'''Web form is a list, show render as list.html'''
from frappe.www.list import get_context as get_list_context
# set some flags to make list.py/list.html happy
frappe.form_dict.web_form_name = self.name
frappe.form_dict.doctype = self.doc_type
frappe.flags.web_form = self
self.update_params_from_form_dict(context)
self.update_list_context(context)
get_list_context(context)
context.is_list = True
def update_params_from_form_dict(self, context):
'''Copy params from list view to new view'''
context.params_from_form_dict = ''
params = {}
for key, value in iteritems(frappe.form_dict):
if frappe.get_meta(self.doc_type).get_field(key):
params[key] = value
if params:
context.params_from_form_dict = '&' + urlencode(params)
def update_list_context(self, context):
'''update list context for stanard modules'''
if hasattr(self, 'web_form_module') and hasattr(self.web_form_module, 'get_list_context'):
self.web_form_module.get_list_context(context)
def get_payment_gateway_url(self, doc):
if self.accept_payment:
controller = get_payment_gateway_controller(self.payment_gateway)
title = "Payment for {0} {1}".format(doc.doctype, doc.name)
amount = self.amount
if self.amount_based_on_field:
amount = doc.get(self.amount_field)
payment_details = {
"amount": amount,
"title": title,
"description": title,
"reference_doctype": doc.doctype,
"reference_docname": doc.name,
"payer_email": frappe.session.user,
"payer_name": frappe.utils.get_fullname(frappe.session.user),
"order_id": doc.name,
"currency": self.currency,
"redirect_to": frappe.utils.get_url(self.route)
}
# Redirect the user to this url
return controller.get_payment_url(**payment_details)
def add_custom_context_and_script(self, context):
'''Update context from module if standard and append script'''
if self.web_form_module:
new_context = self.web_form_module.get_context(context)
if new_context:
context.update(new_context)
js_path = os.path.join(os.path.dirname(self.web_form_module.__file__), scrub(self.name) + '.js')
if os.path.exists(js_path):
context.script = frappe.render_template(open(js_path, 'r').read().decode('utf-8'), context)
css_path = os.path.join(os.path.dirname(self.web_form_module.__file__), scrub(self.name) + '.css')
if os.path.exists(css_path):
context.style = open(css_path, 'r').read()
def get_layout(self):
layout = []
def add_page(df=None):
new_page = {'sections': []}
layout.append(new_page)
if df and df.fieldtype=='Page Break':
new_page.update(df.as_dict())
return new_page
def add_section(df=None):
new_section = {'columns': []}
layout[-1]['sections'].append(new_section)
if df and df.fieldtype=='Section Break':
new_section.update(df.as_dict())
return new_section
def add_column(df=None):
new_col = []
layout[-1]['sections'][-1]['columns'].append(new_col)
return new_col
page, section, column = None, None, None
for df in self.web_form_fields:
# breaks
if df.fieldtype=='Page Break':
page = add_page(df)
section, column = None, None
if df.fieldtype=='Section Break':
section = add_section(df)
column = None
if df.fieldtype=='Column Break':
column = add_column(df)
# input
if df.fieldtype not in ('Section Break', 'Column Break', 'Page Break'):
if not page:
page = add_page()
section, column = None, None
if not section:
section = add_section()
column = None
if column==None:
column = add_column()
column.append(df)
return layout
def get_parents(self, context):
parents = None
if context.is_list and not context.parents:
parents = [{"title": _("My Account"), "name": "me"}]
elif context.parents:
parents = context.parents
return parents
def set_web_form_module(self):
'''Get custom web form module if exists'''
if self.is_standard:
self.web_form_module = get_doc_module(self.module, self.doctype, self.name)
else:
self.web_form_module = None
def validate_mandatory(self, doc):
'''Validate mandatory web form fields'''
missing = []
for f in self.web_form_fields:
if f.reqd and doc.get(f.fieldname) in (None, [], ''):
missing.append(f)
if missing:
frappe.throw(_('Mandatory Information missing:') + '<br><br>'
+ '<br>'.join(['{0} ({1})'.format(d.label, d.fieldtype) for d in missing]))
@frappe.whitelist(allow_guest=True)
def accept(web_form, data, for_payment=False):
'''Save the web form'''
data = frappe._dict(json.loads(data))
files = []
files_to_delete = []
web_form = frappe.get_doc("Web Form", web_form)
if data.doctype != web_form.doc_type:
frappe.throw(_("Invalid Request"))
elif data.name and not web_form.allow_edit:
frappe.throw(_("You are not allowed to update this Web Form Document"))
frappe.flags.in_web_form = True
if data.name:
# update
doc = frappe.get_doc(data.doctype, data.name)
else:
# insert
doc = frappe.new_doc(data.doctype)
# set values
for fieldname, value in iteritems(data):
if value and isinstance(value, dict):
try:
if "__file_attachment" in value:
files.append((fieldname, value))
continue
if '__no_attachment' in value:
files_to_delete.append(doc.get(fieldname))
value = ''
except ValueError:
pass
doc.set(fieldname, value)
if for_payment:
web_form.validate_mandatory(doc)
doc.run_method('validate_payment')
if doc.name:
if has_web_form_permission(doc.doctype, doc.name, "write"):
doc.save(ignore_permissions=True)
else:
# only if permissions are present
doc.save()
else:
# insert
if web_form.login_required and frappe.session.user=="Guest":
frappe.throw(_("You must login to submit this form"))
doc.insert(ignore_permissions = True)
# add files
if files:
for f in files:
fieldname, filedata = f
# remove earlier attached file (if exists)
if doc.get(fieldname):
remove_file_by_url(doc.get(fieldname), doc.doctype, doc.name)
# save new file
filedoc = save_file(filedata["filename"], filedata["dataurl"],
doc.doctype, doc.name, decode=True)
# update values
doc.set(fieldname, filedoc.file_url)
doc.save()
if files_to_delete:
for f in files_to_delete:
if f:
remove_file_by_url(f, doc.doctype, doc.name)
frappe.flags.web_form_doc = doc
if for_payment:
return web_form.get_payment_gateway_url(doc)
else:
return doc.name
@frappe.whitelist()
def delete(web_form, name):
web_form = frappe.get_doc("Web Form", web_form)
owner = frappe.db.get_value(web_form.doc_type, name, "owner")
if frappe.session.user == owner and web_form.allow_delete:
frappe.delete_doc(web_form.doc_type, name, ignore_permissions=True)
else:
raise frappe.PermissionError("Not Allowed")
def has_web_form_permission(doctype, name, ptype='read'):
if frappe.session.user=="Guest":
return False
# owner matches
elif frappe.db.get_value(doctype, name, "owner")==frappe.session.user:
return True
elif frappe.has_website_permission(name, ptype=ptype, doctype=doctype):
return True
elif check_webform_perm(doctype, name):
return True
else:
return False
def check_webform_perm(doctype, name):
doc = frappe.get_doc(doctype, name)
if hasattr(doc, "has_webform_permission"):
if doc.has_webform_permission():
return True
def get_web_form_list(doctype, txt, filters, limit_start, limit_page_length=20, order_by=None):
from frappe.www.list import get_list
if not filters:
filters = {}
filters["owner"] = frappe.session.user
return get_list(doctype, txt, filters, limit_start, limit_page_length, order_by=order_by,
ignore_permissions=True)
def make_route_string(parameters):
route_string = ""
delimeter = '?'
if isinstance(parameters, dict):
for key in parameters:
if key != "web_form_name":
route_string += route_string + delimeter + key + "=" + cstr(parameters[key])
delimeter = '&'
return (route_string, delimeter)

View File

@@ -1,432 +0,0 @@
{
"allow_copy": 0,
"allow_import": 0,
"allow_rename": 0,
"beta": 0,
"creation": "2014-09-01 14:14:14.292173",
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
"document_type": "",
"editable_grid": 1,
"fields": [
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "fieldname",
"fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Fieldname",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "fieldtype",
"fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Fieldtype",
"length": 0,
"no_copy": 0,
"options": "Attach\nCheck\nData\nDate\nDatetime\nFloat\nHTML\nInt\nLink\nSelect\nSmall Text\nText\nText Editor\nTable\nSection Break\nColumn Break\nPage Break",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "label",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Label",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "reqd",
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Mandatory",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "read_only",
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Read Only",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "hidden",
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Hidden",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "column_break_4",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "options",
"fieldtype": "Text",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Options",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "max_length",
"fieldtype": "Int",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Max Length",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"depends_on": "eval:doc.fieldtype=='Int'",
"fieldname": "max_value",
"fieldtype": "Int",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Max Value",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "section_break_6",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "description",
"fieldtype": "Text",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Description",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "column_break_8",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "default",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Default",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
}
],
"hide_heading": 0,
"hide_toolbar": 0,
"idx": 0,
"image_view": 0,
"in_create": 0,
"in_dialog": 0,
"is_submittable": 0,
"issingle": 0,
"istable": 1,
"max_attachments": 0,
"modified": "2017-02-27 15:55:00.850515",
"modified_by": "Administrator",
"module": "Website",
"name": "Web Form Field",
"name_case": "",
"owner": "Administrator",
"permissions": [],
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
"show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 0,
"track_seen": 0
}

View File

@@ -1,9 +0,0 @@
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
class WebFormField(Document):
pass

View File

@@ -5,7 +5,7 @@
<div class="container"> <div class="container">
<img class="hero-illustration bottom-spacer" src='/assets/foundation/img/hero-illustration-erpnext.png' alt="ERP software for Everybody"> <img class="hero-illustration bottom-spacer" src='/assets/foundation/img/hero-illustration-erpnext.png' alt="ERP software for Everybody">
<h1 class="header-1">ERP for Everybody</h1> <h1 class="header-1">ERP for Everybody</h1>
<p class='intro-copy text-medium text-light'>Worlds Leading Fully Opensource ERP Software That Helps You Stay In Control Of Your Business</p> <p class='intro-copy text-medium text-light'>World's leading fully open source ERP software that helps you stay in control of your business</p>
<a class="button button-primary" href="/get-started.html">Get Started</a> <a class="button button-primary" href="/get-started.html">Get Started</a>
</div> </div>
</section> </section>