Browse Source

App Labels: empty parent label for is group fie;d

version2
venkataakhil 1 year ago
parent
commit
360439782e
  1. 11
      smart_service/masters/doctype/app_labels/app_labels.js

11
smart_service/masters/doctype/app_labels/app_labels.js

@ -3,8 +3,8 @@
frappe.ui.form.on('App Labels', {
is_group: function(frm) {
if (frm.doc.is_group){
is_group: function (frm) {
if (frm.doc.is_group) {
frm.set_value("language", "en");
frm.set_df_property('language', 'read_only', 1);
frm.set_df_property('label', 'read_only', 1);
@ -16,12 +16,15 @@ frappe.ui.form.on('App Labels', {
frm.set_df_property('parent_app_labels', 'hidden', 0);
}
},
english_label: function(frm) {
if (frm.doc.is_group){
english_label: function (frm) {
if (frm.doc.is_group) {
frm.set_value("label", frm.doc.english_label);
}
},
validate: function (frm) {
if (frm.doc.is_group) {
frm.doc.parent_app_labels = null
}
if (frm.doc.english_label) {
if (frm.doc.english_label.length > 100) {
frappe.msgprint("<b>English Label :</b> Only <b> 50 </b> characters allowed")

Loading…
Cancel
Save