Skip to content
Snippets Groups Projects
  • Denis Ledoux's avatar
    c751c129
    [FIX] website_sale: `State` select readonly in shipping info · c751c129
    Denis Ledoux authored
    If we take the below facts:
     - The country select is set as disabled
       when Shipping is set to "Ship to the same address"
     - The disable property of select inputs is
       removed when shipping is set to
       `create a new address`:
       In `website_sale.js`:
       ```
       $selects.attr("disabled", value <= 0 ? null : "disabled" ).prop("disabled", value <= 0 ? null : "disabled" );
       ```
    
    We can safely assume that the select input "State / Province" was supposed
    to be set as `disabled` in the first place, not as `readonly`
    
    Before this revision, State / Provice was greyed when choosing
    "Create a new address" for shipping, and selecting the United States
    (but the select input was still usable, though, it was just greyed)
    
    opw-675739
    c751c129
    History
    [FIX] website_sale: `State` select readonly in shipping info
    Denis Ledoux authored
    If we take the below facts:
     - The country select is set as disabled
       when Shipping is set to "Ship to the same address"
     - The disable property of select inputs is
       removed when shipping is set to
       `create a new address`:
       In `website_sale.js`:
       ```
       $selects.attr("disabled", value <= 0 ? null : "disabled" ).prop("disabled", value <= 0 ? null : "disabled" );
       ```
    
    We can safely assume that the select input "State / Province" was supposed
    to be set as `disabled` in the first place, not as `readonly`
    
    Before this revision, State / Provice was greyed when choosing
    "Create a new address" for shipping, and selecting the United States
    (but the select input was still usable, though, it was just greyed)
    
    opw-675739