Edit User: Use CSS (instead) to hide Enabled field when editing own User account.

This commit is contained in:
Nate 2019-03-15 14:17:41 -06:00
parent 09a1b707f5
commit 780b757d74
1 changed files with 13 additions and 15 deletions

View File

@ -952,21 +952,19 @@
echo " </tr>";
}
if ($user_uuid != $_SESSION['user_uuid']) {
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-enabled']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <select class='formfld' name='user_enabled'>\n";
echo " <option value='true'>".$text['option-true']."</option>\n";
echo " <option value='false' ".(($user_enabled != "true") ? "selected='selected'" : null).">".$text['option-false']."</option>\n";
echo " </select>\n";
echo "<br />\n";
echo $text['description-enabled']."\n";
echo "</td>\n";
echo "</tr>\n";
}
echo "<tr ".($user_uuid == $_SESSION['user_uuid'] ? "style='display: none;'" : null).">\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-enabled']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <select class='formfld' name='user_enabled'>\n";
echo " <option value='true'>".$text['option-true']."</option>\n";
echo " <option value='false' ".(($user_enabled != "true") ? "selected='selected'" : null).">".$text['option-false']."</option>\n";
echo " </select>\n";
echo "<br />\n";
echo $text['description-enabled']."\n";
echo "</td>\n";
echo "</tr>\n";
echo " <tr>";
echo " <td colspan='2' align='right' style='white-space: nowrap;'>";