Skip to content

Commit

Permalink
Adds a new parameter to CTK.TextField so a "optional" text can be
Browse files Browse the repository at this point in the history
specified from its constructor method.

git-svn-id: svn://cherokee-project.com/CTK/trunk@4634 5dc97367-97f1-0310-9951-d761b3857238
  • Loading branch information
alobbs committed Mar 29, 2010
1 parent afc03c6 commit 79e9d2f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion CTK/TextField.py
Expand Up @@ -61,8 +61,10 @@ def __get_error_div_props (self):
def Render (self):
# Watermark
js = ''

if self._props.get('optional'):
js += "$('#%s').DefaultValue('optional','%s');" %(self.id, _("optional"))
optional_string = self._props.get('optional_string', _("optional"))
js += "$('#%s').DefaultValue('optional','%s');" %(self.id, optional_string)

if not self._props.get('class'):
self._props['class'] = 'optional'
Expand Down

0 comments on commit 79e9d2f

Please sign in to comment.