Commit 032a217586ad23762b9b006626f28f881601bd3c
1 parent
353cd17c
unified form for text_area control
Showing
1 changed file
with
16 additions
and
5 deletions
Show diff stats
calexium_lib/web/CXM_making_a_web_site.anubis
| ... | ... | @@ -994,7 +994,7 @@ public type HTML_In_Form: |
| 994 | 994 | text_input (List(InputAttrs), String label_text, HtmlId id, WebArgName name, InitialValue init, Int32 width), |
| 995 | 995 | text_input_ro (List(InputAttrs), String label_text, HtmlId id, WebArgName name, InitialValue init, Int32 width), |
| 996 | 996 | password_input (List(InputAttrs), String label_text, HtmlId id, WebArgName name, InitialValue init, Int32 width), |
| 997 | - text_area (List(TextAreaOption), WebArgName name, InitialValue init, Int32 width, Int32 height), | |
| 997 | + text_area (List(TextAreaOption), String label_text, HtmlId id, WebArgName name, InitialValue init, Int32 width, Int32 height), | |
| 998 | 998 | file_upload (String label, HtmlId id, WebArgName name, Int32 width), |
| 999 | 999 | selector (List(InputAttrs), String label_text, HtmlId id, WebArgName name, Int32 size, List(String) choices), |
| 1000 | 1000 | selector (List(InputAttrs), String label_text, HtmlId id, WebArgName name, Int32 size, List(String) choices, InitialValue selected), |
| ... | ... | @@ -1055,9 +1055,20 @@ public define HTML_In_Form |
| 1055 | 1055 | Int32 width, |
| 1056 | 1056 | Int32 height |
| 1057 | 1057 | ) = |
| 1058 | - text_area([],name,init,width,height). | |
| 1058 | + text_area([], "", htmlId(""), name,init,width,height). | |
| 1059 | 1059 | |
| 1060 | 1060 | public define HTML_In_Form |
| 1061 | + text_area | |
| 1062 | + ( | |
| 1063 | + List(TextAreaOption) options, | |
| 1064 | + WebArgName name, | |
| 1065 | + InitialValue init, | |
| 1066 | + Int32 width, | |
| 1067 | + Int32 height | |
| 1068 | + ) = | |
| 1069 | + text_area(options, "", htmlId(""), name,init,width,height). | |
| 1070 | + | |
| 1071 | +public define HTML_In_Form | |
| 1061 | 1072 | table |
| 1062 | 1073 | ( |
| 1063 | 1074 | List(HTML_Row(HTML_In_Form)) rows |
| ... | ... | @@ -3720,8 +3731,8 @@ define Printable_tree |
| 3720 | 3731 | password_input(options, label_text, id, name,i,w) then |
| 3721 | 3732 | [ maybe_label(label_text, id), |
| 3722 | 3733 | "<input type=\"password\" name=\"p",name,"\" id=\"",id,"\" size=\"",w,"\" value=\"",i,"\"",format_attrs(options)," />"], |
| 3723 | - text_area(opts,n,i,w,h) then | |
| 3724 | - ["<textarea ",format(opts)," name=\"o",n,"\" cols=\"",w,"\" rows=\"",h,"\">",i,"</textarea>"], | |
| 3734 | + text_area(opts,label_text, id, n,i,w,h) then | |
| 3735 | + [ maybe_label(label_text, id), "<textarea ",format(opts)," id=\"",id,"\" name=\"o",n,"\" cols=\"",w,"\" rows=\"",h,"\">",i,"</textarea>"], | |
| 3725 | 3736 | file_upload(label, id, n, w) then |
| 3726 | 3737 | [ maybe_label(label, id), |
| 3727 | 3738 | "<input type=\"file\" id=\"",id,"\" size=\"",w,"\" name=\"o",n,"\" />"], |
| ... | ... | @@ -3823,7 +3834,7 @@ define Bool |
| 3823 | 3834 | text_input(o,lt,l,n,i,w) then false, |
| 3824 | 3835 | text_input_ro(o,lt,l,n,i,w) then false, |
| 3825 | 3836 | password_input(o,lt,l,n,i,w) then false, |
| 3826 | - text_area(o,n,i,w,h) then false, | |
| 3837 | + text_area(o,lt,id,n,i,w,h) then false, | |
| 3827 | 3838 | file_upload(l,i,n,w) then true, |
| 3828 | 3839 | selector(o,l,i,n,s,c) then false, |
| 3829 | 3840 | selector(o,l,i,n,s,c,p) then false, | ... | ... |