165 lines
9.2 KiB
Plaintext
165 lines
9.2 KiB
Plaintext
<? --[[
|
|
* Pi-hole: A black hole for Internet advertisements
|
|
* (c) 2019 Pi-hole, LLC (https://pi-hole.net)
|
|
* Network-wide ad blocking via your own hardware.
|
|
*
|
|
* This file is copyright under the latest version of the EUPL.
|
|
* Please see LICENSE file for your rights under this license.
|
|
--]]
|
|
|
|
mg.include('scripts/lua/header_authenticated.lp','r')
|
|
?>
|
|
|
|
<!-- Title -->
|
|
<div class="page-header">
|
|
<h1><?= i18n('groups.domains.page_title') ?></h1>
|
|
</div>
|
|
|
|
<!-- Domain Input -->
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<div class="box" id="add-group">
|
|
<div class="box-header with-border">
|
|
<h3 class="box-title">
|
|
<?= i18n('groups.domains.add_domain_title') ?>
|
|
</h3>
|
|
</div>
|
|
<!-- /.box-header -->
|
|
<div class="box-body">
|
|
<div class="nav-tabs-custom">
|
|
<ul class="nav nav-tabs" role="tablist">
|
|
<li class="active" role="presentation">
|
|
<a href="#tab_domain" aria-controls="tab_domain" aria-expanded="true" role="tab" data-toggle="tab"><?= i18n('shared.domain') ?></a>
|
|
</li>
|
|
<li role="presentation">
|
|
<a href="#tab_regex" aria-controls="tab_regex" aria-expanded="false" role="tab" data-toggle="tab"><?= i18n('groups.domains.tab_regex') ?></a>
|
|
</li>
|
|
</ul>
|
|
<div class="tab-content">
|
|
<!-- Domain tab -->
|
|
<div id="tab_domain" class="tab-pane active fade in">
|
|
<div class="row">
|
|
<div class="col-md-6">
|
|
<div class="form-group">
|
|
<label for="new_domain"><?= i18n('shared.domain') ?>:</label>
|
|
<input id="new_domain" type="url" class="form-control active" placeholder="<?= i18n('groups.domains.domain_placeholder') ?>" autocomplete="off" spellcheck="false" autocapitalize="none" autocorrect="off">
|
|
<div id="suggest_domains" class="table-responsive no-border"></div>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-3 col-md-6 form-group">
|
|
<label for="new_domain_comment"><?= i18n('shared.comment') ?>:</label>
|
|
<input id="new_domain_comment" type="text" class="form-control" placeholder="<?= i18n('groups.domains.comment_placeholder') ?>">
|
|
</div>
|
|
<div class="col-lg-3 col-md-6 form-group">
|
|
<label for="new_domain_group"><?= i18n('groups.domains.group_assignment_label') ?></label>
|
|
<div><select class="selectpicker form-control" id="new_domain_group" multiple></select></div>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<div>
|
|
<input type="checkbox" id="wildcard_checkbox">
|
|
<label for="wildcard_checkbox"><strong><?= i18n('groups.domains.wildcard_label') ?></strong></label>
|
|
<p><?= i18n('groups.domains.wildcard_description') ?></p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- RegEx tab -->
|
|
<div id="tab_regex" class="tab-pane fade">
|
|
<div class="row">
|
|
<div class="col-md-6">
|
|
<div class="form-group">
|
|
<label for="new_regex"><?= i18n('groups.domains.regex_label') ?></label>
|
|
<input id="new_regex" type="text" class="form-control active" placeholder="<?= i18n('groups.domains.regex_placeholder') ?>">
|
|
</div>
|
|
<div class="form-group">
|
|
<strong><?= i18n('shared.hint') ?>:</strong> <?= i18n('groups.domains.regex_hint_text') ?>
|
|
<a href="https://docs.pi-hole.net/ftldns/regex/tutorial" rel="noopener noreferrer" target="_blank">
|
|
<?= i18n('groups.domains.regex_tutorial') ?></a>.
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-3 col-md-6 form-group">
|
|
<label for="new_regex_comment"><?= i18n('shared.comment') ?>:</label>
|
|
<input id="new_regex_comment" type="text" class="form-control" placeholder="<?= i18n('groups.domains.comment_placeholder') ?>">
|
|
</div>
|
|
<div class="col-lg-3 col-md-6 form-group">
|
|
<label for="new_regex_group"><?= i18n('groups.domains.group_assignment_label') ?></label>
|
|
<div><select class="selectpicker form-control" id="new_regex_group" multiple></select></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<p><strong><?= i18n('shared.note') ?>:</strong><br>
|
|
<?= i18n('groups.domains.note_text') ?><br>
|
|
<?= i18n('groups.domains.note_extra') ?><br>
|
|
<?= i18n('groups.domains.note_multiple') ?>
|
|
</p>
|
|
</div>
|
|
<div class="btn-toolbar pull-right" role="toolbar" aria-label="<?= i18n('groups.domains.toolbar') ?>">
|
|
<div class="btn-group" role="group">
|
|
<button type="button" class="btn btn-primary" id="add_deny"><?= i18n('groups.domains.deny') ?></button>
|
|
</div>
|
|
<div class="btn-group" role="group">
|
|
<button type="button" class="btn btn-primary" id="add_allow"><?= i18n('groups.domains.allow') ?></button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- /.box-body -->
|
|
</div>
|
|
<!-- /.box -->
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Domain List -->
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<div class="box" id="domains-list">
|
|
<div class="box-header with-border">
|
|
<h3 class="box-title">
|
|
<?= i18n('groups.domains.domain_list_title') ?>
|
|
</h3>
|
|
<div class="filter_types">
|
|
<div class="line">
|
|
<span><input type="checkbox" name="typ" value="allow/exact" id="typ0" checked><label for="typ0"><?= i18n('groups.domains.exact_allow') ?></label></span>
|
|
<span><input type="checkbox" name="typ" value="allow/regex" id="typ2" checked><label for="typ2"><?= i18n('groups.domains.regex_allow') ?></label></span>
|
|
</div>
|
|
<div class="line">
|
|
<span><input type="checkbox" name="typ" value="deny/exact" id="typ1" checked><label for="typ1"><?= i18n('groups.domains.exact_deny') ?></label></span>
|
|
<span><input type="checkbox" name="typ" value="deny/regex" id="typ3" checked><label for="typ3"><?= i18n('groups.domains.regex_deny') ?></label></span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- /.box-header -->
|
|
<div class="box-body">
|
|
<table id="domainsTable" class="table table-striped table-bordered" width="100%">
|
|
<thead>
|
|
<tr>
|
|
<th>ID</th>
|
|
<th></th>
|
|
<th><?= i18n('groups.domains.table_header_domain') ?></th>
|
|
<th><?= i18n('shared.type') ?></th>
|
|
<th><?= i18n('shared.status') ?></th>
|
|
<th><?= i18n('shared.comment') ?></th>
|
|
<th><?= i18n('groups.domains.table_header_group_assignment') ?></th>
|
|
<th> </th>
|
|
</tr>
|
|
</thead>
|
|
</table>
|
|
<button type="button" id="resetButton" class="btn btn-default btn-sm text-red hidden"><?= i18n('groups.reset_sorting') ?></button>
|
|
</div>
|
|
<!-- /.box-body -->
|
|
</div>
|
|
<!-- /.box -->
|
|
</div>
|
|
</div>
|
|
|
|
<script src="<?=pihole.fileversion('vendor/bootstrap-select/bootstrap-select.min.js')?>"></script>
|
|
<script src="<?=pihole.fileversion('vendor/bootstrap-toggle/bootstrap-toggle.min.js')?>"></script>
|
|
<script src="<?=pihole.fileversion('scripts/js/groups-common.js')?>"></script>
|
|
<script src="<?=pihole.fileversion('scripts/js/groups-domains.js')?>"></script>
|
|
|
|
<? mg.include('scripts/lua/footer.lp','r')?>
|