raspap-webgui-mirror/templates/provider.php

52 lines
2.7 KiB
PHP
Raw Normal View History

2023-10-13 17:46:44 +00:00
<?php ob_start() ?>
<?php if (!RASPI_MONITOR_ENABLED) : ?>
2023-10-25 13:00:58 +00:00
<input type="submit" <?php echo $ctlState; ?> class="btn btn-outline btn-primary <?php echo $ctlState; ?>" name="SaveProviderSettings" value="<?php echo _("Save settings"); ?>" />
<?php if ($serviceStatus == 'down') : ?>
2023-10-25 13:00:58 +00:00
<input type="submit" <?php echo $ctlState; ?> class="btn btn-success <?php echo $ctlState; ?>" name="StartProviderVPN" value="<?php echo sprintf(_("Connect %s"), $providerName); ?>" />
<?php else : ?>
2023-10-25 13:00:58 +00:00
<input type="submit" <?php echo $ctlState; ?> class="btn btn-warning <?php echo $ctlState; ?>" name="StopProviderVPN" value="<?php echo sprintf(_("Disconnect %s"), $providerName); ?>" />
<?php endif; ?>
2023-10-13 17:46:44 +00:00
<?php endif ?>
<?php $buttons = ob_get_clean(); ob_end_clean() ?>
<div class="row">
<div class="col-lg-12">
<div class="card">
<div class="card-header">
<div class="row">
<div class="col">
<i class="fas fa-shield-alt fa-fw me-2"></i><?php echo _($providerName); ?>
2023-10-13 17:46:44 +00:00
</div>
<div class="col">
<button class="btn btn-light btn-icon-split btn-sm service-status float-end">
2023-10-13 17:46:44 +00:00
<span class="icon text-gray-600"><i class="fas fa-circle service-status-<?php echo $serviceStatus ?>"></i></span>
2023-10-16 08:46:15 +00:00
<span class="text service-status"><?php echo strtolower($providerName); ?> <?php echo _($statusDisplay) ?></span>
2023-10-13 17:46:44 +00:00
</button>
</div>
</div><!-- /.row -->
</div><!-- /.card-header -->
<div class="card-body">
<?php $status->showMessages(); ?>
<form role="form" action="provider_conf" enctype="multipart/form-data" method="POST">
<?php echo CSRFTokenFieldTag() ?>
<!-- Nav tabs -->
<ul class="nav nav-tabs">
<li class="nav-item"><a class="nav-link active" id="clienttab" href="#providerclient" data-bs-toggle="tab"><?php echo _("Settings"); ?></a></li>
<li class="nav-item"><a class="nav-link" id="loggingtab" href="#providerstatus" data-bs-toggle="tab"><?php echo _("Status"); ?></a></li>
2023-10-13 17:46:44 +00:00
</ul>
<!-- Tab panes -->
<div class="tab-content">
<?php echo renderTemplate("provider/general", $__template_data) ?>
<?php echo renderTemplate("provider/status", $__template_data) ?>
</div><!-- /.tab-content -->
<?php echo $buttons ?>
</form>
</div><!-- /.card-body -->
2023-10-25 13:00:58 +00:00
<div class="card-footer"><?php echo sprintf( _("Information provided by %s"), strtolower($providerName)); ?></div>
2023-10-13 17:46:44 +00:00
</div><!-- /.card -->
</div><!-- /.col-lg-12 -->
</div><!-- /.row -->