Пример #1
0
 def get_calc_html_attrs(self):
     at = TextBox.get_calc_html_attrs(self)
     if ' ' in at['value']:
         m = fecha_larga.match(at['value'])
         if m:
             at['value'] = m.group(1)
     return at
Пример #2
0
 def get_calc_html_attrs(self):
     at = TextBox.get_calc_html_attrs(self)
     if ' ' in at['value']:
         m = fecha_larga.match(at['value'])
         if m:
             at['value'] = m.group(1)
     return at
Пример #3
0
    def get_validation_js_info(self):
        r = TextBox.get_validation_js_info(self)
        me = 'document.getElementById("%s")' % self.get_html_id()

        return r + [{
            'msg': 'Invalid time',
            'validate': '(/^((2[0-3])|([01]?[0-9])):[0-5]?[0-9]:([0-5]?[0-9])?$/.exec(%s))' % self.calljs_getvalue(),
            'onselect': me + '.focus()',
            'markitem': self.get_html_id()
        }]
Пример #4
0
    def get_calc_html_attrs(self):
        calcdict = TextBox.get_calc_html_attrs(self)

        try:
            del calcdict['value']
        except KeyError:
            pass

        for at in ('rows', 'cols'):
            a = self.get_arg(at, None)
            if a is not None: 
                calcdict[at] = a

        return calcdict
Пример #5
0
    def get_validation_js_info(self):
        r = TextBox.get_validation_js_info(self)
        me = 'document.getElementById("%s")' % self.get_html_id()

        return r + [{
            'msg':
            'Invalid time',
            'validate':
            '(/^((2[0-3])|([01]?[0-9])):[0-5]?[0-9]:([0-5]?[0-9])?$/.exec(%s))'
            % self.calljs_getvalue(),
            'onselect':
            me + '.focus()',
            'markitem':
            self.get_html_id()
        }]
Пример #6
0
 def get_args_spec(self):
     req, opt = TextBox.get_args_spec(self)
     return req, opt + ['rows', 'cols']