|
@ -35,14 +35,14 @@ frappe.ui.form.on('Procedure', { |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
validate: function (frm) { |
|
|
validate: function (frm) { |
|
|
var regex = /[@#$%^*+\\[\]{}`~\\|\?]+/; |
|
|
var regex = /[@#$%^*\\[\]{}`~\\|\?]+/; |
|
|
if (frm.doc.procedure_details) { |
|
|
if (frm.doc.procedure_details) { |
|
|
for (var i = 0; i < frm.doc.procedure_details.length; i++) { |
|
|
for (var i = 0; i < frm.doc.procedure_details.length; i++) { |
|
|
if (regex.test(frm.doc.procedure_details[i].content) === true) { |
|
|
if (regex.test(frm.doc.procedure_details[i].content) === true) { |
|
|
if (frm.doc.procedure_details[i].content_type != "Link") { |
|
|
if (frm.doc.procedure_details[i].content_type != "Link") { |
|
|
frm.doc.procedure_details[i].content_type = '' |
|
|
frm.doc.procedure_details[i].content_type = '' |
|
|
frm.refresh_fields(); |
|
|
frm.refresh_fields(); |
|
|
frappe.msgprint(__("<b>Content:</b> Only letters, numbers and <b> - ,'<>_()!=/:;</b> are allowed.")); |
|
|
frappe.msgprint(__("<b>Content:</b> Only letters, numbers and <b> - ,'<>_()!=/:+;</b> are allowed.")); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|