Certfication Application Doctype and webform,Certfied Consultant DocType (#14528)

This commit is contained in:
asbasawaraj
2018-06-15 10:04:19 +05:30
committed by Nabin Hait
parent 0e5c8283fa
commit 4c263480c9
24 changed files with 1057 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
frappe.ready(function() {
// bind events here
$(".page-header-actions-block .btn-primary, .page-header-actions-block .btn-default").addClass('hidden');
$(".text-right .btn-primary").addClass('hidden');
if (frappe.utils.get_url_arg('name')) {
$('.page-content .btn-form-submit').addClass('hidden');
} else {
user_name = frappe.full_name
user_email_id = frappe.session.user
$('[data-fieldname="currency"]').val("USD");
$('[data-fieldname="name_of_applicant"]').val(user_name);
$('[data-fieldname="email"]').val(user_email_id);
$('[data-fieldname="amount"]').val(300);
}
})

View File

@@ -0,0 +1,80 @@
{
"accept_payment": 1,
"allow_comments": 0,
"allow_delete": 0,
"allow_edit": 0,
"allow_incomplete": 0,
"allow_multiple": 1,
"allow_print": 0,
"amount": 0.0,
"amount_based_on_field": 1,
"amount_field": "amount",
"creation": "2018-06-13 09:22:48.262441",
"currency": "USD",
"doc_type": "Certification Application",
"docstatus": 0,
"doctype": "Web Form",
"idx": 0,
"introduction_text": "",
"is_standard": 1,
"login_required": 1,
"max_attachment_size": 0,
"modified": "2018-06-13 09:26:35.502064",
"modified_by": "Administrator",
"module": "Non Profit",
"name": "certification-application-usd",
"owner": "Administrator",
"payment_button_help": "Pay for your certification using PayPal",
"payment_button_label": "Pay Now",
"payment_gateway": "PayPal",
"published": 1,
"route": "certification-application-usd",
"show_sidebar": 1,
"sidebar_items": [],
"success_url": "/certification-application-usd",
"title": "Certification Application USD",
"web_form_fields": [
{
"fieldname": "name_of_applicant",
"fieldtype": "Data",
"hidden": 0,
"label": "Name of Applicant",
"max_length": 0,
"max_value": 0,
"read_only": 0,
"reqd": 0
},
{
"fieldname": "email",
"fieldtype": "Link",
"hidden": 0,
"label": "Email",
"max_length": 0,
"max_value": 0,
"options": "User",
"read_only": 1,
"reqd": 1
},
{
"fieldname": "currency",
"fieldtype": "Select",
"hidden": 0,
"label": "Currency",
"max_length": 0,
"max_value": 0,
"options": "USD\nINR",
"read_only": 1,
"reqd": 0
},
{
"fieldname": "amount",
"fieldtype": "Float",
"hidden": 0,
"label": "Amount",
"max_length": 0,
"max_value": 0,
"read_only": 1,
"reqd": 0
}
]
}

View File

@@ -0,0 +1,7 @@
from __future__ import unicode_literals
import frappe
def get_context(context):
# do your magic here
pass