Files
assetmgt/communication_send.php
“VeLiTi” ec20d44267 Refactor UI elements for consistency and clarity
- Updated action buttons across multiple files to use icons (e.g., "Save" to "💾+", "Delete" to "X").
- Replaced "Cancel" button text with a left arrow (←) for a more intuitive navigation experience.
- Removed unnecessary action columns from tables to streamline the interface.
- Enhanced table rows to be clickable for better user interaction, redirecting to relevant management pages.
- Adjusted font sizes and styles in CSS for improved readability and aesthetics.
- Standardized back button functionality to use a left arrow across various pages.
2025-12-15 17:08:44 +01:00

75 lines
2.5 KiB
PHP

<?php
defined(page_security_key) or exit;
$page = 'communication_send';
//Check if allowed
if (isAllowed($page,$_SESSION['profile'],$_SESSION['permission'],'R') === 0){
header('location: index.php');
exit;
}
//PAGE Security
$update_allowed = isAllowed($page ,$_SESSION['profile'],$_SESSION['permission'],'U');
$delete_allowed = isAllowed($page ,$_SESSION['profile'],$_SESSION['permission'],'D');
$create_allowed = isAllowed($page ,$_SESSION['profile'],$_SESSION['permission'],'C');
$url = 'index.php?page=communications';
if ($update_allowed === 1){
if (isset($_POST['submit'])) {
//GET ALL POST DATA
$data = json_encode($_POST, JSON_UNESCAPED_UNICODE);
//Secure data
$payload = generate_payload($data);
//API call
$responses = ioServer('/v1/application/firmwareCommunication', $payload);
if ($responses === 'NOK'){
} else {
header('Location: index.php?page=communications&success_msg=4');
exit;
}
}
}
template_header('Communication', 'communication', 'manage');
$view ='
<form action="" method="post">
<div class="content-title responsive-flex-wrap responsive-pad-bot-3">
<h2 class="responsive-width-100">'.$communication_send_firmware_h2.'</h2>
<a href="index.php?page=communications" class="btn alt mar-right-2">←</a>
';
if ($update_allowed === 1){
$view .= '<input type="submit" name="submit" value="Save" onclick="return confirm(\'Are you sure you want to send firmware messages?\')" class="btn">';
}
$view .= '</div>';
$view .= '<div class="tabs">
<a href="#" class="active">'.$tab1 .'</a>
</div>
';
//Define Service and partner enabled
$view .= '<div class="content-block tab-content active">
<div class="form responsive-width-100">
<label for="target">'.$communication_target.'</label>
<select id="target" name="target">
<option value="1" >'.$general_soldto .'</option>
<option value="2" >'.$general_shipto .'</option>
<option value="0" >'.$communication_target_both .'</option>
</select>
<label for="hw_version">'.$communication_hw_scope.'</label>
<input id="hw_version" type="text" name="hw_version" placeholder="'.$communication_hw_scope.'" value="" required">
';
$view .= '</div>
</div>';
$view .= '</form>';
//Output
echo $view;
template_footer()?>