mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 15:14:58 +00:00
- added method printAttributeEditField()
This commit is contained in:
parent
694b0c598e
commit
b726a20ed9
|
@ -598,6 +598,23 @@ class UI {
|
||||||
print " <input type=\"Button\" value=\"".getMLText("category")."...\" onclick=\"chooseCategory".$formName."();\">";
|
print " <input type=\"Button\" value=\"".getMLText("category")."...\" onclick=\"chooseCategory".$formName."();\">";
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
|
function printAttributeEditField($attrdef, $objvalue, $fieldname='attributes') { /* {{{ */
|
||||||
|
if($valueset = $attrdef->getValueSetAsArray()) {
|
||||||
|
echo "<select name=\"".$fieldname."[".$attrdef->getId()."]\">";
|
||||||
|
if($attrdef->getMinValues() < 1) {
|
||||||
|
echo "<option value=\"\"></option>";
|
||||||
|
}
|
||||||
|
foreach($valueset as $value) {
|
||||||
|
echo "<option value=\"".htmlspecialchars($value)."\"";
|
||||||
|
if($value == $objvalue)
|
||||||
|
echo " selected";
|
||||||
|
echo ">".$value."</option>";
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
echo "<input type=\"text\" name=\"".$fieldname."[".$attrdef->getId()."]\" value=\"".htmlspecialchars($objvalue)."\" />";
|
||||||
|
}
|
||||||
|
} /* }}} */
|
||||||
|
|
||||||
function getImgPath($img) { /* {{{ */
|
function getImgPath($img) { /* {{{ */
|
||||||
global $theme;
|
global $theme;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user