In Quoteitems, when item has been selected from the scope, "name" input becomes readonly. I want to make quantity, listprice, and unitprice readonly when item has been selected.
//name.js
Quantity, listprice, and unitprice changes to readonly="true" when items exist and i'm another adding another one. When I update/save, and then i go back to add a item, the fields are no longer readonly.
//name.js
Code:
[COLOR=#7a7a43]handleNameAvailability[/COLOR]: [COLOR=#000080][B]function [/B][/COLOR]() { [COLOR=#000080][B]if [/B][/COLOR]([COLOR=#000080][B]this[/B][/COLOR].[COLOR=#660e7a][B]model[/B][/COLOR].[COLOR=#7a7a43]get[/COLOR]([COLOR=#008000][B]'productId'[/B][/COLOR])) { [COLOR=#000080][B]this[/B][/COLOR].[COLOR=#660e7a][B]$element[/B][/COLOR].[COLOR=#7a7a43]attr[/COLOR]([COLOR=#008000][B]'readonly'[/B][/COLOR][COLOR=#cc7832], [/COLOR][COLOR=#000080][B]true[/B][/COLOR])[COLOR=#cc7832]; [/COLOR][COLOR=#660e7a][B]$[/B][/COLOR]([COLOR=#008000][B]".field-listPrice"[/B][/COLOR]).[COLOR=#7a7a43]find[/COLOR]([COLOR=#008000][B]'input[name="listPrice"]'[/B][/COLOR]).[COLOR=#7a7a43]attr[/COLOR]([COLOR=#008000][B]'readonly'[/B][/COLOR][COLOR=#cc7832],[/COLOR][COLOR=#000080][B]true[/B][/COLOR])[COLOR=#cc7832]; [/COLOR][COLOR=#660e7a][B]$[/B][/COLOR]([COLOR=#008000][B]".field-unitPrice"[/B][/COLOR]).[COLOR=#7a7a43]find[/COLOR]([COLOR=#008000][B]'input[name="unitPrice"]'[/B][/COLOR]).[COLOR=#7a7a43]attr[/COLOR]([COLOR=#008000][B]'readonly'[/B][/COLOR][COLOR=#cc7832],[/COLOR][COLOR=#000080][B]true[/B][/COLOR])[COLOR=#cc7832]; [/COLOR][COLOR=#660e7a][B]$[/B][/COLOR]([COLOR=#008000][B]".field-quantity"[/B][/COLOR]).[COLOR=#7a7a43]find[/COLOR]([COLOR=#008000][B]'input[name="quantity"]'[/B][/COLOR]).[COLOR=#7a7a43]attr[/COLOR]([COLOR=#008000][B]'readonly'[/B][/COLOR][COLOR=#cc7832],[/COLOR][COLOR=#000080][B]true[/B][/COLOR])[COLOR=#cc7832]; [/COLOR]}
Comment