0001-form-add-default-hint-to-file-size-widget-9726.patch
wcs/qommon/form.py | ||
---|---|---|
1177 | 1177 |
file size.''' |
1178 | 1178 |
regex = r'^\s*([\d]+)\s*([MK]i?)?[oB]?\s*$' |
1179 | 1179 | |
1180 |
def __init__(self, *args, **kwargs): |
|
1181 |
hint = kwargs.pop('hint', _('Accepted units: MB (megabytes), KB (kilobytes), for example: 3 MB')) |
|
1182 |
ValidatedStringWidget.__init__(self, *args, hint=hint, **kwargs) |
|
1183 | ||
1180 | 1184 |
@classmethod |
1181 | 1185 |
def parse_file_size(cls, value): |
1182 | 1186 |
try: |
1183 |
- |