Commit ab34431b42bf5511e6f326ef38e9c38bd4564bb5

Authored by Cédric RICARD
1 parent 34711e56

Label are now optional for text input fields

Showing 1 changed file with 3 additions and 3 deletions   Show diff stats
calexium_lib/web/CXM_making_a_web_site.anubis
@@ -3758,13 +3758,13 @@ define Printable_tree @@ -3758,13 +3758,13 @@ define Printable_tree
3758 private_download(url,name,extra,action) then 3758 private_download(url,name,extra,action) then
3759 format(cinfo,sn,ic_v,any_private_download(url,name,extra,action),format_element,is_https), 3759 format(cinfo,sn,ic_v,any_private_download(url,name,extra,action),format_element,is_https),
3760 text_input(options, label_text, id, name, i, w) then 3760 text_input(options, label_text, id, name, i, w) then
3761 - [ "<label for=\"",id,"\">",label_text,"</label>", 3761 + [if length(label_text) > 0 then ["<label for=\"",id,"\">",label_text,"</label>"] else [],
3762 "<input type=\"text\" name=\"o",name,"\" id=\"",id,"\" size=\"",w,"\" value=\"",i,"\"",format_attrs(options)," />"], 3762 "<input type=\"text\" name=\"o",name,"\" id=\"",id,"\" size=\"",w,"\" value=\"",i,"\"",format_attrs(options)," />"],
3763 text_input_ro(options, label_text, id, name,i,w) then 3763 text_input_ro(options, label_text, id, name,i,w) then
3764 - [ "<label for=\"",id,"\">",label_text,"</label>", 3764 + [if length(label_text) > 0 then ["<label for=\"",id,"\">",label_text,"</label>"] else [],
3765 "<input readonly=\"readonly\" type=\"text\" name=\"o",name,"\" id=\"",id,"\" size=\"",w,"\" value=\"",i,"\"",format_attrs(options)," />"], 3765 "<input readonly=\"readonly\" type=\"text\" name=\"o",name,"\" id=\"",id,"\" size=\"",w,"\" value=\"",i,"\"",format_attrs(options)," />"],
3766 password_input(options, label_text, id, name,i,w) then 3766 password_input(options, label_text, id, name,i,w) then
3767 - [ "<label for=\"",id,"\">",label_text,"</label>", 3767 + [if length(label_text) > 0 then ["<label for=\"",id,"\">",label_text,"</label>"] else [],
3768 "<input type=\"password\" name=\"p",name,"\" id=\"",id,"\" size=\"",w,"\" value=\"",i,"\"",format_attrs(options)," />"], 3768 "<input type=\"password\" name=\"p",name,"\" id=\"",id,"\" size=\"",w,"\" value=\"",i,"\"",format_attrs(options)," />"],
3769 text_area(opts,n,i,w,h) then 3769 text_area(opts,n,i,w,h) then
3770 ["<textarea ",format(opts)," name=\"o",n,"\" cols=\"",w,"\" rows=\"",h,"\">",i,"</textarea>"], 3770 ["<textarea ",format(opts)," name=\"o",n,"\" cols=\"",w,"\" rows=\"",h,"\">",i,"</textarea>"],