mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Convert system_certmanager.php to font awesome icons
Automatically add confirmation dialog to all fa-trash icons
This commit is contained in:
parent
c10cb19609
commit
0619c9db22
@ -327,3 +327,8 @@ form .btn + .btn {
|
||||
vertical-align: middle;
|
||||
margin-right: 6px;
|
||||
}
|
||||
|
||||
.fa-trash
|
||||
{
|
||||
color: red;
|
||||
}
|
||||
@ -268,7 +268,7 @@ display_top_tabs($tab_array);
|
||||
</td>
|
||||
<td>
|
||||
<a class="fa fa-pencil" title="<?=gettext("Edit alias"); ?>" href="firewall_aliases_edit.php?id=<?=$i?>"></a>
|
||||
<a class="fa fa-trash" title="<?=gettext("Delete alias")?>" href="?act=del&tab=<?=$tab?>&id=<?=$i?>" onclick="return confirm('<?=gettext("Are you sure you want to delete this alias?")?>')"></a>
|
||||
<a class="fa fa-trash" title="<?=gettext("Delete alias")?>" href="?act=del&tab=<?=$tab?>&id=<?=$i?>"></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif?>
|
||||
|
||||
7
src/usr/local/www/jquery/pfSense.js
vendored
7
src/usr/local/www/jquery/pfSense.js
vendored
@ -119,16 +119,16 @@ $(function() {
|
||||
input.change();
|
||||
});
|
||||
|
||||
// Add confirm to all btn-danger buttons
|
||||
// Add confirm to all btn-danger buttons and fa-trash icons
|
||||
// Use element title in the confirmation message, or if not available
|
||||
// the element value
|
||||
$('.btn-danger').on('click', function(e){
|
||||
$('.btn-danger, .fa-trash').on('click', function(e){
|
||||
var msg = $.trim(this.textContent);
|
||||
|
||||
if(!msg)
|
||||
var msg = $.trim(this.value).toLowerCase();
|
||||
|
||||
var q = 'Are you sure you wish to '+ msg +'?';
|
||||
var q = 'Are you Sure you wish to '+ msg +'?';
|
||||
|
||||
if ($(this).attr('title') != undefined)
|
||||
q = $(this).attr('title')+'?';
|
||||
@ -178,6 +178,7 @@ $(function() {
|
||||
$('input[type=checkbox][data-toggle="collapse"]:not(:checked)').each(function() {
|
||||
$( $(this).data('target') ).addClass('collapse');
|
||||
});
|
||||
|
||||
$('input[type=checkbox][data-toggle="disable"]:not(:checked)').each(function() {
|
||||
$( $(this).data('target') ).prop('disabled', true);
|
||||
});
|
||||
|
||||
@ -583,7 +583,7 @@ if (!($act == "new" || (($_POST['save'] == gettext("Save")) && $input_errors)))
|
||||
<th><?=gettext("Issuer")?></th>
|
||||
<th><?=gettext("Distinguished Name")?></th>
|
||||
<th><?=gettext("In Use")?></th>
|
||||
<th><?=gettext("Actions")?></th>
|
||||
<th class="col-sm-2"><?=gettext("Actions")?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@ -656,24 +656,14 @@ foreach($a_cert as $i => $cert):
|
||||
<?php endif?>
|
||||
</td>
|
||||
<td>
|
||||
<a href="system_certmanager.php?act=exp&id=<?=$i?>" class="btn btn-xs btn-default">
|
||||
<?=gettext("export")?>
|
||||
</a>
|
||||
<a href="system_certmanager.php?act=key&id=<?=$i?>" class="btn btn-xs btn-default">
|
||||
<?=gettext("export key")?>
|
||||
</a>
|
||||
<a href="system_certmanager.php?act=p12&id=<?=$i?>" class="btn btn-xs btn-default">
|
||||
<?=gettext("export p12")?>
|
||||
</a>
|
||||
<a href="system_certmanager.php?act=exp&id=<?=$i?>" class="fa fa-sign-in" title="<?=gettext("Export")?>"></a>
|
||||
<a href="system_certmanager.php?act=key&id=<?=$i?>" class="fa fa-key" title="<?=gettext("Export key")?>"></a>
|
||||
<a href="system_certmanager.php?act=p12&id=<?=$i?>" class="fa fa-key" title="<?=gettext("Export P12")?>"> P12</a>
|
||||
<?php if (!cert_in_use($cert['refid'])): ?>
|
||||
<a href="system_certmanager.php?act=del&id=<?=$i?>" class="btn btn-xs btn-danger">
|
||||
<?=gettext("delete")?>
|
||||
</a>
|
||||
<a href="system_certmanager.php?act=del&id=<?=$i?>" class="fa fa-trash" title="<?=gettext("Delete")?>"></a>
|
||||
<?php endif?>
|
||||
<?php if ($cert['csr']): ?>
|
||||
<a href="system_certmanager.php?act=csr&id=<?=$i?>" class="btn btn-xs btn-default">
|
||||
<?=gettext("update csr")?>
|
||||
</a>
|
||||
<a href="system_certmanager.php?act=csr&id=<?=$i?>" class="fa fa-refresh" title="<?=gettext("Update csr")?>"></a>
|
||||
<?php endif?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user