generic buttons for all tab panes in dhcp

This commit is contained in:
glaszig 2020-02-29 19:30:28 +01:00
parent a45e3a5e32
commit 4cd38dc8c6

View file

@ -1,3 +1,14 @@
<?php ob_start() ?>
<?php if (!RASPI_MONITOR_ENABLED) : ?>
<input type="submit" class="btn btn-outline btn-primary" value="<?php echo _("Save settings"); ?>" name="savedhcpdsettings" />
<?php if ($dnsmasq_state) : ?>
<input type="submit" class="btn btn-warning" value="<?php echo _("Stop dnsmasq") ?>" name="stopdhcpd" />
<?php else : ?>
<input type="submit" class="btn btn-success" value="<?php echo _("Start dnsmasq") ?>" name="startdhcpd" />
<?php endif ?>
<?php endif ?>
<?php $buttons = ob_get_clean(); ob_end_clean() ?>
<div class="row"> <div class="row">
<div class="col-lg-12"> <div class="col-lg-12">
<div class="card"> <div class="card">
@ -85,14 +96,8 @@
</div> </div>
</div> </div>
<?php if (!RASPI_MONITOR_ENABLED) : ?> <?php echo $buttons ?>
<input type="submit" class="btn btn-outline btn-primary" value="<?php echo _("Save settings"); ?>" name="savedhcpdsettings" />
<?php if ($dnsmasq_state) : ?>
<input type="submit" class="btn btn-warning" value="<?php echo _("Stop dnsmasq") ?>" name="stopdhcpd" />
<?php else : ?>
<input type="submit" class="btn btn-success" value="<?php echo _("Start dnsmasq") ?>" name="startdhcpd" />
<?php endif ?>
<?php endif ?>
</div><!-- /.tab-pane --> </div><!-- /.tab-pane -->
@ -153,6 +158,8 @@
</template> </template>
</div><!-- /.row --> </div><!-- /.row -->
<?php echo $buttons ?>
</div><!-- /.tab-pane | advanded tab --> </div><!-- /.tab-pane | advanded tab -->
<div class="tab-pane fade" id="client-list"> <div class="tab-pane fade" id="client-list">
@ -236,16 +243,8 @@
</div> </div>
</template> </template>
<?php if (!RASPI_MONITOR_ENABLED) : ?> <?php echo $buttons ?>
<input type="submit" class="btn btn-outline btn-primary" value="<?php echo _("Save settings"); ?>" name="savedhcpdsettings" />
<?php
if ($dnsmasq_state) {
echo '<input type="submit" class="btn btn-warning" value="' . _("Stop dnsmasq") . '" name="stopdhcpd" />';
} else {
echo'<input type="submit" class="btn btn-success" value="' . _("Start dnsmasq") . '" name="startdhcpd" />';
}
?>
<?php endif ?>
</div> </div>
</div><!-- /.tab-content --> </div><!-- /.tab-content -->