diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php
index fb432cdf3a..5d31750156 100644
--- a/pandora_console/include/functions_ui.php
+++ b/pandora_console/include/functions_ui.php
@@ -1077,14 +1077,22 @@ function ui_require_css_file ($name, $path = 'include/styles/') {
* ui_require_javascript_file ('pandora');
* // Would include include/javascript/pandora.js
*
+ * @param bool Just echo the script tag of the file.
*
* @return bool True if the file was added. False if the file doesn't exist.
*/
-function ui_require_javascript_file ($name, $path = 'include/javascript/') {
+function ui_require_javascript_file ($name, $path = 'include/javascript/', $echo_tag = false) {
global $config;
$filename = $path . $name . '.js';
+ if ($echo_tag) {
+ echo '';
+ return;
+ }
+
if (! isset ($config['js']))
$config['js'] = array ();
@@ -1163,14 +1171,22 @@ function ui_require_javascript_file_enterprise($name, $disabled_metaconsole = fa
* ui_require_jquery_file ('form');
* // Would include include/javascript/jquery.form.js
*
+ * @param bool Just echo the script tag of the file.
*
* @return bool True if the file was added. False if the file doesn't exist.
*/
-function ui_require_jquery_file ($name, $path = 'include/javascript/') {
+function ui_require_jquery_file ($name, $path = 'include/javascript/', $echo_tag = false) {
global $config;
$filename = $path.'jquery.'.$name.'.js';
+ if ($echo_tag) {
+ echo '';
+ return;
+ }
+
if (! isset ($config['jquery']))
$config['jquery'] = array ();
if (isset ($config['jquery'][$name]))
@@ -3479,8 +3495,8 @@ function ui_get_error ($error_code) {
return array('title' => $title, 'message' => $message);
}
-function ui_include_time_picker() {
- if (is_ajax ()) {
+function ui_include_time_picker($echo_tags = false) {
+ if (is_ajax () || $echo_tags) {
echo '';