[PR #13] [MERGED] fix: unable to book trip #11

Closed
opened 2026-05-06 16:09:08 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

Original PR: https://github.com/BreizhHardware/projet-web-cipa4/pull/13
Author: @BreizhHardware
Created: 2/12/2026
Status: Merged
Merged: 2/12/2026
Merged by: @ClementHVT

Base: mainHead: fix/book


📝 Commits (1)

📊 Changes

4 files changed (+9 additions, -47 deletions)

View changed files

📝 js/manag.js (+7 -1)
📝 js/publish.js (+1 -1)
📝 php/classes/Security.php (+1 -1)
📝 views/trip/manag.html (+0 -44)

📄 Description

This pull request introduces several improvements to JavaScript module imports, code organization, and security headers. The main changes involve centralizing navigation updates, exposing certain functions globally for UI event handling, and updating the Content Security Policy to allow additional connections. Unused inline scripts have also been removed from the HTML template to streamline the codebase.

JavaScript module and global scope improvements:

  • Added updateNav to the imports in both js/manag.js and js/publish.js to ensure navigation is updated on relevant pages. [1] [2]
  • Exposed handleBookingAction, submitRating, openRatingModal, and getCsrfToken as global functions in js/manag.js to enable direct usage from HTML event handlers.

Security and policy updates:

  • Updated the Content Security Policy in php/classes/Security.php to allow connections to https://unpkg.com in the connect-src directive, supporting additional required resources.

HTML and script cleanup:

  • Removed inline JavaScript from views/trip/manag.html, relying instead on external scripts and the newly global functions for form handling and navigation updates.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/BreizhHardware/projet-web-cipa4/pull/13 **Author:** [@BreizhHardware](https://github.com/BreizhHardware) **Created:** 2/12/2026 **Status:** ✅ Merged **Merged:** 2/12/2026 **Merged by:** [@ClementHVT](https://github.com/ClementHVT) **Base:** `main` ← **Head:** `fix/book` --- ### 📝 Commits (1) - [`0af6f98`](https://github.com/BreizhHardware/projet-web-cipa4/commit/0af6f981fd63df7261af53feb5386a5201501c28) fix: unable to book trip ### 📊 Changes **4 files changed** (+9 additions, -47 deletions) <details> <summary>View changed files</summary> 📝 `js/manag.js` (+7 -1) 📝 `js/publish.js` (+1 -1) 📝 `php/classes/Security.php` (+1 -1) 📝 `views/trip/manag.html` (+0 -44) </details> ### 📄 Description This pull request introduces several improvements to JavaScript module imports, code organization, and security headers. The main changes involve centralizing navigation updates, exposing certain functions globally for UI event handling, and updating the Content Security Policy to allow additional connections. Unused inline scripts have also been removed from the HTML template to streamline the codebase. **JavaScript module and global scope improvements:** * Added `updateNav` to the imports in both `js/manag.js` and `js/publish.js` to ensure navigation is updated on relevant pages. [[1]](diffhunk://#diff-14d08e503f6df5beb8c580823d288dbacbd8f9d94a4a393d296ccb159f5257baL1-R1) [[2]](diffhunk://#diff-79509cba21f9b2ccd5da8bb3d8b8dfced8217cdbaa7ca55af49c9b3d06de7933L1-R1) * Exposed `handleBookingAction`, `submitRating`, `openRatingModal`, and `getCsrfToken` as global functions in `js/manag.js` to enable direct usage from HTML event handlers. **Security and policy updates:** * Updated the Content Security Policy in `php/classes/Security.php` to allow connections to `https://unpkg.com` in the `connect-src` directive, supporting additional required resources. **HTML and script cleanup:** * Removed inline JavaScript from `views/trip/manag.html`, relying instead on external scripts and the newly global functions for form handling and navigation updates. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
BreizhHardware 2026-05-06 16:09:08 +02:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
BreizhHardware/projet-web-cipa4#11
No description provided.