Commit bf937657 authored by Franco Fichtner's avatar Franco Fichtner

www: add print_content_box for naturally-padded content

parent aceea376
...@@ -218,6 +218,17 @@ function print_alert_box($msg, $alert = 'warning', $button = '') ...@@ -218,6 +218,17 @@ function print_alert_box($msg, $alert = 'warning', $button = '')
EOFnp; EOFnp;
} }
function print_content_box($msg)
{
echo <<<EOFnp
<div class="table-responsive">
<table class="table table-striped">
<tr><td>{$msg}</td></tr>
</table>
</div>
EOFnp;
}
function print_info_box_apply($msg) function print_info_box_apply($msg)
{ {
$iface = !empty($_POST['if']) ? $_POST['if'] : (!empty($_GET['if']) ? $_GET['if'] : ''); $iface = !empty($_POST['if']) ? $_POST['if'] : (!empty($_GET['if']) ? $_GET['if'] : '');
......
...@@ -463,9 +463,9 @@ include("head.inc"); ...@@ -463,9 +463,9 @@ include("head.inc");
<div class="tab-content content-box col-xs-12"> <div class="tab-content content-box col-xs-12">
<form method="post" name="iform" id="iform"> <form method="post" name="iform" id="iform">
<?php if (!empty($config['dhcrelay6']['enabled'])): ?> <?php if (!empty($config['dhcrelay6']['enabled'])): ?>
<p><?= gettext('DHCP Relay is currently enabled. Cannot enable the DHCP Server service while the DHCP Relay is enabled on any interface.') ?></p> <?php print_content_box(gettext('DHCP Relay is currently enabled. Cannot enable the DHCP Server service while the DHCP Relay is enabled on any interface.')); ?></p>
<?php elseif (count($tab_array_main) == 0):?> <?php elseif (count($tab_array_main) == 0):?>
<?php print_info_box(("No interfaces found with a static IPv6 address.")); ?> <?php print_content_box(gettext('No interfaces found with a static IPv6 address.')); ?>
<?php else: ?> <?php else: ?>
<div class="table-responsive"> <div class="table-responsive">
<table class="table table-striped"> <table class="table table-striped">
......
...@@ -193,7 +193,7 @@ include("head.inc"); ...@@ -193,7 +193,7 @@ include("head.inc");
<div class="tab-content content-box col-xs-12"> <div class="tab-content content-box col-xs-12">
<form method="post" name="iform" id="iform"> <form method="post" name="iform" id="iform">
<?php if (count($tab_array_main) == 0):?> <?php if (count($tab_array_main) == 0):?>
<?php print_info_box(("No interfaces found with a static IPv6 address.")); ?> <?php print_content_box(gettext('No interfaces found with a static IPv6 address.')); ?>
<?php else: ?> <?php else: ?>
<div class="table-responsive"> <div class="table-responsive">
<table class="table table-striped"> <table class="table table-striped">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment