Projet

Général

Profil

0001-form-add-default-hint-to-file-size-widget-9726.patch

Frédéric Péters, 29 mai 2019 14:15

Télécharger (906 octets)

Voir les différences:

Subject: [PATCH] form: add default hint to file size widget (#9726)

 wcs/qommon/form.py | 4 ++++
 1 file changed, 4 insertions(+)
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
-