name = JText::_('K2_SELECT_A_USER'); } // Move this to main JS file $js = " function jSelectUser(id, title, object) { document.getElementById('".$name."' + '_id').value = id; document.getElementById('".$name."' + '_name').value = title; if(typeof(window.parent.SqueezeBox.close=='function')){ window.parent.SqueezeBox.close(); } else { document.getElementById('sbox-window').close(); } } "; $doc->addScriptDeclaration($js); $link = 'index.php?option=com_k2&view=users&task=element&tmpl=component&object='.$name; JHTML::_('behavior.modal', 'a.modal'); if (K2_JVERSION == '30') { $html = ' '.JText::_('K2_SELECT').' '; } else { $html = '
'.JText::_('K2_SELECT').'
'; } return $html; } } class JFormFieldK2User extends K2ElementK2User { var $type = 'k2user'; } class JElementK2User extends K2ElementK2User { var $_name = 'k2user'; }