From 5cb7929f31d5fb30048b14fab200171f57c1a70e Mon Sep 17 00:00:00 2001
From: Damien <damien.burel@maarch.org>
Date: Fri, 28 Feb 2020 15:10:29 +0100
Subject: [PATCH] FEAT #13353 TIME 0:30 Unlock resources before logout

---
 apps/maarch_entreprise/css/styles.css | 6 +++---
 apps/maarch_entreprise/logout.php     | 3 +++
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/apps/maarch_entreprise/css/styles.css b/apps/maarch_entreprise/css/styles.css
index 6862c8fbd0a..9359b1d14c0 100755
--- a/apps/maarch_entreprise/css/styles.css
+++ b/apps/maarch_entreprise/css/styles.css
@@ -3538,11 +3538,11 @@ input.button {
 }
 
 .submitButton {
-    background-color: #135f7f !important;
+    background-color: #24b0ed !important;
     color: white !important;
     border: none !important;
     box-shadow: 0 3px 1px -2px rgba(0, 0, 0, .2), 0 2px 2px 0 rgba(0, 0, 0, .14), 0 1px 5px 0 rgba(0, 0, 0, .12);
-    padding: 10px !important;
+    padding: 5px 10px !important;
     border-radius: 4px !important;
     font-size: 13px;
     font-weight: 500;
@@ -3560,4 +3560,4 @@ input.button {
 
 .submitButton::-moz-focus-inner {
     border: 0;
-}
\ No newline at end of file
+}
diff --git a/apps/maarch_entreprise/logout.php b/apps/maarch_entreprise/logout.php
index ba2b4d7abdd..317e1cf5a0a 100755
--- a/apps/maarch_entreprise/logout.php
+++ b/apps/maarch_entreprise/logout.php
@@ -16,6 +16,9 @@ require_once 'core/core_tables.php';
 $core = new core_tools();
 $core->load_lang();
 //$name = 'maarch';
+
+$user = \User\models\UserModel::getByLogin(['login' => $_SESSION['user']['UserId'], 'select' => ['id']]);
+\Resource\models\ResModel::update(['set' => ['locker_user_id' => null, 'locker_time' => null], 'where' => ['locker_user_id = ?'], 'data' => [$user['id']]]);
 $name = $_SESSION['sessionName'];
 
 setcookie($name, "", 1);
-- 
GitLab