@@ -34,6 +34,10 @@ protected function getInput() {
3434 $ script [] = ' document.getElementById(" ' .$ this ->id .'_name").value = name+", "+firstname+", "+address+", "+city; ' ;
3535 $ script [] = ' SqueezeBox.close(); ' ;
3636 $ script [] = ' } ' ;
37+ $ script [] = ' function jClearPerson_ ' .$ this ->id .'(id) { ' ;
38+ $ script [] = ' document.getElementById(" ' .$ this ->id .'_id").value = ""; ' ;
39+ $ script [] = ' document.getElementById(" ' .$ this ->id .'_name").value = ""; ' ;
40+ $ script [] = ' } ' ;
3741 // Add the script to the document head.
3842 JFactory::getDocument ()->addScriptDeclaration (implode ("\n" , $ script ));
3943 // Setup variables for display.
@@ -71,7 +75,12 @@ protected function getInput() {
7175 // The current article display field.
7276 $ html [] = '<span class="input-append"> ' ;
7377 $ html [] = '<input type="text" class="input-medium" id=" ' .$ this ->id .'_name" value=" ' .$ fullname .'" disabled="disabled" size="35" /> ' ;
74- $ html [] = '<a class="modal btn hasTooltip" title=" ' .JHtml::tooltipText ('COM_CLUBMANAGEMENT_CHANGE_PERSON ' ).'" href=" ' .$ link .'& ' .JSession::getFormToken ().'=1" rel="{handler: \'iframe \', size: {x: 800, y: 450}}"><i class="icon-file"></i> ' .JText::_ ('JSELECT ' ).'</a> ' ;
78+ if (isset ($ this ->element ['select ' ]) && ($ this ->element ['select ' ] == 'true ' )) {
79+ $ html [] = '<a class="modal btn hasTooltip" title=" ' .JHtml::tooltipText ('COM_CLUBMANAGEMENT_CHANGE_PERSON ' ).'" href=" ' .$ link .'& ' .JSession::getFormToken ().'=1" rel="{handler: \'iframe \', size: {x: 800, y: 450}}"><i class="icon-file"></i> ' .JText::_ ('JSELECT ' ).'</a> ' ;
80+ }
81+ if (isset ($ this ->element ['clear ' ]) && ($ this ->element ['clear ' ] == 'true ' )) {
82+ $ html [] = '<button type="button" class="btn" id=" ' . $ this ->id . '_clear" onclick="window.jClearPerson_ ' . $ this ->id . '( \'' . $ this ->id . '\'); return false;"><span class="icon-remove" aria-hidden="true"></span> ' . JText::_ ('JCLEAR ' ).'</button> ' ;
83+ }
7584 $ html [] = '</span> ' ;
7685 // class='required' for client side validation
7786 $ class = '' ;
0 commit comments