OFBiz
  1. OFBiz
  2. OFBIZ-4628

re-enable the disabled submit button in ListInvoice and batchPayments

    Details

      Description

      To enable a disabled html element, there're only two ways, remove "disabled" attribute or use javascript to set disable property to false. The patch updates trivial to enable submit button in ListInvoices.ftl and batchPayments.ftl.

        Activity

        Hide
        Jacques Le Roux added a comment -

        Thanks Leon,

        Your modified patch is in
        trunk at r1221889
        R11.04 r1221890

        You were right at 1st << there're only two ways, remove "disabled" attribute or use javascript to set disable property to false>>

        Actually W3C does not define any value for disabled http://www.w3.org/TR/html4/interact/forms.html#adef-disabled and its value in javascript is a boolean so we should rather use true instead of 'disabled' (as you said we could also use false instead of remove, but... anyway...)

        So more files needed to be changed, though they all use ".removeAttr('disabled')"

        Show
        Jacques Le Roux added a comment - Thanks Leon, Your modified patch is in trunk at r1221889 R11.04 r1221890 You were right at 1st << there're only two ways, remove "disabled" attribute or use javascript to set disable property to false>> Actually W3C does not define any value for disabled http://www.w3.org/TR/html4/interact/forms.html#adef-disabled and its value in javascript is a boolean so we should rather use true instead of 'disabled' (as you said we could also use false instead of remove, but... anyway...) So more files needed to be changed, though they all use ".removeAttr('disabled')"
        Hide
        Jacques Le Roux added a comment -

        btw, it's not w2c compliance to set disabled attribute to other value than 'disabled'.

        Great, thanks for your answer it clearly clarfies things. I will commit... soon...

        Show
        Jacques Le Roux added a comment - btw, it's not w2c compliance to set disabled attribute to other value than 'disabled'. Great, thanks for your answer it clearly clarfies things. I will commit... soon...
        Hide
        Leon added a comment -

        not very clear about what changed to jquery, but there're much change to browser. I test the old source in latest IE9 and FF, the disabled button is unable to be enabled again by setting 'disabled' attribute to empty.

        btw, it's not w2c compliance to set disabled attribute to other value than 'disabled'.

        Show
        Leon added a comment - not very clear about what changed to jquery, but there're much change to browser. I test the old source in latest IE9 and FF, the disabled button is unable to be enabled again by setting 'disabled' attribute to empty. btw, it's not w2c compliance to set disabled attribute to other value than 'disabled'.
        Hide
        Jacques Le Roux added a comment - - edited

        ========== EDIT: missed a ? ========
        Hi Leon,

        Quicky browsing, I did not find anything clear in the jQuery doc, but from http://jquery-howto.blogspot.com/2008/12/how-to-disableenable-element-with.html it seems both syntax are correct, has this changed (2008 is pretty old for jQuery)?

        Show
        Jacques Le Roux added a comment - - edited ========== EDIT: missed a ? ======== Hi Leon, Quicky browsing, I did not find anything clear in the jQuery doc, but from http://jquery-howto.blogspot.com/2008/12/how-to-disableenable-element-with.html it seems both syntax are correct, has this changed (2008 is pretty old for jQuery)?

          People

          • Assignee:
            Jacques Le Roux
            Reporter:
            Leon
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development