1
0
mirror of https://github.com/postfixadmin/postfixadmin.git synced 2025-11-26 11:23:04 +03:00

fetchmail.php:

- change edit form to XHTML
  (and BTW: the whole form is produced by fetchmail_edit_row() and 
  handed over to smarty in a single variable. Should be converted to
  a generic "edit form" smarty template...)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@871 a1433add-5e2c-0410-b055-b7f2511e0802
This commit is contained in:
Christian Boltz
2010-09-29 20:41:52 +00:00
parent d404b8e531
commit 06d65a32b3

View File

@@ -313,24 +313,24 @@ function fetchmail_edit_row($data=array())
} }
function _edit_text($id,$key,$def_vals,$val=""){ function _edit_text($id,$key,$def_vals,$val=""){
$val=htmlspecialchars($val); $val=htmlspecialchars($val);
return "<input type=text name=${key} id=${id} value='${val}'>"; return "<input type=text name=${key} id=${id} value='${val}' />";
} }
function _edit_password($id,$key,$def_vals,$val=""){ function _edit_password($id,$key,$def_vals,$val=""){
$val=preg_replace("{.}","*",$val); $val=preg_replace("{.}","*",$val);
return "<input type=password name=${key} id=${id} value='${val}'>"; return "<input type=password name=${key} id=${id} value='${val}' />";
} }
function _edit_num($id,$key,$def_vals,$val=""){ function _edit_num($id,$key,$def_vals,$val=""){
$val=(int)($val); $val=(int)($val);
return "<input type=text name=${key} id=${id} value='${val}'>"; return "<input type=text name=${key} id=${id} value='${val}' />";
} }
function _edit_bool($id,$key,$def_vals,$val=""){ function _edit_bool($id,$key,$def_vals,$val=""){
$ret="<input type=checkbox name=${key} id=${id}"; $ret="<input type=checkbox name=${key} id=${id}";
if ($val) if ($val)
$ret.=" checked"; $ret.=' checked="checked"';
$ret.=">"; $ret.=" />";
return $ret; return $ret;
} }