id.'_id").value = id;'; $script[] = ' document.getElementById("'.$this->id.'_name").value = venue;'; // $script[] = ' SqueezeBox.close();'; $script[] = ' $("#venue-modal").modal("hide");'; $script[] = ' }'; // Add the script to the document head. Factory::getApplication()->getDocument()->getWebAssetManager()->addInlineScript(implode("\n", $script)); // Setup variables for display. $html = array(); $link = 'index.php?option=com_jem&view=venueelement&tmpl=component&object='.$this->id; $db = Factory::getContainer()->get('DatabaseDriver'); $db->setQuery( 'SELECT venue' . ' FROM #__jem_venues' . ' WHERE id = '.(int) $this->value ); try { $title = $db->loadResult(); } catch (RuntimeException $e) { Factory::getApplication()->enqueueMessage($e->getMessage(), 'warning'); } if (empty($title)) { $title = Text::_('COM_JEM_SELECT_VENUE'); } $title = htmlspecialchars($title, ENT_QUOTES, 'UTF-8'); // The current user display field. $html[] = '