use template for themes page

This commit is contained in:
glaszig 2019-08-18 23:35:58 +01:00
parent 0608b6cb22
commit 2215b11c21
2 changed files with 29 additions and 31 deletions

View file

@ -22,35 +22,5 @@ function DisplayThemeConfig()
break;
}
?>
<div class="row">
<div class="col-lg-12">
<div class="panel panel-primary">
<div class="panel-heading"><i class="fa fa-wrench fa-fw"></i> <?php echo _("Change Theme"); ?></div>
<div class="panel-body">
<h4><?php echo _("Theme settings"); ?></h4>
<div class="row">
<div class="form-group col-md-6">
<label for="code"><?php echo _("Select a theme"); ?></label>
<select class="form-control" id="theme-select"><?php echo _("Select a Theme"); ?>
<option value="default" class="theme-link"<?php echo $cselected; ?>>RaspAP (default)</option>
<option value="hackernews" class="theme-link"<?php echo $hselected; ?>>HackerNews</option>
<option value="terminal" class="theme-link"<?php echo $tselected; ?>>Terminal</option>
</select>
</div>
</div>
<form action="?page=system_info" method="POST">
<?php echo CSRFTokenFieldTag() ?>
<input type="button" class="btn btn-outline btn-primary" value="<?php echo _("Refresh"); ?>" onclick="document.location.reload(true)" />
</form>
</div><!-- /.panel-body -->
</div><!-- /.panel-primary -->
</div><!-- /.col-lg-12 -->
</div><!-- /.row -->
<?php
echo renderTemplate("themes", compact("cselected", "hselected", "tselected"));
}

28
templates/themes.php Normal file
View file

@ -0,0 +1,28 @@
<div class="row">
<div class="col-lg-12">
<div class="panel panel-primary">
<div class="panel-heading"><i class="fa fa-wrench fa-fw"></i> <?php echo _("Change Theme"); ?></div>
<div class="panel-body">
<h4><?php echo _("Theme settings"); ?></h4>
<div class="row">
<div class="form-group col-md-6">
<label for="code"><?php echo _("Select a theme"); ?></label>
<select class="form-control" id="theme-select"><?php echo _("Select a Theme"); ?>
<option value="default" class="theme-link"<?php echo $cselected; ?>>RaspAP (default)</option>
<option value="hackernews" class="theme-link"<?php echo $hselected; ?>>HackerNews</option>
<option value="terminal" class="theme-link"<?php echo $tselected; ?>>Terminal</option>
</select>
</div>
</div>
<form action="?page=system_info" method="POST">
<?php echo CSRFTokenFieldTag() ?>
<input type="button" class="btn btn-outline btn-primary" value="<?php echo _("Refresh"); ?>" onclick="document.location.reload(true)" />
</form>
</div><!-- /.panel-body -->
</div><!-- /.panel-primary -->
</div><!-- /.col-lg-12 -->
</div><!-- /.row -->