modules/org.openbravo.client.application/src/org/openbravo/client/application/templates/ob-view-form.js.ftl
changeset 28252 e91d7a38fa6b
parent 28121 d9584faf499b
child 28265 52f41dec669a
equal deleted inserted replaced
28251:c984f59ed409 28252:e91d7a38fa6b
    10  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
    10  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
    11  * License for the specific  language  governing  rights  and  limitations
    11  * License for the specific  language  governing  rights  and  limitations
    12  * under the License.
    12  * under the License.
    13  * The Original Code is Openbravo ERP.
    13  * The Original Code is Openbravo ERP.
    14  * The Initial Developer of the Original Code is Openbravo SLU
    14  * The Initial Developer of the Original Code is Openbravo SLU
    15  * All portions are Copyright (C) 2010-2015 Openbravo SLU
    15  * All portions are Copyright (C) 2010-2016 Openbravo SLU
    16  * All Rights Reserved.
    16  * All Rights Reserved.
    17  * Contributor(s):  ______________________________________.
    17  * Contributor(s):  ______________________________________.
    18  ************************************************************************
    18  ************************************************************************
    19 */
    19 */
    20 -->
    20 -->
    37             context = this.view.getContextInfo(false, true),
    37             context = this.view.getContextInfo(false, true),
    38             currentValues = isc.shallowClone(f.view.getCurrentValues()), otherItem,
    38             currentValues = isc.shallowClone(f.view.getCurrentValues()), otherItem,
    39             disabledFields, i;
    39             disabledFields, i;
    40             OB.Utilities.fixNull250(currentValues);
    40             OB.Utilities.fixNull250(currentValues);
    41         <#list data.fieldHandler.fields as field>
    41         <#list data.fieldHandler.fields as field>
    42         <#if field.readOnlyIf != "" && field.showIf == "">
    42         <#if !field.readOnly && field.readOnlyIf != "" && field.showIf == "">
    43         // Applying read only.
    43            // Applying read only logic.
    44            f.disableItem('${field.name}', ${field.readOnlyIf});
    44            f.disableItem('${field.name}', ${field.readOnlyIf});
    45         <#else>
    45         <#else>
    46         <#if field.readOnlyIf == "" && field.showIf != "">
    46         <#if !field.readOnly && field.readOnlyIf == "" && field.showIf != "">
    47         // Applying display logic in grid.
    47         // Applying display logic in grid.
    48         if (!this.view.isShowingForm) {
    48         if (!this.view.isShowingForm) {
    49         <#if field.showIf == "false">
    49         <#if field.showIf == "false">
    50            f.disableItem('${field.name}', true);
    50            f.disableItem('${field.name}', true);
    51         <#else>
    51         <#else>
    52            f.disableItem('${field.name}', (${field.showIf}) === false);
    52            f.disableItem('${field.name}', (${field.showIf}) === false);
    53         </#if>
    53         </#if>
    54         }
    54         }
    55         <#else>
    55         <#else>
    56         <#if field.readOnlyIf != "" && field.showIf != "">
    56         <#if !field.readOnly && field.readOnlyIf != "" && field.showIf != "">
    57         // Applying display logic and read only in grid/form.
    57         // Applying display logic and read only in grid/form.
    58         if (!this.view.isShowingForm) {
    58         if (!this.view.isShowingForm) {
    59         <#if field.showIf == "false">
    59         <#if field.showIf == "false">
    60            // If display logic has a false value, it is only necessary take into account the read only logic.
    60            // If display logic has a false value, it is only necessary take into account the read only logic.
    61            f.disableItem('${field.name}', (${field.readOnlyIf}));
    61            f.disableItem('${field.name}', (${field.readOnlyIf}));