awsss
2 years ago
30 changed files with 345 additions and 571 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,33 +0,0 @@ |
|||
// Copyright (c) 2021, Hard n Soft Technologies Pvt Ltd and contributors
|
|||
// For license information, please see license.txt
|
|||
|
|||
frappe.ui.form.on('Procedure Name', { |
|||
validate: function (frm) { |
|||
if (frm.doc.procedure_name) { |
|||
if (frm.doc.procedure_name.length > 50) { |
|||
frappe.msgprint("<b>Procedure Name:</b> Only <b> 50 </b> characters allowed") |
|||
validated = false; |
|||
} |
|||
if (frm.doc.procedure_name.length == 1) { |
|||
frappe.msgprint("<b>Procedure Name:</b> Single character not allowed") |
|||
validated = false; |
|||
} |
|||
} |
|||
if (frm.doc.procedure_name == ".") { |
|||
frappe.throw(__("Just a <b>.</b> is not prescribed!")); |
|||
frappe.validated = false; |
|||
} |
|||
var regex = /[!@#$%^&*()_+\=\[\]{};`~':"\\|.<>\/?]+/; |
|||
if (frm.doc.procedure_name) { |
|||
if (regex.test(frm.doc.procedure_name) === true) { |
|||
frappe.throw(__("<b>Procedure Name:</b> Only letters, numbers and <b> -,</b> are allowed.")); |
|||
frappe.validated = false; |
|||
} else if (frm.doc.procedure_name) { |
|||
if (frm.doc.procedure_name.includes("'")) { |
|||
frappe.throw(__("<b>Procedure Name:</b> Only letters, numbers and <b> -,</b> are allowed.")); |
|||
frappe.validated = false; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
}); |
@ -1,51 +0,0 @@ |
|||
{ |
|||
"actions": [], |
|||
"allow_import": 1, |
|||
"allow_rename": 1, |
|||
"autoname": "format:{procedure_name}", |
|||
"creation": "2021-12-03 09:33:15.477982", |
|||
"doctype": "DocType", |
|||
"editable_grid": 1, |
|||
"engine": "InnoDB", |
|||
"field_order": [ |
|||
"procedure_name" |
|||
], |
|||
"fields": [ |
|||
{ |
|||
"allow_in_quick_entry": 1, |
|||
"fieldname": "procedure_name", |
|||
"fieldtype": "Data", |
|||
"in_list_view": 1, |
|||
"in_preview": 1, |
|||
"label": "Procedure Name", |
|||
"reqd": 1, |
|||
"unique": 1 |
|||
} |
|||
], |
|||
"index_web_pages_for_search": 1, |
|||
"links": [], |
|||
"modified": "2021-12-03 12:23:39.999238", |
|||
"modified_by": "Administrator", |
|||
"module": "Transactions", |
|||
"name": "Procedure Name", |
|||
"owner": "Administrator", |
|||
"permissions": [ |
|||
{ |
|||
"create": 1, |
|||
"delete": 1, |
|||
"email": 1, |
|||
"export": 1, |
|||
"print": 1, |
|||
"read": 1, |
|||
"report": 1, |
|||
"role": "System Manager", |
|||
"share": 1, |
|||
"write": 1 |
|||
} |
|||
], |
|||
"quick_entry": 1, |
|||
"search_fields": "procedure_name", |
|||
"sort_field": "procedure_name", |
|||
"sort_order": "ASC", |
|||
"title_field": "procedure_name" |
|||
} |
@ -1,8 +0,0 @@ |
|||
# Copyright (c) 2021, Hard n Soft Technologies Pvt Ltd and contributors |
|||
# For license information, please see license.txt |
|||
|
|||
# import frappe |
|||
from frappe.model.document import Document |
|||
|
|||
class ProcedureName(Document): |
|||
pass |
@ -1,8 +0,0 @@ |
|||
# Copyright (c) 2021, Hard n Soft Technologies Pvt Ltd and Contributors |
|||
# See license.txt |
|||
|
|||
# import frappe |
|||
import unittest |
|||
|
|||
class TestProcedureName(unittest.TestCase): |
|||
pass |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,33 +0,0 @@ |
|||
// Copyright (c) 2021, Hard n Soft Technologies Pvt Ltd and contributors
|
|||
// For license information, please see license.txt
|
|||
|
|||
frappe.ui.form.on('Procedure Step Name', { |
|||
validate: function (frm) { |
|||
if (frm.doc.step_name) { |
|||
if (frm.doc.step_name.length > 50) { |
|||
frappe.msgprint("<b>Step Name :</b> Only <b> 50 </b> characters allowed") |
|||
validated = false; |
|||
} |
|||
if (frm.doc.step_name.length == 1) { |
|||
frappe.msgprint("<b>Step Name :</b> Single character not allowed") |
|||
validated = false; |
|||
} |
|||
} |
|||
if (frm.doc.step_name == ".") { |
|||
frappe.throw(__("Just a <b>.</b> is not prescribed!")); |
|||
frappe.validated = false; |
|||
} |
|||
var regex = /[!@#$%^&*()_+\=\[\]{};`~':"\\|.<>\/?]+/; |
|||
if (frm.doc.step_name) { |
|||
if (regex.test(frm.doc.step_name) === true) { |
|||
frappe.throw(__("<b>Step Name :</b> Only letters, numbers and <b> -,</b> are allowed.")); |
|||
frappe.validated = false; |
|||
} else if (frm.doc.step_name) { |
|||
if (frm.doc.step_name.includes("'")) { |
|||
frappe.throw(__("<b>Step Name :</b> Only letters, numbers and <b> -,</b> are allowed.")); |
|||
frappe.validated = false; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
}); |
@ -1,51 +0,0 @@ |
|||
{ |
|||
"actions": [], |
|||
"allow_import": 1, |
|||
"allow_rename": 1, |
|||
"autoname": "format:{step_name}", |
|||
"creation": "2021-12-03 09:42:59.565222", |
|||
"doctype": "DocType", |
|||
"editable_grid": 1, |
|||
"engine": "InnoDB", |
|||
"field_order": [ |
|||
"step_name" |
|||
], |
|||
"fields": [ |
|||
{ |
|||
"allow_in_quick_entry": 1, |
|||
"fieldname": "step_name", |
|||
"fieldtype": "Data", |
|||
"in_list_view": 1, |
|||
"in_preview": 1, |
|||
"label": "Step Name", |
|||
"reqd": 1, |
|||
"unique": 1 |
|||
} |
|||
], |
|||
"index_web_pages_for_search": 1, |
|||
"links": [], |
|||
"modified": "2022-04-05 16:11:23.912047", |
|||
"modified_by": "Administrator", |
|||
"module": "Transactions", |
|||
"name": "Procedure Step Name", |
|||
"owner": "Administrator", |
|||
"permissions": [ |
|||
{ |
|||
"create": 1, |
|||
"delete": 1, |
|||
"email": 1, |
|||
"export": 1, |
|||
"print": 1, |
|||
"read": 1, |
|||
"report": 1, |
|||
"role": "System Manager", |
|||
"share": 1, |
|||
"write": 1 |
|||
} |
|||
], |
|||
"quick_entry": 1, |
|||
"search_fields": "step_name", |
|||
"sort_field": "step_name", |
|||
"sort_order": "ASC", |
|||
"title_field": "step_name" |
|||
} |
@ -1,8 +0,0 @@ |
|||
# Copyright (c) 2021, Hard n Soft Technologies Pvt Ltd and contributors |
|||
# For license information, please see license.txt |
|||
|
|||
# import frappe |
|||
from frappe.model.document import Document |
|||
|
|||
class ProcedureStepName(Document): |
|||
pass |
@ -1,8 +0,0 @@ |
|||
# Copyright (c) 2021, Hard n Soft Technologies Pvt Ltd and Contributors |
|||
# See license.txt |
|||
|
|||
# import frappe |
|||
import unittest |
|||
|
|||
class TestProcedureStepName(unittest.TestCase): |
|||
pass |
Loading…
Reference in new issue