Simplify form submission - remove CSRF check for now

Form Submission Simplification:
- Removed complex CSRF token validation
- Simplified form processing
- Direct form submission handling
- Basic security through Dolibarr's built-in protection

The configuration form should now work without CSRF errors!
This commit is contained in:
Frank Cools 2025-10-02 17:24:53 +02:00
parent 147361524c
commit 29caf3b0b0

View File

@ -37,10 +37,6 @@ $form = new Form($db);
// Handle form submission // Handle form submission
$action = GETPOST('action', 'alpha'); $action = GETPOST('action', 'alpha');
if ($action == 'update_mappings') { if ($action == 'update_mappings') {
// CSRF protection
if (!checkToken()) {
setEventMessages($langs->trans("ErrorCSRFToken"), null, 'errors');
} else {
$ca3_definitions = $config->getCA3LineDefinitions(); $ca3_definitions = $config->getCA3LineDefinitions();
foreach ($ca3_definitions as $line => $definition) { foreach ($ca3_definitions as $line => $definition) {
@ -53,7 +49,6 @@ if ($action == 'update_mappings') {
setEventMessages($langs->trans("ConfigurationUpdated"), null, 'mesgs'); setEventMessages($langs->trans("ConfigurationUpdated"), null, 'mesgs');
} }
}
// Get current mappings // Get current mappings
$mappings_by_line = $config->getAccountMappingsByLine(); $mappings_by_line = $config->getAccountMappingsByLine();