mirror of
https://github.com/billz/raspap-webgui.git
synced 2023-10-10 13:37:24 +02:00
Update w/ reset tab + modal dialog
This commit is contained in:
parent
55cd332861
commit
bfcb420524
@ -17,6 +17,7 @@
|
||||
<li role="presentation" class="nav-item"><a class="nav-link" id="languagetab" href="#language" aria-controls="language" role="tab" data-toggle="tab"><?php echo _("Language"); ?></a></li>
|
||||
<li role="presentation" class="nav-item"><a class="nav-link" id="themetab" href="#theme" aria-controls="theme" role="tab" data-toggle="tab"><?php echo _("Theme"); ?></a></li>
|
||||
<li role="presentation" class="nav-item"><a class="nav-link" id="advancedtab" href="#advanced" aria-controls="advanced" role="tab" data-toggle="tab"><?php echo _("Advanced"); ?></a></li>
|
||||
<li role="presentation" class="nav-item"><a class="nav-link" id="resettab" href="#reset" aria-controls="reset" role="tab" data-toggle="tab"><?php echo _("Reset"); ?></a></li>
|
||||
</ul>
|
||||
<!-- Tab panes -->
|
||||
<div class="tab-content">
|
||||
@ -24,6 +25,7 @@
|
||||
<?php echo renderTemplate("system/language", $__template_data) ?>
|
||||
<?php echo renderTemplate("system/theme", $__template_data) ?>
|
||||
<?php echo renderTemplate("system/advanced", $__template_data) ?>
|
||||
<?php echo renderTemplate("system/reset", $__template_data) ?>
|
||||
</div><!-- /.tab-content -->
|
||||
</form>
|
||||
</div><!-- /.card-body -->
|
||||
@ -31,3 +33,22 @@
|
||||
</div><!-- /.card -->
|
||||
</div><!-- /.col-lg-12 -->
|
||||
</div><!-- /.row -->
|
||||
|
||||
<!-- modal confirm-reset-->
|
||||
<div class="modal fade" id="system-confirm-reset" tabindex="-1" role="dialog" aria-labelledby="ModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<div class="modal-title" id="ModalLabel"><i class="fas fa-history mr-2"></i><?php echo _("System reset"); ?></div>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="col-md-12 mb-3 mt-1" id="system-reset-message"><?php echo _("Reset RaspAP to its initial default settings? This action cannot be undone."); ?></div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-outline-secondary" data-dismiss="modal"><?php echo _("Cancel"); ?></button>
|
||||
<button type="button" id="js-system-reset-confirm" data-message="<?php echo _("System reset in progress..."); ?>" class="btn btn-outline-danger btn-delete"><?php echo _("Reset"); ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
19
templates/system/reset.php
Normal file
19
templates/system/reset.php
Normal file
@ -0,0 +1,19 @@
|
||||
<!-- reset tab -->
|
||||
<div role="tabpanel" class="tab-pane" id="reset">
|
||||
<h4 class="mt-3"><?php echo _("Restore settings") ;?></h4>
|
||||
<?php if (!RASPI_MONITOR_ENABLED) : ?>
|
||||
<?php echo CSRFTokenFieldTag() ?>
|
||||
<div class="row">
|
||||
<div class="form-group col-lg-8 col-md-8">
|
||||
<label for="cbxhwmode"><?php echo _("To reset RaspAP to its initial configuration, click or tap the button below.") ;?></label>
|
||||
<?php getTooltip('Restores all access point (AP) service settings to their default values. This applies to hostapd, dhcpcd and dnsmasq.', 'tiphwmode', true); ?>
|
||||
<div class="small">
|
||||
<?php echo _("Custom files for optional components such as Ad Blocking, WireGuard or OpenVPN will remain on the system."); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button type="button" class="btn btn-danger" name="system-reset" data-toggle="modal" data-target="#system-confirm-reset" value="" /><?php echo _("Perform reset"); ?></button>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user