pandorafms/pandora_console/views/dashboard/configurationWidgets.php

68 lines
2.1 KiB
PHP
Raw Normal View History

2020-03-26 12:29:38 +01:00
<?php
/**
* Dashboards View List Table Pandora FMS Console
*
* @category Console Class
* @package Pandora FMS
* @subpackage Dashboards
* @version 1.0.0
* @license See below
*
* ______ ___ _______ _______ ________
2023-06-08 12:42:10 +02:00
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
2020-03-26 12:29:38 +01:00
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
*
* ============================================================================
2023-06-08 11:53:13 +02:00
* Copyright (c) 2005-2023 Pandora FMS
2023-06-08 13:19:01 +02:00
* Please see https://pandorafms.com/community/ for full contribution list
2020-03-26 12:29:38 +01:00
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation for version 2.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* ============================================================================
*/
// Includes.
require_once $config['homedir'].'/include/class/HTML.class.php';
2023-10-10 16:35:36 +02:00
ui_require_javascript_file('tinymce', 'vendor/tinymce/tinymce/', true);
ui_require_javascript_file('pandora', 'include/javascript/', true);
2020-03-26 12:29:38 +01:00
$output = '';
$form = [
'action' => '#',
'method' => 'POST',
'id' => 'form-config-widget',
'onsubmit' => 'return false;',
'class' => 'modal-dashboard',
'enctype' => 'multipart/form-data',
'extra' => 'novalidate',
];
2023-10-10 16:35:36 +02:00
$js = 'tinymce.init({
selector: "#textarea_text",
plugins: "preview, searchreplace, table, nonbreaking, link, image",
promotion: false,
branding: false,
setup: function (editor) {
editor.on("change", function () {
tinymce.triggerSave();
})
}
});';
HTML::printForm(
2020-03-26 12:29:38 +01:00
[
'form' => $form,
'blocks' => $blocks,
2020-03-26 12:29:38 +01:00
'inputs' => $htmlInputs,
'js' => $js,
2020-03-26 12:29:38 +01:00
]
);
echo $output;