Unverified Commit 0aec3964 authored by Cédric Anne's avatar Cédric Anne Committed by GitHub
Browse files

UI refurbish

parent f53299a3
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
"GLPI_AJAX_DASHBOARD", "GLPI_ALLOW_IFRAME_IN_RICH_TEXT", "GLPI_CALDAV_IMPORT_STATE", "GLPI_CACHE_DIR", "GLPI_AJAX_DASHBOARD", "GLPI_ALLOW_IFRAME_IN_RICH_TEXT", "GLPI_CALDAV_IMPORT_STATE", "GLPI_CACHE_DIR",
"GLPI_MARKETPLACE_ALLOW_OVERRIDE", "GLPI_MARKETPLACE_MANUAL_DOWNLOADS", "GLPI_MARKETPLACE_ALLOW_OVERRIDE", "GLPI_MARKETPLACE_MANUAL_DOWNLOADS",
"GLPI_CRON_DIR", "GLPI_CSRF_EXPIRES", "GLPI_CSRF_MAX_TOKENS", "GLPI_DEMO_MODE", "GLPI_CRON_DIR", "GLPI_CSRF_EXPIRES", "GLPI_CSRF_MAX_TOKENS", "GLPI_DEMO_MODE",
"GLPI_DISABLE_ONLY_FULL_GROUP_BY_SQL_MODE", "GLPI_DOC_DIR", "GLPI_DUMP_DIR", "GLPI_FORCE_EMPTY_SQL_MODE", "GLPI_DISABLE_ONLY_FULL_GROUP_BY_SQL_MODE", "GLPI_DOC_DIR", "GLPI_DUMP_DIR",
"GLPI_GRAPH_DIR", "GLPI_IDOR_EXPIRES", "GLPI_INSTALL_MODE", "GLPI_INVENTORY_DIR", "GLPI_LOCAL_I18N_DIR", "GLPI_GRAPH_DIR", "GLPI_IDOR_EXPIRES", "GLPI_INSTALL_MODE", "GLPI_INVENTORY_DIR", "GLPI_LOCAL_I18N_DIR",
"GLPI_LOCK_DIR", "GLPI_LOG_DIR", "GLPI_MARKETPLACE_DIR", "GLPI_MARKETPLACE_PLUGINS_API_URI", "GLPI_LOCK_DIR", "GLPI_LOG_DIR", "GLPI_MARKETPLACE_DIR", "GLPI_MARKETPLACE_PLUGINS_API_URI",
"GLPI_MARKETPLACE_PRERELEASES", "GLPI_NETWORK_REGISTRATION_API_URL", "GLPI_NETWORK_MAIL", "GLPI_MARKETPLACE_PRERELEASES", "GLPI_NETWORK_REGISTRATION_API_URL", "GLPI_NETWORK_MAIL",
......
...@@ -70,6 +70,12 @@ ...@@ -70,6 +70,12 @@
] ]
}, },
"overrides": [ "overrides": [
{
"files": ["js/modules/**"],
"parserOptions": {
"sourceType": "module"
}
},
{ {
"files": ["webpack.config.js"], "files": ["webpack.config.js"],
"env": { "env": {
......
...@@ -22,5 +22,5 @@ vendor/bin/phpcs \ ...@@ -22,5 +22,5 @@ vendor/bin/phpcs \
-p \ -p \
--extensions=php \ --extensions=php \
--standard=vendor/glpi-project/coding-standard/GlpiStandard/ \ --standard=vendor/glpi-project/coding-standard/GlpiStandard/ \
--ignore="/.git/,^$ROOT_DIR/(config|files|lib|marketplace|node_modules|plugins|tests/config|vendor)/" \ --ignore="/.git/,^$ROOT_DIR/(config|files|lib|marketplace|node_modules|plugins|tests/config|tests/files|vendor)/" \
. .
#!/bin/bash -e
echo "Check for syntax errors in templates"
bin/console tools:check_twig_templates_syntax
echo "Check for CS violations in templates"
vendor/bin/twigcs --ruleset=Glpi\\Tools\\GlpiTwigRuleset templates/
...@@ -80,6 +80,9 @@ jobs: ...@@ -80,6 +80,9 @@ jobs:
- name: "PHP lint" - name: "PHP lint"
run: | run: |
docker-compose exec -T app .github/actions/lint_php-lint.sh docker-compose exec -T app .github/actions/lint_php-lint.sh
- name: "Twig lint"
run: |
docker-compose exec -T app .github/actions/lint_twig-lint.sh
- name: "JS lint" - name: "JS lint"
run: | run: |
docker-compose exec -T app .github/actions/lint_js-lint.sh docker-compose exec -T app .github/actions/lint_js-lint.sh
......
...@@ -32,6 +32,7 @@ phpunit.xml ...@@ -32,6 +32,7 @@ phpunit.xml
/**/*.min.css /**/*.min.css
/css_compiled/ /css_compiled/
/css/compiled/ /css/compiled/
/css/lib/
/**/*.min.js /**/*.min.js
/node_modules/ /node_modules/
.package.hash .package.hash
......
...@@ -11,17 +11,21 @@ The present file will list all changes made to the project; according to the ...@@ -11,17 +11,21 @@ The present file will list all changes made to the project; according to the
### Changed ### Changed
- APCu and WinCache are not anymore use by GLPI, use `php bin/console cache:configure` command to configure cache system. - APCu and WinCache are not anymore use by GLPI, use `php bin/console cache:configure` command to configure cache system.
- PDF export library has been changed from `TCPDF` to `mPDF`. - PDF export library has been changed from `TCPDF` to `mPDF`.
- The search engine and search results page now support sorting by multiple fields.
- The search result lists now refresh/update without triggering a full page reload.
### Deprecated ### Deprecated
- Usage of XML-RPC API is deprecated. - Usage of XML-RPC API is deprecated.
### Removed ### Removed
- Autocomplete feature on text fields.
- Usage of alternative DB connection encoding (`DB::$dbenc` property). - Usage of alternative DB connection encoding (`DB::$dbenc` property).
### API changes ### API changes
#### Added #### Added
- Added `DBMysql::setSavepoint` to create savepoints within a transaction. - Added `DBMysql::setSavepoint` to create savepoints within a transaction.
- Added `CommonDBTM::showForm` to have a generic showForm for asset (based on a twig template).
#### Changes #### Changes
- Format of `Message-Id` header sent in Tickets notifications changed to match format used by other items. - Format of `Message-Id` header sent in Tickets notifications changed to match format used by other items.
...@@ -36,45 +40,81 @@ The present file will list all changes made to the project; according to the ...@@ -36,45 +40,81 @@ The present file will list all changes made to the project; according to the
- Field `date_creation` of PrinterLog has been renamed to `date`. - Field `date_creation` of PrinterLog has been renamed to `date`.
- Field `date` of ProjectTask has been renamed to `date_creation`. - Field `date` of ProjectTask has been renamed to `date_creation`.
- Table `glpi_netpoints` has been renamed to `glpi_sockets`. - Table `glpi_netpoints` has been renamed to `glpi_sockets`.
- `DBMysql::rollBack` supports a `name` parameter for rolling back to a savepoint. - `GLPI_FORCE_EMPTY_SQL_MODE` constant has been removed in favor of `GLPI_DISABLE_ONLY_FULL_GROUP_BY_SQL_MODE` usage.
- `CommonDBTM::clone()`, `CommonDBTM::prepareInputForClone()` and `CommonDBTM::post_clone()` has been removed. Clonable objects must now use `Glpi\Features\Clonable` trait.
- `CommonDBTM::notificationqueueonaction` property has been removed in favor of `CommonDBTM::deduplicate_queued_notifications` property.
- `CommonDropdown::displaySpecificTypeField()` has a new `$options` parameter. - `CommonDropdown::displaySpecificTypeField()` has a new `$options` parameter.
- `DBMysql::rollBack` supports a `name` parameter for rolling back to a savepoint.
- `NetworkPortInstantiation::showNetpointField()` has been renamed to `NetworkPortInstantiation::showSocketField()`. - `NetworkPortInstantiation::showNetpointField()` has been renamed to `NetworkPortInstantiation::showSocketField()`.
- `NotificationSettingConfig::showForm()` renamed to `NotificationSettingConfig::showConfigForm()`.
- `RuleMatchedLog::showForm()` renamed to `RuleMatchedLog::showItemForm()`.
- `Search::addOrderBy()` signature changed.
- `TicketSatisfaction::showForm()` renamed to `TicketSatisfaction::showSatisfactionForm()`.
- `Transfer::transferDropdownNetpoint()` has been renamed to `Transfer::transferDropdownSocket()`. - `Transfer::transferDropdownNetpoint()` has been renamed to `Transfer::transferDropdownSocket()`.
#### Deprecated #### Deprecated
- Usage of `GLPI_FORCE_EMPTY_SQL_MODE` constant
- Usage of `CommonDBTM::notificationqueueonaction` property
- Usage of `NotificationTarget::html_tags` property
- `Netpoint` has been deprecated and replaced by `Socket` - `Netpoint` has been deprecated and replaced by `Socket`
- `DBmysql::getTableSchema()`
- `Calendar::duplicate()`
- `CommonDBTM::clone()`
- `CommonDBTM::prepareInputForClone()`
- `CommonDBTM::post_clone()`
- `Config::getCache()`
- `Html::clean()` - `Html::clean()`
- `Html::setSimpleTextContent()`
- `Html::setRichTextContent()`
- `Html::weblink_extract()`
- `RuleImportComputer` class - `RuleImportComputer` class
- `RuleImportComputerCollection` class - `RuleImportComputerCollection` class
- `Toolbox::clean_cross_side_scripting_deep()` - `Toolbox::clean_cross_side_scripting_deep()`
- `Toolbox::doubleEncodeEmails()`
- `Toolbox::getHtmlToDisplay()` - `Toolbox::getHtmlToDisplay()`
- `Toolbox::useCache()`
- `Toolbox::unclean_cross_side_scripting_deep()` - `Toolbox::unclean_cross_side_scripting_deep()`
- `Toolbox::unclean_html_cross_side_scripting_deep()`
- `Toolbox::sanitize()`
#### Removed #### Removed
- `Update::declareOldItems()` - jQueryUI has been partially removed and remaining widgets will be removed in a near future.
- Usage of `$order` parameter in `getAllDataFromTable()` (`DbUtils::getAllDataFromTable()`) - Usage of `$order` parameter in `getAllDataFromTable()` (`DbUtils::getAllDataFromTable()`)
- Usage of `table` parameter in requests made to `ajax/comments.php`
- Usage of `GLPI_FORCE_EMPTY_SQL_MODE` constant
- Support of `doc_types`, `helpdesk_types` and `netport_types` keys in `Plugin::registerClass()`
- `$CFG_GLPI['layout_excluded_pages']` entry
- `$CFG_GLPI['use_ajax_autocompletion']` entry
- `$LOADED_PLUGINS` global variable - `$LOADED_PLUGINS` global variable
- `Computer_SoftwareLicense` class - `CommonDBTM::notificationqueueonaction` property
- `Computer_SoftwareVersion` class - `NotificationTarget::html_tags` property
- `getAllDatasFromTable()` - `getAllDatasFromTable()`
- `getRealQueryForTreeItem()` - `getRealQueryForTreeItem()`
- `Ajax::createFixedModalWindow()`
- `Ajax::createSlidePanel()`
- `Calendar_Holiday::cloneCalendar()`
- `Calendar::duplicate()`
- `CalendarSegment::cloneCalendar()`
- `Change::getCommonLeftJoin()`
- `Change::getCommonSelect()`
- `Change::showAnalysisForm()`
- `Change::showPlanForm()`
- `CommonDBTM::clone()`
- `CommonDBTM::getRawName()`
- `CommonDBTM::prepareInputForClone()`
- `CommonDBTM::post_clone()`
- `CommonDBTM::showDates()`
- `CommonGLPI::isLayoutExcludedPage()`
- `CommonGLPI::isLayoutWithMain()`
- `CommonGLPI::showPrimaryForm()`
- `CommonITILObject::displayHiddenItemsIdInput()`
- `CommonITILObject::filterTimeline()`
- `CommonITILObject::getActorIcon()`
- `CommonITILObject::getSplittedSubmitButtonHtml()`
- `CommonITILObject::showActorsPartForm()`
- `CommonITILObject::showFormHeader()`
- `CommonITILObject::showGroupsAssociated()`
- `CommonITILObject::showSupplierAddFormOnCreate()`
- `CommonITILObject::showSuppliersAssociated()`
- `CommonITILObject::showTimeline()`
- `CommonITILObject::showTimelineForm()`
- `CommonITILObject::showTimelineHeader()`
- `CommonITILObject::showUsersAssociated()`
- `Computer_Item::cloneComputer()`
- `Computer_Item::cloneItem()`
- `Computer_SoftwareLicense` class
- `Computer_SoftwareVersion` class
- `ComputerAntivirus::cloneComputer()`
- `Contract::cloneItem()`
- `Contract_Item::cloneItem()`
- `ContractCost::cloneContract()`
- `Config::checkWriteAccessToDirs()`
- `Config::displayCheckExtensions()`
- `Config::getCache()`
- `DBMysql::affected_rows()` - `DBMysql::affected_rows()`
- `DBMysql::data_seek()` - `DBMysql::data_seek()`
- `DBMysql::fetch_array()` - `DBMysql::fetch_array()`
...@@ -83,30 +123,38 @@ The present file will list all changes made to the project; according to the ...@@ -83,30 +123,38 @@ The present file will list all changes made to the project; according to the
- `DBMysql::fetch_row()` - `DBMysql::fetch_row()`
- `DBMysql::field_name()` - `DBMysql::field_name()`
- `DBMysql::free_result()` - `DBMysql::free_result()`
- `DBmysql::getTableSchema()`
- `DBMysql::insert_id()` - `DBMysql::insert_id()`
- `DBMysql::isMySQLStrictMode()` - `DBMysql::isMySQLStrictMode()`
- `DBMysql::list_fields()` - `DBMysql::list_fields()`
- `DBMysql::num_fields()` - `DBMysql::num_fields()`
- `DbUtils::getRealQueryForTreeItem()` - `DbUtils::getRealQueryForTreeItem()`
- `Dropdown::getDropdownNetpoint()` - `Dropdown::getDropdownNetpoint()`
- `Calendar_Holiday::cloneCalendar()` - `DCBreadcrumb::showDcBreadcrumb()`
- `CalendarSegment::cloneCalendar()`
- `Change::getCommonLeftJoin()`
- `Change::getCommonSelect()`
- `CommonDBTM::getRawName()`
- `Computer_Item::cloneComputer()`
- `Computer_Item::cloneItem()`
- `ComputerAntivirus::cloneComputer()`
- `Config::checkWriteAccessToDirs()`
- `Config::displayCheckExtensions()`
- `Contract::cloneItem()`
- `ContractCost::cloneContract()`
- `Contract_Item::cloneItem()`
- `Document_Item::cloneItem()` - `Document_Item::cloneItem()`
- `Entity::showSelector()`
- `Html::autocompletionTextField()`
- `Html::displayImpersonateBanner()`
- `Html::displayMainMenu()`
- `Html::displayMenuAll()`
- `Html::displayTopMenu()`
- `Html::fileForRichText()`
- `Html::generateImageName()`
- `Html::jsDisable()` - `Html::jsDisable()`
- `Html::jsEnable()` - `Html::jsEnable()`
- `Html::nl2br_deep()`
- `Html::resume_name()`
- `Html::setSimpleTextContent()`
- `Html::setRichTextContent()`
- `Html::showProfileSelecter()`
- `Html::weblink_extract()`
- `Infocom::cloneItem()` - `Infocom::cloneItem()`
- `Itil_Project::cloneItilProject()` - `Itil_Project::cloneItilProject()`
- `ITILFollowup::showApprobationForm()`
- `ITILTemplate::getBeginHiddenFieldText()`
- `ITILTemplate::getBeginHiddenFieldValue()`
- `ITILTemplate::getEndHiddenFieldText()`
- `ITILTemplate::getEndHiddenFieldValue()`
- `Item_Devices::cloneItem()` - `Item_Devices::cloneItem()`
- `Item_Disk::cloneItem()` - `Item_Disk::cloneItem()`
- `Item_OperatingSystem::cloneItem()` - `Item_OperatingSystem::cloneItem()`
...@@ -117,28 +165,43 @@ The present file will list all changes made to the project; according to the ...@@ -117,28 +165,43 @@ The present file will list all changes made to the project; according to the
- `Item_SoftwareVersion::showForComputer()` - `Item_SoftwareVersion::showForComputer()`
- `Item_SoftwareVersion::updateDatasForComputer()` - `Item_SoftwareVersion::updateDatasForComputer()`
- `KnowbaseItem_Item::cloneItem()` - `KnowbaseItem_Item::cloneItem()`
- `LevelAgreement::showForTicket()`
- `NetworkPort::cloneItem()` - `NetworkPort::cloneItem()`
- `Notepad::cloneItem()` - `Notepad::cloneItem()`
- `NotificationTargetTicket::isAuthorMailingActivatedForHelpdesk()`
- `Plugin::setLoaded()` - `Plugin::setLoaded()`
- `Plugin::setUnloaded()` - `Plugin::setUnloaded()`
- `Plugin::setUnloadedByName()` - `Plugin::setUnloadedByName()`
- `Problem::getCommonLeftJoin()` - `Problem::getCommonLeftJoin()`
- `Problem::getCommonSelect()` - `Problem::getCommonSelect()`
- `Problem::showAnalysisForm()`
- `ProjectCost::cloneProject()` - `ProjectCost::cloneProject()`
- `ProjectTeam::cloneProjectTask()` - `ProjectTeam::cloneProjectTask()`
- `ProjectTask::cloneProjectTeam()` - `ProjectTask::cloneProjectTeam()`
- `Reservation::displayReservationDay()`
- `Reservation::displayReservationsForAnItem()`
- `Search::isDeletedSwitch()`
- `Ticket::getCommonLeftJoin()` - `Ticket::getCommonLeftJoin()`
- `Ticket::getCommonSelect()` - `Ticket::getCommonSelect()`
- `Ticket::getTicketTemplateToUse()` - `Ticket::getTicketTemplateToUse()`
- `Ticket::showDocumentAddButton()`
- `Ticket_Ticket::displayLinkedTicketsTo()`
- `TicketTemplate::getFromDBWithDatas()` - `TicketTemplate::getFromDBWithDatas()`
- `Toolbox::canUseImapPop()` - `Toolbox::canUseImapPop()`
- `Toolbox::checkSELinux()` - `Toolbox::checkSELinux()`
- `Toolbox::convertImageToTag()`
- `Toolbox::decrypt()`
- `Toolbox::doubleEncodeEmails()`
- `Toolbox::encrypt()`
- `Toolbox::removeHtmlSpecialChars()`
- `Toolbox::sanitize()`
- `Toolbox::unclean_html_cross_side_scripting_deep()`
- `Toolbox::useCache()`
- `Toolbox::userErrorHandlerDebug()` - `Toolbox::userErrorHandlerDebug()`
- `Toolbox::userErrorHandlerNormal()` - `Toolbox::userErrorHandlerNormal()`
- `Transfer::transferComputerSoftwares()` - `Transfer::transferComputerSoftwares()`
- `Update::declareOldItems()`
- `Reservation::displayReservationDay()` - `User::showPersonalInformation()`
- `Reservation::displayReservationsForAnItem()`
## [9.5.6] unreleased ## [9.5.6] unreleased
......
<?php
/**
* ---------------------------------------------------------------------
* GLPI - Gestionnaire Libre de Parc Informatique
* Copyright (C) 2015-2021 Teclib' and contributors.
*
* http://glpi-project.org
*
* based on GLPI - Gestionnaire Libre de Parc Informatique
* Copyright (C) 2003-2014 by the INDEPNET Development Team.
*
* ---------------------------------------------------------------------
*
* LICENSE
*
* This file is part of GLPI.
*
* GLPI 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; either version 2 of the License, or
* (at your option) any later version.
*
* GLPI 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.
*
* You should have received a copy of the GNU General Public License
* along with GLPI. If not, see <http://www.gnu.org/licenses/>.
* ---------------------------------------------------------------------
*/
$AJAX_INCLUDE = 1;
include ('../inc/includes.php');
Session::checkLoginUser();
switch ($_REQUEST['action']) {
case "getActors":
header("Content-Type: application/json; charset=UTF-8");
Html::header_nocache();
session_write_close(); // don'l lock session to permits parallel calls
echo Dropdown::getDropdownActors($_POST);
break;
}
...@@ -30,65 +30,54 @@ ...@@ -30,65 +30,54 @@
* --------------------------------------------------------------------- * ---------------------------------------------------------------------
*/ */
// Include plugin if it is a plugin table $AJAX_INCLUDE = 1;
if (!strstr($_GET['itemtype'], "Plugin")) {
$AJAX_INCLUDE = 1;
}
include ('../inc/includes.php'); include ('../inc/includes.php');
header("Content-Type: application/json; charset=UTF-8");
// Send UTF8 Headers
header("Content-Type: text/html; charset=UTF-8");
Html::header_nocache(); Html::header_nocache();
Session::checkLoginUser(); Session::checkLoginUser();
// Security if ((!isset($_REQUEST['params']['_idor_token']) || empty($_REQUEST['params']['_idor_token'])) || !isset($_REQUEST['itemtype'])
if (!isset($_GET['itemtype']) || !($item = getItemForItemtype($_GET['itemtype']))) { || !isset($_REQUEST['widget'])) {
exit(); http_response_code(400);
} die();
$item->getEmpty();
$table = $item->getTable();
// Security
if (!isset($item->fields[$_GET['field']]) || !$item->canView()) {
exit();
}
// Security : check whitelist
$field_so = $item->getSearchOptionByField('field', $_GET['field'], $item->getTable());
$can_autocomplete = array_key_exists('autocomplete', $field_so) && $field_so['autocomplete'];
if (!$can_autocomplete) {
exit();
} }
$entity = []; $idor = $_REQUEST['params']['_idor_token'];
if (isset($_GET['entity_restrict']) && $_GET['entity_restrict']>=0) { unset($_REQUEST['params']['_idor_token']);
if ($item->isEntityAssign()) {
$entity['entities_id'] = $_GET['entity_restrict'];
}
}
if (isset($_GET['user_restrict']) && $_GET['user_restrict']>0) { if (!Session::validateIDOR([
$entity['users_id'] = $_GET['user_restrict']; 'itemtype' => $_REQUEST['itemtype'],
'_idor_token' => $idor
] + $_REQUEST['params'])) {
http_response_code(400);
die();
} }
$iterator = $DB->request([ $itemtype = $_REQUEST['itemtype'];
'SELECT' => $_GET['field'], $params = $_REQUEST['params'];
'DISTINCT' => true,
'FROM' => $table,
'WHERE' => [
[$_GET['field'] => ['LIKE', $_GET['term'] . '%']],
[$_GET['field'] => ['<>', $_GET['term']]]
] + $entity,
'ORDER' => $_GET['field']
]);
$values = [];
if (count($iterator)) {
while ($data = $iterator->next()) {
$values[] = Html::entity_decode_deep($data[$_GET['field']]);
}
}
if (count($values)) { switch ($_REQUEST['widget']) {
echo json_encode($values); case 'central_count':
if (method_exists($itemtype, 'showCentralCount')) {
$itemtype::showCentralCount($params['foruser'] ?? false);
}
break;
case 'central_list':
if (method_exists($itemtype, 'showCentralList')) {
if (is_subclass_of($itemtype, CommonITILObject::class)) {
$showgroupproblems = isset($params['showgroupproblems']) ? ($params['showgroupproblems'] !== 'false') : false;
$itemtype::showCentralList($params['start'], $params['status'] ?? 'process', $showgroupproblems);
}
} else if ($itemtype === RSSFeed::class) {
$personal = $params['personal'] !== 'false';
$itemtype::showListForCentral($personal);
} else if ($itemtype === Planning::class) {
$itemtype::showCentral($params['who']);
}
break;
default:
echo __('Invalid widget');
} }
...@@ -39,13 +39,6 @@ Html::header_nocache(); ...@@ -39,13 +39,6 @@ Html::header_nocache();
Session::checkLoginUser(); Session::checkLoginUser();
// depreciation behavior
if (!isset($_POST["itemtype"]) && isset($_POST['table'])
&& $DB->tableExists($_POST['table'])) {
Toolbox::deprecated();
$_POST["itemtype"] = getItemTypeForTable($_POST['table']);
}
if (isset($_POST["itemtype"]) if (isset($_POST["itemtype"])
&& isset($_POST["value"])) { && isset($_POST["value"])) {
// Security // Security
......
...@@ -108,7 +108,7 @@ CommonGLPI::displayStandardTab($item, $_UGET['_glpi_tab'], $_GET["withtemplate"] ...@@ -108,7 +108,7 @@ CommonGLPI::displayStandardTab($item, $_UGET['_glpi_tab'], $_GET["withtemplate"]
if (isset($_GET['full_page_tab'])) { if (isset($_GET['full_page_tab'])) {
echo "<div class='center' id='debugajax'>"; echo "<div class='center' id='debugajax'>";
echo "<a href='".htmlentities($_SERVER['REQUEST_URI'])."' class='vsubmit'>Reload</a>"; echo "<a href='".htmlentities($_SERVER['REQUEST_URI'])."' class='btn btn-primary'>Reload</a>";
echo "</div>"; echo "</div>";
// I think that we should display this warning, because tabs are not prepare // I think that we should display this warning, because tabs are not prepare
......
...@@ -58,5 +58,5 @@ if ($room->getFromDB($id)) { ...@@ -58,5 +58,5 @@ if ($room->getFromDB($id)) {
] ]
); );
} else { } else {
echo __('No room found or selected'); echo "<div class='col-form-label'>".__('No room found or selected')."</div>";
} }
...@@ -43,5 +43,5 @@ if ($_POST["actortype"] > 0) { ...@@ -43,5 +43,5 @@ if ($_POST["actortype"] > 0) {
$rand = mt_rand(); $rand = mt_rand();
$ticket->showActorAddForm($_POST["actortype"], $rand, $_SESSION['glpiactive_entity'], [], $ticket->showActorAddForm($_POST["actortype"], $rand, $_SESSION['glpiactive_entity'], [],
true, false, false); true, false, false);
echo "&nbsp;<input type='submit' name='add_actor' class='submit' value=\""._sx('button', 'Add')."\">"; echo "&nbsp;<input type='submit' name='add_actor' class='btn btn-primary' value=\""._sx('button', 'Add')."\">";
} }
...@@ -51,7 +51,7 @@ if (isset($_POST["validatortype"])) { ...@@ -51,7 +51,7 @@ if (isset($_POST["validatortype"])) {
echo "<br><br>".__('Comments')." "; echo "<br><br>".__('Comments')." ";
echo "<textarea name='comment_submission' cols='50' rows='6'></textarea>&nbsp;"; echo "<textarea name='comment_submission' cols='50' rows='6'></textarea>&nbsp;";
echo "<input type='submit' name='add' value=\""._sx('button', 'Add')."\" class='submit'>"; echo "<input type='submit' name='add' value=\""._sx('button', 'Add')."\" class='btn btn-primary'>";
break; break;
case 'group' : case 'group' :
...@@ -98,7 +98,7 @@ if (isset($_POST["validatortype"])) { ...@@ -98,7 +98,7 @@ if (isset($_POST["validatortype"])) {
// Display all/none buttons to select all or no users in group // Display all/none buttons to select all or no users in group
if (!empty($_POST['groups_id'])) { if (!empty($_POST['groups_id'])) {
echo "<a id='all_users' class='vsubmit'>".__('All')."</a>"; echo "<a id='all_users' class='btn btn-primary'>".__('All')."</a>";
$param_button = [ $param_button = [
'validatortype' => 'group_user', 'validatortype' => 'group_user',
'users_id_validate' => '', 'users_id_validate' => '',
...@@ -111,7 +111,7 @@ if (isset($_POST["validatortype"])) { ...@@ -111,7 +111,7 @@ if (isset($_POST["validatortype"])) {
$CFG_GLPI["root_doc"]."/ajax/dropdownMassiveActionAddValidator.php", $CFG_GLPI["root_doc"]."/ajax/dropdownMassiveActionAddValidator.php",
$param_button, ['click']); $param_button, ['click']);
echo "&nbsp;<a id='no_users' class='vsubmit'>".__('None')."</a>"; echo "&nbsp;<a id='no_users' class='btn btn-primary'>".__('None')."</a>";
$param_button['all_users'] = 0; $param_button['all_users'] = 0;
Ajax::updateItemOnEvent('no_users', 'show_groups_users', Ajax::updateItemOnEvent('no_users', 'show_groups_users',
$CFG_GLPI["root_doc"]."/ajax/dropdownMassiveActionAddValidator.php", $CFG_GLPI["root_doc"]."/ajax/dropdownMassiveActionAddValidator.php",
...@@ -121,7 +121,7 @@ if (isset($_POST["validatortype"])) { ...@@ -121,7 +121,7