Move the description inside the permission condition and adjust 2 of the permissions.

This commit is contained in:
markjcrane
2015-11-05 12:05:49 -07:00
parent 242ad7bc16
commit db79cfbc30
+10 -8
View File
@@ -528,13 +528,13 @@ require_once "resources/require.php";
echo "<td class='vtable' align='left'>\n"; echo "<td class='vtable' align='left'>\n";
if (permission_exists('device_mac_address')) { if (permission_exists('device_mac_address')) {
echo " <input class='formfld' type='text' name='device_mac_address' id='device_mac_address' maxlength='255' value=\"$device_mac_address\">\n"; echo " <input class='formfld' type='text' name='device_mac_address' id='device_mac_address' maxlength='255' value=\"$device_mac_address\">\n";
echo "<br />\n";
echo $text['description-device_mac_address']."\n";
} }
else { else {
echo $device_mac_address; echo $device_mac_address;
} }
echo " <div style='display: none;' id='duplicate_mac_response'></div>\n"; echo " <div style='display: none;' id='duplicate_mac_response'></div>\n";
echo "<br />\n";
echo $text['description-device_mac_address']."\n";
echo "</td>\n"; echo "</td>\n";
echo "</tr>\n"; echo "</tr>\n";
@@ -546,12 +546,13 @@ require_once "resources/require.php";
echo "<td class='vtable' align='left'>\n"; echo "<td class='vtable' align='left'>\n";
if (permission_exists('device_label')) { if (permission_exists('device_label')) {
echo " <input class='formfld' type='text' name='device_label' maxlength='255' value=\"$device_label\">\n"; echo " <input class='formfld' type='text' name='device_label' maxlength='255' value=\"$device_label\">\n";
echo "<br />\n";
echo $text['description-device_label']."\n";
} }
else { else {
echo $device_label; echo $device_label;
} }
echo "<br />\n";
echo $text['description-device_label']."\n";
echo "</td>\n"; echo "</td>\n";
echo "</tr>\n"; echo "</tr>\n";
@@ -753,7 +754,9 @@ require_once "resources/require.php";
echo " </td>"; echo " </td>";
echo " </tr>"; echo " </tr>";
} }
}
if (permission_exists('device_key_edit')) {
$vendor_count = 0; $vendor_count = 0;
foreach($device_keys as $row) { foreach($device_keys as $row) {
if ($previous_vendor != $row['device_key_vendor']) { if ($previous_vendor != $row['device_key_vendor']) {
@@ -779,7 +782,6 @@ require_once "resources/require.php";
echo " </tr>\n"; echo " </tr>\n";
} }
if (permission_exists('device_profile_view')) {
$x = 0; $x = 0;
foreach($device_keys as $row) { foreach($device_keys as $row) {
//set the column names //set the column names
@@ -1079,7 +1081,6 @@ require_once "resources/require.php";
echo " </td>"; echo " </td>";
echo " </tr>"; echo " </tr>";
} }
}
//device settings //device settings
if (permission_exists('device_setting_edit')) { if (permission_exists('device_setting_edit')) {
@@ -1313,12 +1314,13 @@ require_once "resources/require.php";
echo "<td class='vtable' align='left'>\n"; echo "<td class='vtable' align='left'>\n";
if (permission_exists('device_description')) { if (permission_exists('device_description')) {
echo " <input class='formfld' type='text' name='device_description' maxlength='255' value=\"$device_description\">\n"; echo " <input class='formfld' type='text' name='device_description' maxlength='255' value=\"$device_description\">\n";
echo "<br />\n";
echo $text['description-device_description']."\n";
} }
else { else {
echo $device_description."\n"; echo $device_description."\n";
} }
echo "<br />\n";
echo $text['description-device_description']."\n";
echo "</td>\n"; echo "</td>\n";
echo "</tr>\n"; echo "</tr>\n";
echo " <tr>\n"; echo " <tr>\n";