Commit 6fbf99a45c625ddb0890fe9a8b2da1b6126b811e
1 parent
db8202cc
Right label version of Check boxes and Radio buttons
Showing
1 changed file
with
10 additions
and
0 deletions
Show diff stats
calexium_lib/web/CXM_making_a_web_site.anubis
| ... | ... | @@ -892,7 +892,9 @@ public type HTML_In_Form: |
| 892 | 892 | selector_c (String name, Int32 size, List((String,String)) choices), |
| 893 | 893 | selector_c (String name, Int32 size, List((String,String)) choices, String selected), |
| 894 | 894 | radio_button (String label_text, String label, String name, String value, Bool checked), |
| 895 | + radio_button_r (String label_text, String label, String name, String value, Bool checked), | |
| 895 | 896 | check_box (String label_text, String label, String name, Bool checked), |
| 897 | + check_box_r (String label_text, String label, String name, Bool checked), | |
| 896 | 898 | div (List(DIV_Option), HTML_In_Form content), |
| 897 | 899 | div_empty (List(DIV_Option)), |
| 898 | 900 | hidden (String name, String value). |
| ... | ... | @@ -3527,9 +3529,15 @@ define Printable_tree |
| 3527 | 3529 | radio_button(label_text,label,n,v,c) then |
| 3528 | 3530 | [ "<label for=\"",label,"\">",label_text,"</label>", |
| 3529 | 3531 | "<input type=radio name=o",n," id=",label," value=\"",v,"\"",(if c then " checked" else ""),">"], |
| 3532 | + radio_button_r(label_text,label,n,v,c) then | |
| 3533 | + [ "<input type=radio name=o",n," id=",label," value=\"",v,"\"",(if c then " checked" else ""),">", | |
| 3534 | + "<label for=\"",label,"\">",label_text,"</label>"], | |
| 3530 | 3535 | check_box(label_text, label,n,c) then |
| 3531 | 3536 | [ if length(label_text) > 0 then "<label for=\""+label+"\">"+label_text+"</label>" else "", |
| 3532 | 3537 | "<input type=checkbox name=o",n," id=\"",label,"\""+(if c then " checked " else ""),">"] |
| 3538 | + check_box_r(label_text, label,n,c) then | |
| 3539 | + [ "<input type=checkbox name=o",n," id=\"",label,"\""+(if c then " checked " else ""),">", | |
| 3540 | + if length(label_text) > 0 then "<label for=\""+label+"\">"+label_text+"</label>" else "" ] | |
| 3533 | 3541 | div(options, e) then |
| 3534 | 3542 | format(cinfo,sn,ic_v,any_div(options, e),format_element,is_https), |
| 3535 | 3543 | div_empty(options) then |
| ... | ... | @@ -3597,7 +3605,9 @@ define Bool |
| 3597 | 3605 | selector_c(n,s,c) then false, |
| 3598 | 3606 | selector_c(n,s,c,p) then false, |
| 3599 | 3607 | radio_button(_,_,n,v,c) then false, |
| 3608 | + radio_button_r(_,_,n,v,c) then false, | |
| 3600 | 3609 | check_box(_,_,n,c) then false, |
| 3610 | + check_box_r(_,_,n,c) then false, | |
| 3601 | 3611 | div(o,c) then false, |
| 3602 | 3612 | div_empty(o) then false, |
| 3603 | 3613 | hidden(_,_) then false | ... | ... |