florianMo opened a new pull request, #548:
URL: https://github.com/apache/ofbiz-framework/pull/548

   Add disabled support on all form field types
   
   Switch to `FlexibleStringExpander` (instead of boolean) to support dynamic 
attribute values
   
   OF-12678
   
   Improved: Add `disabled` support on all form field types 
   Fixed: bug in `tab-index` attribute implementation for some HTML macros
   
   ### Explanation
   
   Before this PR, `disabled` attribute on form fields is a `boolean`, and its 
support is not implemented on all eligible widgets : 
   ```
   <text disabled="false" />
   <text disabled="true" />
   ```
   
   Based on 
https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/disabled, this PR 
implements dynamic `disabled` attribute for all relevant widgets : 
   ```
   <date-range disabled="true" /> // disabled
   <date-range disabled="${5==5}" /> // disabled
   <date-range disabled="false" /> // not disabled
   <date-range disabled="${5==6}" /> // not disabled
   ```
   
   In addition, in HTML macros, the `disabled` attribute is render as a 
`boolean` instead of a string (see 
https://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html.html#ID-642250288)
 : 
   ```
   <text disabled="true" /> // renders as : 
   <input disabled /> // instead of
   <input disbaled="true" />
   ```
   
   Thanks: Néréide team
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to