mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-06 21:59:13 +00:00
Special characters allowed in company name. Fixes #1259
This commit is contained in:
@@ -49,32 +49,6 @@ cur_frm.cscript.replace_abbr = function() {
|
|||||||
dialog.show();
|
dialog.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
cur_frm.cscript.has_special_chars = function(t) {
|
|
||||||
var iChars = "!@#$%^*+=-[]\\\';,/{}|\":<>?";
|
|
||||||
for (var i = 0; i < t.length; i++) {
|
|
||||||
if (iChars.indexOf(t.charAt(i)) != -1) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
cur_frm.cscript.company_name = function(doc){
|
|
||||||
if(doc.company_name && cur_frm.cscript.has_special_chars(doc.company_name)){
|
|
||||||
msgprint(__("Special Characters not allowed in Company Name"));
|
|
||||||
doc.company_name = '';
|
|
||||||
refresh_field('company_name');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
cur_frm.cscript.abbr = function(doc){
|
|
||||||
if(doc.abbr && cur_frm.cscript.has_special_chars(doc.abbr)){
|
|
||||||
msgprint(__("Special Characters not allowed in Abbreviation"));
|
|
||||||
doc.abbr = '';
|
|
||||||
refresh_field('abbr');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
cur_frm.fields_dict.default_bank_account.get_query = function(doc) {
|
cur_frm.fields_dict.default_bank_account.get_query = function(doc) {
|
||||||
return{
|
return{
|
||||||
filters: [
|
filters: [
|
||||||
|
|||||||
Reference in New Issue
Block a user