lokeshloki143 commited on
Commit
359f788
·
verified ·
1 Parent(s): 9417f0e

Update templates/customer_details.html

Browse files
Files changed (1) hide show
  1. templates/customer_details.html +4 -2
templates/customer_details.html CHANGED
@@ -157,8 +157,9 @@
157
  flagField.value = "true";
158
  });
159
  }
 
160
  ['customerName', 'phone', 'email'].forEach(function(id) {
161
- if (id !== fieldId && $('#' + id).prop('readonly')) {
162
  $('#' + id).siblings('.change-btn').show();
163
  }
164
  });
@@ -168,8 +169,9 @@
168
  if ($(inputField).prop('readonly')) {
169
  changeBtn.show();
170
  }
 
171
  ['customerName', 'phone', 'email'].forEach(function(id) {
172
- if ($('#' + id).prop('readonly') && id !== $(inputField).attr('id')) {
173
  $('#' + id).siblings('.change-btn').show();
174
  }
175
  });
 
157
  flagField.value = "true";
158
  });
159
  }
160
+ // Show CHANGE buttons for all other readonly fields
161
  ['customerName', 'phone', 'email'].forEach(function(id) {
162
+ if ($('#' + id).prop('readonly')) {
163
  $('#' + id).siblings('.change-btn').show();
164
  }
165
  });
 
169
  if ($(inputField).prop('readonly')) {
170
  changeBtn.show();
171
  }
172
+ // Show CHANGE buttons for all other readonly fields
173
  ['customerName', 'phone', 'email'].forEach(function(id) {
174
+ if ($('#' + id).prop('readonly')) {
175
  $('#' + id).siblings('.change-btn').show();
176
  }
177
  });