Uploaded image for project: 'Blesta Core'
  1. Blesta Core
  2. CORE-5518

Unable to submit hidden quantity package/config options

    Details

    • Type: Bug
    • Status: In Review
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.12.3
    • Component/s: None
    • Labels:
      None

      Description

      To reproduce:

      • Create a package/config option group
      • Create a dropdown config option with two values
      • Create a quantity config option with a min of 0, empty max, step of 1, and default of 0
      • Edit the config option logic for the group and make the display of the qty field dependent on the second dropdown option being selected
      • Assign the option group to a package
      • Attempt to order the package with the first dropdown option selected

        Activity

        jonathan Jonathan Reissmueller created issue -
        jonathan Jonathan Reissmueller made changes -
        Field Original Value New Value
        Sprint 5.13.0 Sprint 4 [ 219 ]
        jonathan Jonathan Reissmueller made changes -
        Rank Ranked higher
        jonathan Jonathan Reissmueller made changes -
        Description To reproduce:

        - Create a package/config option group
        - Create a dropdown config option with two values
        - Create a quantity config option with a min of 0, empty max, step of 1, and default of 0
        - Edit the config option logic for the group and make the display of the qty field dependent on the second dropdown option being selected
        - Assign the option group to a package
        - Attempt to order the package with the first dropdown option selected

        To resolve update app/views/client/bootstrap/partial_packageoption_js.pdt around line 17 and add:

        {code:java}
                // Add form submission handler to process disabled quantity fields
                $(container_selector).closest('form').on('submit', function(e) {
                    processDisabledQuantityFields();
                });
        {code}

        then around line 650 add


        {code:java}
            /**
             * Process disabled quantity fields on form submission by setting their value to zero and enabling them
             */
            function processDisabledQuantityFields()
            {
                $(container_selector).find('input[data-type=quantity]').each(function() {
                    if ($(this).prop('disabled')) {
                        $(this).val(0);
                        $(this).prop('disabled', false);
                    }
                });
            }
        {code}

        Then do the same for the admin side.
        To reproduce:

        - Create a package/config option group
        - Create a dropdown config option with two values
        - Create a quantity config option with a min of 0, empty max, step of 1, and default of 0
        - Edit the config option logic for the group and make the display of the qty field dependent on the second dropdown option being selected
        - Assign the option group to a package
        - Attempt to order the package with the first dropdown option selected

        To resolve update app/views/client/bootstrap/partial_packageoption_js.pdt around line 17 and add:

        {code:java}
                // Add form submission handler to process disabled quantity fields
                $(container_selector).closest('form').on('submit', function(e) {
                    processDisabledQuantityFields();
                });
        {code}
        jonathan Jonathan Reissmueller made changes -
        Comment [ The solution is not correct. New one on the way ]
        jonathan Jonathan Reissmueller made changes -
        Assignee Jonathan Reissmueller [ jonathan ]
        jonathan Jonathan Reissmueller made changes -
        Description To reproduce:

        - Create a package/config option group
        - Create a dropdown config option with two values
        - Create a quantity config option with a min of 0, empty max, step of 1, and default of 0
        - Edit the config option logic for the group and make the display of the qty field dependent on the second dropdown option being selected
        - Assign the option group to a package
        - Attempt to order the package with the first dropdown option selected

        To resolve update app/views/client/bootstrap/partial_packageoption_js.pdt around line 17 and add:

        {code:java}
                // Add form submission handler to process disabled quantity fields
                $(container_selector).closest('form').on('submit', function(e) {
                    processDisabledQuantityFields();
                });
        {code}
        To reproduce:

        - Create a package/config option group
        - Create a dropdown config option with two values
        - Create a quantity config option with a min of 0, empty max, step of 1, and default of 0
        - Edit the config option logic for the group and make the display of the qty field dependent on the second dropdown option being selected
        - Assign the option group to a package
        - Attempt to order the package with the first dropdown option selected

        jonathan Jonathan Reissmueller made changes -
        Status Open [ 1 ] In Review [ 5 ]
        Resolution Fixed [ 1 ]
        jonathan Jonathan Reissmueller made changes -
        Sprint 5.13.0 Sprint 4 [ 219 ] 5.13.0 Sprint 4, 5.13.0 Sprint 5 [ 219, 220 ]
        jonathan Jonathan Reissmueller made changes -
        Rank Ranked higher

          People

          • Assignee:
            jonathan Jonathan Reissmueller
            Reporter:
            jonathan Jonathan Reissmueller
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Agile