Browse Source

App labels underscore allow

master
venkataakhil 1 year ago
parent
commit
814add52b7
  1. 16
      smart_service/apis/support.py
  2. 2
      smart_service/masters/doctype/app_labels/app_labels.js

16
smart_service/apis/support.py

@ -412,14 +412,14 @@ def set_procedure_false():
@frappe.whitelist(allow_guest=1)
def clear_procedures():
try:
set_procedure_false()
frappe.db.sql('''delete FROM `tabPublish`;''')
frappe.db.sql('''delete FROM `tabPublish_Docs`;''')
frappe.db.sql('''update `tabVariant Mapping_Assets` set published=0;''')
frappe.db.sql('''update `tabSystem Mapping_Sub System` set procedure_is_published=0;''')
frappe.db.sql('''update `tabSystem Mapping_System Assets` set published=0;''')
frappe.db.commit()
# set_procedure_false()
# frappe.db.sql('''delete FROM `tabPublish`;''')
# frappe.db.sql('''delete FROM `tabPublish_Docs`;''')
# frappe.db.sql('''update `tabVariant Mapping_Assets` set published=0;''')
# frappe.db.sql('''update `tabSystem Mapping_Sub System` set procedure_is_published=0;''')
# frappe.db.sql('''update `tabSystem Mapping_System Assets` set published=0;''')
# frappe.db.commit()
except Exception as e:
return e

2
smart_service/masters/doctype/app_labels/app_labels.js

@ -36,7 +36,7 @@ frappe.ui.form.on('App Labels', {
frappe.throw(__("Just a <b>.</b> is not prescribed!"));
frappe.validated = false;
}
var regex = /[!@#$%^&*()_+\=\[\]{};`~':"\\|.<>\/?]+/;
var regex = /[!@#$%^&*()+\=\[\]{};`~':"\\|.<>\/?]+/;
if (frm.doc.english_label) {
if (regex.test(frm.doc.english_label) === true) {
frappe.throw(__("<b>English Label :</b> Only letters, numbers and <b> - , </b> are allowed."));

Loading…
Cancel
Save