Skip to content

Commit

Permalink
Merge pull request nitrogen#11 from lorantkurthy/master
Browse files Browse the repository at this point in the history
inplace_textbox validators working
  • Loading branch information
choptastic committed Sep 21, 2011
2 parents 7526a08 + 7c2f3ee commit b73fc46
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/elements/forms/element_inplace_textbox.erl
Expand Up @@ -48,8 +48,8 @@ render_element(Record) ->
]},
#panel { id=EditPanelID, class="edit", body=[
#textbox { id=TextBoxID, text=Text, next=OKButtonID },
#button { id=OKButtonID, text="OK", actions=OKEvent#event { type=click } },
#button { id=CancelButtonID, text="Cancel", actions=CancelEvent#event { type=click } }
#button { id=OKButtonID, text="OK" },
#button { id=CancelButtonID, text="Cancel" }
]}
]
},
Expand All @@ -62,6 +62,9 @@ render_element(Record) ->
wf:wire(TextBoxID, Script)
end,

wf:wire(CancelButtonID, CancelEvent#event { type=click }),
wf:wire(OKButtonID, OKEvent#event { type=click }),

wf:wire(OKButtonID, TextBoxID, #validate { attach_to=CancelButtonID, validators=Record#inplace_textbox.validators }),

element_panel:render_element(Terms).
Expand Down

0 comments on commit b73fc46

Please sign in to comment.