diff options
author | Igor Scheller <igor.scheller@igorshp.de> | 2018-11-20 16:02:03 +0100 |
---|---|---|
committer | msquare <msquare@notrademark.de> | 2018-11-21 19:24:36 +0100 |
commit | 944c29b96429ec95ac1371cb33cc43704a60c7b1 (patch) | |
tree | 7be99e68d8c15fc7e210a4b3ccc44861a8d1de64 /includes/view/ShiftTypes_view.php | |
parent | fd37c9d60ea818dc9a562fa88ff5f9a50132506f (diff) |
Require POST for sending forms
* Ensure that the form is submitted with a post request
* Replaced several links with forms
Closes #494 (Security Vulnerability)
Diffstat (limited to 'includes/view/ShiftTypes_view.php')
-rw-r--r-- | includes/view/ShiftTypes_view.php | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/includes/view/ShiftTypes_view.php b/includes/view/ShiftTypes_view.php index 7053f164..72d119ff 100644 --- a/includes/view/ShiftTypes_view.php +++ b/includes/view/ShiftTypes_view.php @@ -21,17 +21,17 @@ function ShiftType_delete_view($shifttype) { return page_with_title(sprintf(__('Delete shifttype %s'), $shifttype['name']), [ info(sprintf(__('Do you want to delete shifttype %s?'), $shifttype['name']), true), - buttons([ - button(page_link_to('shifttypes'), glyph('remove') . __('cancel')), - button( - page_link_to( - 'shifttypes', - ['action' => 'delete', 'shifttype_id' => $shifttype['id'], 'confirmed' => 1] + form([ + buttons([ + button(page_link_to('shifttypes'), glyph('remove') . __('cancel')), + form_submit( + 'delete', + glyph('ok') . __('delete'), + 'btn-danger', + false ), - glyph('ok') . __('delete'), - 'btn-danger' - ) - ]) + ]), + ]), ]); } |