Invert check out form expiration fields

Improve clarity by selecting first the unit then the quantity.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2019-05-20 23:24:56 -04:00
parent 90393e043e
commit 38a34cc98c

View File

@@ -16,16 +16,15 @@ class SplitTimeDeltaWidget(forms.widgets.MultiWidget):
"""
def __init__(self, attrs=None):
widgets = (
forms.widgets.Select(
attrs={'style': 'width: 8em;'}, choices=TIME_DELTA_UNIT_CHOICES
),
forms.widgets.NumberInput(
attrs={
'maxlength': 4, 'style': 'width: 8em;',
'placeholder': _('Period')
}
),
forms.widgets.Select(
attrs={'style': 'width: 8em;'}, choices=TIME_DELTA_UNIT_CHOICES
),
)
)
super(SplitTimeDeltaWidget, self).__init__(widgets, attrs)