mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 15:14:58 +00:00
add postfix for name of attribute in getAttributeEditField()
This commit is contained in:
parent
1bcae7a93b
commit
5729944384
|
@ -1555,11 +1555,11 @@ $(document).ready(function() {
|
|||
}
|
||||
} /* }}} */
|
||||
|
||||
function printAttributeEditField($attrdef, $attribute, $fieldname='attributes', $norequire=false) { /* {{{ */
|
||||
echo self::getAttributeEditField($attrdef, $attribute, $fieldname, $norequire);
|
||||
function printAttributeEditField($attrdef, $attribute, $fieldname='attributes', $norequire=false, $namepostfix='') { /* {{{ */
|
||||
echo self::getAttributeEditField($attrdef, $attribute, $fieldname, $norequire, $namepostfix);
|
||||
} /* }}} */
|
||||
|
||||
function getAttributeEditField($attrdef, $attribute, $fieldname='attributes', $norequire=false) { /* {{{ */
|
||||
function getAttributeEditField($attrdef, $attribute, $fieldname='attributes', $norequire=false, $namepostfix='') { /* {{{ */
|
||||
$dms = $this->params['dms'];
|
||||
$content = '';
|
||||
switch($attrdef->getType()) {
|
||||
|
@ -1572,7 +1572,7 @@ $(document).ready(function() {
|
|||
$objvalue = $attribute ? (is_object($attribute) ? $attribute->getValue() : $attribute) : '';
|
||||
$dateformat = getConvertDateFormat($this->params['settings']->_dateformat);
|
||||
$content .= '<span class="input-append date datepicker" data-date="'.getReadableDate().'" data-date-format="'.$dateformat.'" data-date-language="'.str_replace('_', '-', $this->params['session']->getLanguage()).'">
|
||||
<input id="'.$fieldname.'_'.$attrdef->getId().'" class="span9" size="16" name="'.$fieldname.'['.$attrdef->getId().']" type="text" value="'.($objvalue ? $objvalue : '').'">
|
||||
<input id="'.$fieldname.'_'.$attrdef->getId().($namepostfix ? '_'.$namepostfix : '').'" class="span8" size="16" name="'.$fieldname.'['.$attrdef->getId().']'.($namepostfix ? '['.$namepostfix.']' : '').'" type="text" value="'.($objvalue ? $objvalue : '').'">
|
||||
<span class="add-on"><i class="fa fa-calendar"></i></span>
|
||||
</span>';
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue
Block a user