1
0
mirror of https://github.com/billz/raspap-webgui.git synced 2023-10-10 13:37:24 +02:00

Standardize UI elements

This commit is contained in:
billz 2017-11-04 20:24:23 +00:00
parent f6cfd65a55
commit d38ae7f334

187
includes/networking.php Executable file → Normal file
View File

@ -20,103 +20,106 @@ function DisplayNetworkingConfig(){
?> ?>
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-lg-12">
<div class="panel panel-primary"> <div class="panel panel-primary">
<div class="panel panel-heading"> <div class="panel panel-heading">
<i class="fa fa-sitemap fa-fw"></i> Configure Networking <i class="fa fa-sitemap fa-fw"></i> Configure Networking
</div> </div>
<div class="panel panel-body"> <div class="panel-body">
<div id="msgNetworking"></div> <div id="msgNetworking"></div>
<ul class="nav nav-tabs"> <ul class="nav nav-tabs">
<li role="presentation" class="active"><a href="#summary" aria-controls="summary" role="tab" data-toggle="tab">Summary</a></li> <li role="presentation" class="active"><a href="#summary" aria-controls="summary" role="tab" data-toggle="tab">Summary</a></li>
<?php <?php
foreach($interfaces as $interface) { foreach($interfaces as $interface) {
echo '<li role="presentation"><a href="#'.$interface.'" aria-controls="'.$interface.'" role="tab" data-toggle="tab">'.$interface.'</a></li>'; echo '<li role="presentation"><a href="#'.$interface.'" aria-controls="'.$interface.'" role="tab" data-toggle="tab">'.$interface.'</a></li>';
} }
?> ?>
</ul> </ul>
<div class="tab-content"> <div class="tab-content">
<div role="tabpanel" class="tab-pane active" id="summary"> <div role="tabpanel" class="tab-pane active" id="summary">
Current Settings:<br /> <h4>Current Settings</h4>
<?php <div class="row">
<?php
foreach($interfaces as $interface) { foreach($interfaces as $interface) {
echo '<div class="row"> echo '<div class="col-md-6">
<div class="col-md-6"> <div class="panel panel-default">
<div class="panel panel-primary"> <div class="panel-heading">'.$interface.'</div>
<div class="panel-heading">'.$interface.'</div> <div class="panel-body" id="'.$interface.'-summary"></div>
<div class="panel-body" id="'.$interface.'-summary"> </div>
</div>
</div>
</div>
</div>'; </div>';
} }
?> ?>
<a href="#" class="btn btn-success btn-lg" id="btnSummaryRefresh"><i class="fa fa-refresh"></i> Refresh</a> </div><!-- /.row -->
</div> <div class="col-lg-12">
<?php <div class="row">
foreach($interfaces as $interface) { <a href="#" class="btn btn-outline btn-primary" id="btnSummaryRefresh"><i class="fa fa-refresh"></i> Refresh</a>
echo '<div role="tabpanel" class="tab-pane" id="'.$interface.'"> </div><!-- /.row -->
<div class="row"> </div><!-- /.col-lg-12 -->
<div class="col-lg-6"> </div><!-- /.tab-pane -->
<form id="frm-'.$interface.'"> <?php
<div class="form-group"> foreach($interfaces as $interface) {
<h4>Adapter IP Address Settings:</h4> echo '
<div class="btn-group" data-toggle="buttons"> <div role="tabpanel" class="tab-pane fade in" id="'.$interface.'">
<label class="btn btn-primary"> <div class="row">
<input type="radio" name="'.$interface.'-addresstype" id="'.$interface.'-dhcp" autocomplete="off">DHCP <div class="col-lg-6">
</label> <form id="frm-'.$interface.'">
<label class="btn btn-primary"> <div class="form-group">
<input type="radio" name="'.$interface.'-addresstype" id="'.$interface.'-static" autocomplete="off">Static IP <h4>Adapter IP Address Settings</h4>
</label> <div class="btn-group" data-toggle="buttons">
</div> <label class="btn btn-primary">
<h4>Enable Fallback to Static Option:</h4> <input type="radio" name="'.$interface.'-addresstype" id="'.$interface.'-dhcp" autocomplete="off">DHCP
<div class="btn-group" data-toggle="buttons"> </label>
<label class="btn btn-primary"> <label class="btn btn-primary">
<input type="radio" name="'.$interface.'-dhcpfailover" id="'.$interface.'-failover" autocomplete="off">Enabled <input type="radio" name="'.$interface.'-addresstype" id="'.$interface.'-static" autocomplete="off">Static IP
</label> </label>
<label class="btn btn-warning"> </div><!-- /.btn-group -->
<input type="radio" name="'.$interface.'-dhcpfailover" id="'.$interface.'-nofailover" autocomplete="off">Disabled <h4>Enable Fallback to Static Option</h4>
</label> <div class="btn-group" data-toggle="buttons">
</div> <label class="btn btn-primary">
</div> <input type="radio" name="'.$interface.'-dhcpfailover" id="'.$interface.'-failover" autocomplete="off">Enabled
<hr /> </label>
<h4>Static IP Options</h4> <label class="btn btn-warning">
<div class="form-group"> <input type="radio" name="'.$interface.'-dhcpfailover" id="'.$interface.'-nofailover" autocomplete="off">Disabled
<label for="'.$interface.'-ipaddress">IP Address</label> </label>
<input type="text" class="form-control" id="'.$interface.'-ipaddress" placeholder="0.0.0.0"> </div><!-- /.btn-group -->
</div> </div><!-- /.form-group -->
<div class="form-group"> <hr />
<label for="'.$interface.'-netmask">Subnet Mask</label> <h4>Static IP Options</h4>
<input type="text" class="form-control" id="'.$interface.'-netmask" placeholder="255.255.255.0"> <div class="form-group">
</div> <label for="'.$interface.'-ipaddress">IP Address</label>
<div class="form-group"> <input type="text" class="form-control" id="'.$interface.'-ipaddress" placeholder="0.0.0.0">
<label for="'.$interface.'-gateway">Default Gateway</label> </div>
<input type="text" class="form-control" id="'.$interface.'-gateway" placeholder="0.0.0.0"> <div class="form-group">
</div> <label for="'.$interface.'-netmask">Subnet Mask</label>
<div class="form-group"> <input type="text" class="form-control" id="'.$interface.'-netmask" placeholder="255.255.255.0">
<label for="'.$interface.'-dnssvr">DNS Server</label> </div>
<input type="text" class="form-control" id="'.$interface.'-dnssvr" placeholder="0.0.0.0"> <div class="form-group">
</div> <label for="'.$interface.'-gateway">Default Gateway</label>
<div class="form-group"> <input type="text" class="form-control" id="'.$interface.'-gateway" placeholder="0.0.0.0">
<label for="'.$interface.'-dnssvralt">Alternate DNS Server</label> </div>
<input type="text" class="form-control" id="'.$interface.'-dnssvralt" placeholder="0.0.0.0"> <div class="form-group">
</div> <label for="'.$interface.'-dnssvr">DNS Server</label>
<a href="#" class="btn btn-primary btn-lg active intsave" data-int="'.$interface.'">Save Settings</a> <input type="text" class="form-control" id="'.$interface.'-dnssvr" placeholder="0.0.0.0">
<a href="#" class="btn btn-success btn-lg active intapply" data-int="'.$interface.'">Apply Settings</a> </div>
</form> <div class="form-group">
</div> <label for="'.$interface.'-dnssvralt">Alternate DNS Server</label>
</div> <input type="text" class="form-control" id="'.$interface.'-dnssvralt" placeholder="0.0.0.0">
</div>'; </div>
} <a href="#" class="btn btn-outline btn-primary intsave" data-int="'.$interface.'">Save Settings</a>
?> <a href="#" class="btn btn-warning intapply" data-int="'.$interface.'">Apply Settings</a>
</div> </form>
</div> </div>
</div> </div><!-- /.tab-panel -->
</div>';
}
?>
</div><!-- /.tab-content -->
</div><!-- /.panel-body -->
<div class="panel-footer">Information provided by /sys/class/net</div>
</div><!-- /.panel-primary -->
</div><!-- /.col-lg-12 -->
</div> </div>
</div>
<?php <?php
} }
?> ?>