First working checkbox list

This commit is contained in:
YNH Webdev
2013-09-06 14:22:23 +02:00
parent 0fcb80aa29
commit 9f40c6355c
7 changed files with 117 additions and 14 deletions

View File

@@ -16,10 +16,11 @@ create
feature {NONE}
make_checkbox (n: STRING; l: STRING)
make_checkbox (n: STRING; l: STRING; c: STRING)
do
make (n, "input")
label := l
checked_value := c
end
feature {WSF_PAGE_CONTROL, WSF_CONTROL} -- STATE MANAGEMENT
@@ -67,7 +68,7 @@ feature -- Implementation
if checked then
attributes := attributes + " checked"
end
Result := render_tag ("", attributes)
Result := render_tag_with_tagname ("div",render_tag_with_tagname ("label", render_tag ("", attributes) + " " + label, "",""), "","checkbox")
end
value: BOOLEAN
@@ -81,6 +82,8 @@ feature
checked: BOOLEAN
checked_value: STRING
change_event: detachable PROCEDURE [ANY, TUPLE []]
end