web/formwidgets.py
changeset 9718 927d035b6921
parent 9716 c44224387028
child 9821 2077c8da1893
equal deleted inserted replaced
9717:a6834e2dcc1b 9718:927d035b6921
   208         attrs = dict(self.attrs)
   208         attrs = dict(self.attrs)
   209         if self.setdomid:
   209         if self.setdomid:
   210             attrs['id'] = field.dom_id(form, self.suffix)
   210             attrs['id'] = field.dom_id(form, self.suffix)
   211         if self.settabindex and not 'tabindex' in attrs:
   211         if self.settabindex and not 'tabindex' in attrs:
   212             attrs['tabindex'] = form._cw.next_tabindex()
   212             attrs['tabindex'] = form._cw.next_tabindex()
       
   213         if 'placeholder' in attrs:
       
   214             attrs['placeholder'] = form._cw._(attrs['placeholder'])
   213         return attrs
   215         return attrs
   214 
   216 
   215     def values(self, form, field):
   217     def values(self, form, field):
   216         """Return the current *string* values (i.e. for display in an HTML
   218         """Return the current *string* values (i.e. for display in an HTML
   217         string) for the given field. This method returns a list of values since
   219         string) for the given field. This method returns a list of values since