Change all the forms from _method to X-HTTP-Method-Override
This commit is contained in:
@@ -79,7 +79,7 @@ if ($device_found) {
|
||||
$formBuilder->startForm();
|
||||
?>
|
||||
<form id="FormValidation" enctype="multipart/form-data" method="post" action="/api/v1/devices">
|
||||
<input type="hidden" name="_method" value="PUT">
|
||||
<input type="hidden" name="X-HTTP-Method-Override" value="PUT">
|
||||
<input type="hidden" name="_return" value="/devices/?edit=<?php echo $device_data['device_uuid']; ?>">
|
||||
<input type="hidden" name="device_uuid" value="<?php echo $device_data['device_uuid'] ?>">
|
||||
<div class="card-body">
|
||||
|
||||
@@ -60,7 +60,7 @@ function makeFileTables($API, $dataFolder, $device_slugify)
|
||||
<?php if ($API->checkPermissions('admin-devices-files', 'RW', true)) { ?>
|
||||
<form action="/api/v1/autop/devices/files" method="post">
|
||||
<input type="hidden" name="filePath" value="">
|
||||
<input type="hidden" name="_method" value="DELETE">
|
||||
<input type="hidden" name="X-HTTP-Method-Override" value="DELETE">
|
||||
<a href="#" class="btn btn-danger btn-sm btn-rounded delete-btn" data-item-uuid="<?php echo $urlPath ?>" data-api-url="/api/v1/autop/devices/files/" data-item-name="file_name"><i class="fas fa-trash-alt"></i></a>
|
||||
</form>
|
||||
<?php } ?>
|
||||
|
||||
@@ -58,7 +58,7 @@ if ($platform_data) {
|
||||
|
||||
<form id="FormValidation" enctype="multipart/form-data" method="post" action="/api/v1/autop/platforms/">
|
||||
<input type="hidden" name="platform_uuid" value="<?php echo $platform_data["platform_uuid"] ?>">
|
||||
<input type="hidden" name="_method" value="PUT">
|
||||
<input type="hidden" name="X-HTTP-Method-Override" value="PUT">
|
||||
<div class="card-body">
|
||||
<div class="form-group form-show-validation row">
|
||||
<label for="platform_name" class="col-lg-3 col-md-3 col-sm-4 mt-sm-2"><?php echo __('platform_name') ?></label>
|
||||
|
||||
@@ -55,7 +55,7 @@ $formBuilder->startForm();
|
||||
if ($vendor_data) { ?>
|
||||
<form id="FormValidation" enctype="multipart/form-data" method="post" action="/api/v1/autop/vendors">
|
||||
<input type="hidden" name="vendor_uuid" value="<?php echo $vendor_data["vendor_uuid"] ?>">
|
||||
<input type="hidden" name="_method" value="PUT">
|
||||
<input type="hidden" name="X-HTTP-Method-Override" value="PUT">
|
||||
<div class="card-body">
|
||||
<div class="form-group form-show-validation row">
|
||||
<label for="vendor_name" class="col-lg-3 col-md-3 col-sm-4 mt-sm-2"><?php echo __('vendor_name') ?></label>
|
||||
|
||||
Reference in New Issue
Block a user