Fixes the bank buttons which weren't getting their handlers registered
thanks to the `null` making it go down the wrong path, and makes sure to
use the institution id from the object passed in, not the institution_id
variable from the global scope which is only defined for renewals.
Resolves#10501
Removes all the guesswork for requisition renewals, instead opting for
the manual approach of simply redirecting to the form and updating its
handling such that it jumps straight to history selection when needed.
When the institution is preloaded (so we skip country/bank selection)
the cloned element is a country and not the bank so we need to replace
athe flag with its logo, but otherwise the code was all moved as-is.
When the country filtering mode is enabled, it adds a "Go back" button
but the close button is right on top of it. This moves the close button
to the right to avoid any click conflicts.
To fix an annoying display bug with the top offset, an observer is used
to override the default `display: none` of the back button to keep its
flex mode but with a hidden visibility so the UI doesn't move around.
Replaces 360 days with 365, skips the last auto-generated option to
avoid getting e.g. 720 and 730 as options when it's close to max, and
gradually increases the accumulator so options aren't so overwhelming.
Since the loop will no longer generate the final option (0 < 15), this
commit also removes the `% 30` check so the real max is always used.
Instead of directing the user straight to GoCardless, when a bank is
selected this will replace the institution list with a list of options
from 30 days—up to the bank's transaction limit—in 30 day increments.
Enabling the country filter stops the selector loop from working because
instead of a `.ob-list-institution` it starts with `.ob-country-list`
items which then get replaced on click so banks don't exist on load.
By wrapping the institution loop in an observer it'll automatically
attach the events when a country is selected and it works wonderfully.
Removes all the guesswork for requisition renewals, instead opting for
the manual approach of simply redirecting to the form and updating its
handling such that it jumps straight to history selection when needed.
When the institution is preloaded (so we skip country/bank selection)
the cloned element is a country and not the bank so we need to replace
athe flag with its logo, but otherwise the code was all moved as-is.
When the country filtering mode is enabled, it adds a "Go back" button
but the close button is right on top of it. This moves the close button
to the right to avoid any click conflicts.
To fix an annoying display bug with the top offset, an observer is used
to override the default `display: none` of the back button to keep its
flex mode but with a hidden visibility so the UI doesn't move around.
Replaces 360 days with 365, skips the last auto-generated option to
avoid getting e.g. 720 and 730 as options when it's close to max, and
gradually increases the accumulator so options aren't so overwhelming.
Since the loop will no longer generate the final option (0 < 15), this
commit also removes the `% 30` check so the real max is always used.
Instead of directing the user straight to GoCardless, when a bank is
selected this will replace the institution list with a list of options
from 30 days—up to the bank's transaction limit—in 30 day increments.
Enabling the country filter stops the selector loop from working because
instead of a `.ob-list-institution` it starts with `.ob-country-list`
items which then get replaced on click so banks don't exist on load.
By wrapping the institution loop in an observer it'll automatically
attach the events when a country is selected and it works wonderfully.