# HG changeset patch
# User Inigo Sanchez <inigo.sanchez@openbravo.com>
# Date 1418207323 -3600
#      Wed Dec 10 11:28:43 2014 +0100
# Node ID 0d730c3c9ce4be19436ca6d259585abb37516c41
# Parent  9b1b8a37654344ec0b93016c351fc6f45cb0d0b1
Fixed bug 27670:It's possible to edit time references when they're readOnly

Though the readonly UI looks fine, it is still possible to edit
time and absolute time references when they are read only. Now, it has been
added "this.textField.disabled" and it has been resolved the problem.

diff -r 9b1b8a376543 -r 0d730c3c9ce4 modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-time.js
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-time.js	Tue Dec 09 11:16:40 2014 +0100
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-time.js	Wed Dec 10 11:28:43 2014 +0100
@@ -62,9 +62,11 @@
     if (disabled) {
       this.previousStyleName = this.textBoxStyle;
       this.textBoxStyle = this.textBoxStyle + 'Disabled';
+      this.textField.disabled = true;
     } else if (this.textBoxStyle.endsWith('Disabled')) {
       this.textBoxStyle = (this.previousStyleName || this.textBoxStyle.substring(0, this.textBoxStyle.length - 8));
       delete this.previousStyleName;
+      this.textField.disabled = false;
     }
     this.Super('setDisabled', arguments);
   },
