Show device copy when user has device_add permission.

This commit is contained in:
markjcrane
2015-11-05 12:11:53 -07:00
parent db79cfbc30
commit 5346599c00

View File

@@ -514,7 +514,7 @@ require_once "resources/require.php";
echo "</td>\n";
echo "<td width='70%' align='right' valign='top'>\n";
echo " <input type='button' class='btn' name='' alt='".$text['button-back']."' onclick=\"window.location='devices.php'\" value='".$text['button-back']."'>\n";
if ($action != "add") {
if (permission_exists('device_add') && $action != "add") {
echo " <input type='button' class='btn' name='' alt='".$text['button-copy']."' onclick=\"var new_mac = prompt('".$text['message_device']."'); if (new_mac != null) { window.location='device_copy.php?id=".$device_uuid."&mac=' + new_mac; }\" value='".$text['button-copy']."'>\n";
}
echo " <input type='submit' class='btn' value='".$text['button-save']."'>\n";