Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#961 [PreventionPlan] add: add reposition #955

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion core/tpl/attendants/attendants_table_add_view.tpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
print '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '?id=' . $id . '&module_name=' . $moduleName . '&object_type=' . $object->element . '&document_type=' . $documentType . '&attendant_table_mode=' . $attendantTableMode . '">';
print '<input type="hidden" name="token" value="' . newToken() . '">';
print '<input type="hidden" name="action" value="add_attendant">';
print '<input type="hidden" name="page_y">';
if ($attendantTableMode == 'advanced') {
print '<input type="hidden" name="attendant_role" value="' . $signatoryRole . '">';
}
Expand Down Expand Up @@ -63,7 +64,7 @@
}
print '<td colspan="' . ($conf->browser->layout != 'classic' ? 4 : 5) . '"></td>';
print '<td class="center">';
print '<button type="submit" class="wpeo-button button-blue"><i class="fas fa-plus"></i></button>';
print '<button type="submit" class="wpeo-button button-blue reposition"><i class="fas fa-plus"></i></button>';
print '</td></tr>';
print '</table>';
print '</form>';
Expand Down
3 changes: 2 additions & 1 deletion core/tpl/attendants/attendants_table_view.tpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,8 @@
print '<input type="hidden" name="action" value="delete_attendant">';
print '<input type="hidden" name="signatoryID" value="' . $element->id . '">';
print '<input type="hidden" name="backtopage" value="' . $backtopage . '">';
print '<button type="submit" name="deleteAttendant" id="deleteAttendant" class="attendant-delete wpeo-button button-grey" value="' . $element->id . '">';
print '<input type="hidden" name="page_y">';
print '<button type="submit" name="deleteAttendant" id="deleteAttendant" class="attendant-delete wpeo-button button-grey reposition" value="' . $element->id . '">';
print '<i class="fas fa-trash"></i>';
print '</button>';
print '</form>';
Expand Down
5 changes: 3 additions & 2 deletions view/saturne_attendants.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
$moduleName = GETPOST('module_name', 'alpha');
$objectType = GETPOST('object_type', 'alpha');
$documentType = GETPOST('document_type', 'alpha');
$pageY = GETPOST('page_y', 'int');

$moduleNameLowerCase = strtolower($moduleName);

Expand Down Expand Up @@ -136,7 +137,7 @@
setEventMessages($langs->trans('AddAttendantMessage', $langs->transnoentities($attendantRole) . ' ' . $contact->getFullName($langs, 1)), []);
}
// Prevent form reloading page
header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $id . '&module_name=' . $moduleName . '&object_type=' . $object->element . '&document_type=' . $documentType . '&attendant_table_mode=' . $attendantTableMode);
header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $id . '&module_name=' . $moduleName . '&object_type=' . $object->element . '&document_type=' . $documentType . '&attendant_table_mode=' . $attendantTableMode . '&page_y=' . $pageY);
exit;
} elseif (!empty($signatory->errors)) {
// Creation attendant KO
Expand Down Expand Up @@ -279,7 +280,7 @@
if ($result > 0) {
setEventMessages($langs->trans('DeleteAttendantMessage', $langs->transnoentities($signatory->role) . ' ' . strtoupper($signatory->lastname) . ' ' . $signatory->firstname), []);
// Prevent form reloading page
header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $id . '&module_name=' . $moduleName . '&object_type=' . $object->element . '&document_type=' . $documentType . '&attendant_table_mode=' . $attendantTableMode);
header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $id . '&module_name=' . $moduleName . '&object_type=' . $object->element . '&document_type=' . $documentType . '&attendant_table_mode=' . $attendantTableMode . '&page_y=' . $pageY);
exit;
} elseif (!empty($signatory->errors)) {
// Deletion attendant KO
Expand Down