minor enhancements in dns-editor
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -31,6 +31,7 @@ if (!defined('AREA')) {
|
||||
use Froxlor\Api\Commands\DomainZones;
|
||||
use Froxlor\Dns\Dns;
|
||||
use Froxlor\UI\Collection;
|
||||
use Froxlor\UI\HTML;
|
||||
use Froxlor\UI\Listing;
|
||||
use Froxlor\UI\Panel\UI;
|
||||
use Froxlor\UI\Request;
|
||||
@@ -70,9 +71,22 @@ if ($action == 'add_record' && !empty($_POST)) {
|
||||
$errors = str_replace("\n", "<br>", $e->getMessage());
|
||||
}
|
||||
} elseif ($action == 'delete') {
|
||||
// remove entry
|
||||
$entry_id = isset($_GET['id']) ? (int)$_GET['id'] : 0;
|
||||
if ($entry_id > 0) {
|
||||
HTML::askYesNo('dnsentry_reallydelete', $filename, [
|
||||
'id' => $entry_id,
|
||||
'domain_id' => $domain_id,
|
||||
'page' => $page,
|
||||
'action' => 'deletesure'
|
||||
], '', [
|
||||
'section' => 'domains',
|
||||
'page' => $page,
|
||||
'domain_id' => $domain_id
|
||||
]);
|
||||
} elseif ($action == 'deletesure' && !empty($_POST)) {
|
||||
$entry_id = isset($_POST['id']) ? (int)$_POST['id'] : 0;
|
||||
$domain_id = isset($_POST['domain_id']) ? (int)$_POST['domain_id'] : 0;
|
||||
// remove entry
|
||||
if ($entry_id > 0 && $domain_id > 0) {
|
||||
try {
|
||||
DomainZones::getLocal($userinfo, [
|
||||
'entry_id' => $entry_id,
|
||||
|
||||
@@ -30,6 +30,7 @@ use Froxlor\UI\Listing;
|
||||
return [
|
||||
'dns_list' => [
|
||||
'title' => 'DNS Entries',
|
||||
'description' => $domain,
|
||||
'icon' => 'fa-solid fa-globe',
|
||||
'self_overview' => ['section' => 'domains', 'page' => 'domaindnseditor'],
|
||||
'columns' => [
|
||||
|
||||
@@ -1249,7 +1249,9 @@ Vielen Dank, Ihr Administrator',
|
||||
'remove_subbutmain_domains' => 'Auch Domains entfernen, welche als volle Domains hinzugefügt wurden, aber Subdomains von dieser Domain sind?',
|
||||
'customer_reallyunlock' => 'Wollen Sie den Kunden "%s" wirklich entsperren?',
|
||||
'admin_integritycheck_reallyfix' => 'Möchten Sie wirklich versuchen sämtliche Datenbank-Integritätsprobleme automatisch zu beheben?',
|
||||
'plan_reallydelete' => 'Wollen Sie den Api-Key wirklich löschen?',
|
||||
'plan_reallydelete' => 'Wollen Sie den Hostingplan %s wirklich löschen?',
|
||||
'apikey_reallydelete' => 'Wollen Sie den Api-Key wirklich löschen?',
|
||||
'dnsentry_reallydelete' => 'Wollen Sie den DNS-Eintrag wirklich löschen?',
|
||||
],
|
||||
'serversettings' => [
|
||||
'session_timeout' => [
|
||||
|
||||
@@ -1617,6 +1617,7 @@ Yours sincerely, your administrator',
|
||||
'admin_integritycheck_reallyfix' => 'Do you really want to try fixing all database integrity problems automatically?',
|
||||
'plan_reallydelete' => 'Do you really want to delete the hosting plan %s?',
|
||||
'apikey_reallydelete' => 'Do you really want to delete this api-key?',
|
||||
'dnsentry_reallydelete' => 'Do you really want to delete this zone entry?',
|
||||
],
|
||||
'redirect_desc' => [
|
||||
'rc_default' => 'default',
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{% extends "Froxlor/user/table.html.twig" %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row mb-2">
|
||||
<div class="pb-2">
|
||||
{% include 'Froxlor/misc/alertbox.html.twig' %}
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user