mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-03-12 00:45:34 +00:00
add help to form field, formSubmit can output several buttons
This commit is contained in:
parent
d4ae4eed24
commit
6651601995
|
@ -895,7 +895,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
|
|||
function formField($title, $value, $params=array()) { /* {{{ */
|
||||
if($title !== null) {
|
||||
echo "<div class=\"control-group\">";
|
||||
echo " <label class=\"control-label\">".$title.":</label>";
|
||||
echo " <label class=\"control-label\"".(!empty($params['help']) ? " title=\"".$params['help']."\"" : "").">".$title.":</label>";
|
||||
echo " <div class=\"controls\">";
|
||||
}
|
||||
if(isset($params['field_wrap'][0]))
|
||||
|
@ -962,7 +962,14 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
|
|||
|
||||
function formSubmit($value, $name='') { /* {{{ */
|
||||
echo "<div class=\"controls\">\n";
|
||||
echo "<button type=\"submit\" class=\"btn btn-primary\"".($name ? ' name="'.$name.'" id="'.$name.'"' : '').">".$value."</button>\n";
|
||||
if(is_string($value)) {
|
||||
echo "<button type=\"submit\" class=\"btn btn-primary\"".($name ? ' name="'.$name.'" id="'.$name.'"' : '').">".$value."</button>\n";
|
||||
} else {
|
||||
if(is_array($value)) {
|
||||
foreach($value as $i=>$v)
|
||||
echo "<button type=\"submit\" class=\"btn btn-primary\"".(!empty($name[$i]) ? ' name="'.$name[$i].'" id="'.$name[$i].'"' : '').">".$v."</button>\n";
|
||||
}
|
||||
}
|
||||
echo "</div>\n";
|
||||
} /* }}} */
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user