Skip to content

Commit

Permalink
source code/html output cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Edmondas Girkantas committed Aug 1, 2011
1 parent 18f8585 commit 3ebbeb0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 26 deletions.
38 changes: 14 additions & 24 deletions edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@
echo " <input type=\"submit\" class=\"button\" name=\"commit\" value=\"" . _('Commit changes') . "\">\n";
echo " <input type=\"reset\" class=\"button\" name=\"reset\" value=\"" . _('Reset changes') . "\">\n";
echo " <input type=\"submit\" class=\"button\" name=\"save_as\" value=\"" . _('Save as template') . "\">\n";
echo " </form>";
echo " </form>\n";
}

if ( $perm_content_edit == "all" || $perm_content_edit == "own" && $user_is_zone_owner == "1" ) {
Expand All @@ -250,29 +250,20 @@
echo " <td class=\"n\">\n";
echo " <select name=\"type\">\n";
foreach (get_record_types() as $record_type) {
if (isset($type) && $type) {
if ($type == $record_type) {
$add = " SELECTED";
}
else
{
$add = "";
}
}
else
{
if (preg_match('/in-addr.arpa/i', $zone_name) && strtoupper($record_type) == 'PTR')
{
$add = " SELECTED";
}
else if (strtoupper($record_type) == 'A')
{
$add = " SELECTED";
}
else
{
$add = "";
if (isset($type) && $type) {
if ($type == $record_type) {
$add = " SELECTED";
} else {
$add = "";
}
} else {
if (preg_match('/in-addr.arpa/i', $zone_name) && strtoupper($record_type) == 'PTR')
$add = " SELECTED";
} else if (strtoupper($record_type) == 'A') {
$add = " SELECTED";
} else {
$add = "";
}
}
echo " <option" . $add . " value=\"" . $record_type . "\">" . $record_type . "</option>\n";
}
Expand All @@ -283,7 +274,6 @@
echo " <td class=\"n\"><input type=\"text\" name=\"ttl\" class=\"sinput\" value=\"\"></td>\n";
echo " </tr>\n";
echo " </table>\n";
echo " <br>\n";
echo " <input type=\"submit\" name=\"commit\" value=\"" . _('Add record') . "\" class=\"button\">\n";
echo " </form>\n";
}
Expand Down
2 changes: 0 additions & 2 deletions edit_record.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,8 @@
echo " </tr>\n";
}
echo " </table>\n";
echo " <p>\n";
echo " <input type=\"submit\" name=\"commit\" value=\"" . _('Commit changes') . "\" class=\"button\">&nbsp;&nbsp;\n";
echo " <input type=\"reset\" name=\"reset\" value=\"" . _('Reset changes') . "\" class=\"button\">&nbsp;&nbsp;\n";
echo " </p>\n";
echo " </form>\n";
}

Expand Down

0 comments on commit 3ebbeb0

Please sign in to comment.