AUtomatically add "info" icon where required

This commit is contained in:
Stephen Beaver 2015-11-04 11:01:39 -05:00
parent b297143151
commit 0149ef4d2b
3 changed files with 18 additions and 4 deletions

View File

@ -291,7 +291,6 @@ display_top_tabs($tab_array);
<!-- Information section. Icon ID must be "showinfo" and the information <div> ID must be "infoblock".
That way jQuery (in pfenseHelpers.js) will automatically take care of the display. -->
<div>
<i class="fa fa-info-circle icon-pointer" style="color: #337AB7;; font-size:20px; margin-left: 10px; margin-bottom: 10px;" id="showinfo" title="<?=gettext('More information')?>"></i>
<div id="infoblock">
<?=print_info_box(gettext( 'Aliases act as placeholders for real hosts, networks or ports. They can be used to minimize the number ' .
'of changes that have to be made if a host, network or port changes. <br />' .

View File

@ -368,9 +368,18 @@ endforeach;
</div>
<div class="pull-right">
<a href="firewall_nat_edit.php?after=-1" class="btn btn-sm btn-success" title="<?=gettext('Add new rule')?>"><?=gettext('Add new rule')?></a>
<input name="del_x" type="submit" class="btn btn-danger btn-sm" value="<?=gettext("Delete selected rules"); ?>" />
<input type="submit" id="order-store" name="order-store" class="btn btn-primary btn-sm" value="<?=gettext("Save changes")?>" disabled="disabled" />
<a href="firewall_nat_edit.php?after=-1" class="btn btn-sm btn-success" title="<?=gettext('Add new rule')?>">
<i class="fa fa-plus" style="font-size:15px; vertical-align: middle; margin-right: 6px;"></i>
<?=gettext('Add')?>
</a>
<button name="del_x" type="submit" class="btn btn-danger btn-sm">
<i class="fa fa-trash" style="font-size:15px; vertical-align: middle; margin-right: 6px;"></i>
<?=gettext("Delete"); ?>
</button>
<button type="submit" id="order-store" name="order-store" class="btn btn-primary btn-sm" disabled="disabled">
<i class="fa fa-save" style="font-size:15px; vertical-align: middle; margin-right: 6px;"></i>
<?=gettext("Save")?>
</button>
</div>
</form>

View File

@ -366,6 +366,12 @@ $('[id^=delete]').click(function(event) {
});
// "More information" handlers
// If there is an infoblock, automatically add an info icon that toggles its display
if($('#infoblock').length != 0) {
$('#infoblock').before('<i class="fa fa-info-circle icon-pointer" style="color: #337AB7;; font-size:20px; margin-left: 10px; margin-bottom: 10px;" id="showinfo" title="More information"></i>');
}
// Hide information on page load
$('#infoblock').hide();