mirror of
https://github.com/RaspAP/raspap-webgui.git
synced 2024-11-21 23:20:22 +00:00
use template for admin page
This commit is contained in:
parent
2215b11c21
commit
e4e9b5c5c1
2 changed files with 40 additions and 41 deletions
|
@ -32,45 +32,6 @@ function DisplayAuthConfig($username, $password)
|
|||
$status->addMessage('Old password does not match', 'danger');
|
||||
}
|
||||
}
|
||||
?>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading"><i class="fa fa-lock fa-fw"></i><?php echo _("Configure Auth"); ?></div>
|
||||
<div class="panel-body">
|
||||
<p><?php $status->showMessages(); ?></p>
|
||||
<form role="form" action="?page=auth_conf" method="POST">
|
||||
<?php echo CSRFTokenFieldTag() ?>
|
||||
<div class="row">
|
||||
<div class="form-group col-md-4">
|
||||
<label for="username"><?php echo _("Username"); ?></label>
|
||||
<input type="text" class="form-control" name="username" value="<?php echo htmlspecialchars($username, ENT_QUOTES); ?>"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-group col-md-4">
|
||||
<label for="password"><?php echo _("Old password"); ?></label>
|
||||
<input type="password" class="form-control" name="oldpass"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-group col-md-4">
|
||||
<label for="password"><?php echo _("New password"); ?></label>
|
||||
<input type="password" class="form-control" name="newpass"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-group col-md-4">
|
||||
<label for="password"><?php echo _("Repeat new password"); ?></label>
|
||||
<input type="password" class="form-control" name="newpassagain"/>
|
||||
</div>
|
||||
</div>
|
||||
<input type="submit" class="btn btn-outline btn-primary" name="UpdateAdminPassword" value="<?php echo _("Save settings"); ?>" />
|
||||
</form>
|
||||
</div><!-- /.panel-body -->
|
||||
</div><!-- /.panel-default -->
|
||||
</div><!-- /.col-lg-12 -->
|
||||
</div><!-- /.row -->
|
||||
<?php
|
||||
}
|
||||
|
||||
echo renderTemplate("admin", compact("status", "username"));
|
||||
}
|
||||
|
|
38
templates/admin.php
Normal file
38
templates/admin.php
Normal file
|
@ -0,0 +1,38 @@
|
|||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading"><i class="fa fa-lock fa-fw"></i><?php echo _("Configure Auth"); ?></div>
|
||||
<div class="panel-body">
|
||||
<p><?php $status->showMessages(); ?></p>
|
||||
<form role="form" action="?page=auth_conf" method="POST">
|
||||
<?php echo CSRFTokenFieldTag() ?>
|
||||
<div class="row">
|
||||
<div class="form-group col-md-4">
|
||||
<label for="username"><?php echo _("Username"); ?></label>
|
||||
<input type="text" class="form-control" name="username" value="<?php echo htmlspecialchars($username, ENT_QUOTES); ?>"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-group col-md-4">
|
||||
<label for="password"><?php echo _("Old password"); ?></label>
|
||||
<input type="password" class="form-control" name="oldpass"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-group col-md-4">
|
||||
<label for="password"><?php echo _("New password"); ?></label>
|
||||
<input type="password" class="form-control" name="newpass"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-group col-md-4">
|
||||
<label for="password"><?php echo _("Repeat new password"); ?></label>
|
||||
<input type="password" class="form-control" name="newpassagain"/>
|
||||
</div>
|
||||
</div>
|
||||
<input type="submit" class="btn btn-outline btn-primary" name="UpdateAdminPassword" value="<?php echo _("Save settings"); ?>" />
|
||||
</form>
|
||||
</div><!-- /.panel-body -->
|
||||
</div><!-- /.panel-default -->
|
||||
</div><!-- /.col-lg-12 -->
|
||||
</div><!-- /.row -->
|
Loading…
Reference in a new issue