ui: primary add buttons for #4216

This commit is contained in:
Franco Fichtner 2021-06-14 15:23:05 +02:00
parent de381bc2b1
commit 0ce80dfd3a
7 changed files with 56 additions and 60 deletions

View File

@ -1,30 +1,28 @@
{#
OPNsense® is Copyright © 2014 2015 by Deciso B.V.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
#}
# Copyright (c) 2014-2015 by Deciso B.V.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
# AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
# OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#}
<script>
@ -185,8 +183,8 @@ POSSIBILITY OF SUCH DAMAGE.
<tr>
<td></td>
<td>
<button data-action="add" type="button" class="btn btn-xs btn-default"><span class="fa fa-plus"></span></button>
<button data-action="deleteSelected" type="button" class="btn btn-xs btn-default"><span class="fa fa-trash-o"></span></button>
<button data-action="add" type="button" class="btn btn-xs btn-primary"><span class="fa fa-fw fa-plus"></span></button>
<button data-action="deleteSelected" type="button" class="btn btn-xs btn-default"><span class="fa fa-fw fa-trash-o"></span></button>
</td>
</tr>
</tfoot>
@ -209,8 +207,8 @@ POSSIBILITY OF SUCH DAMAGE.
<tr>
<td></td>
<td>
<button id="addTemplateAct" type="button" class="btn btn-xs btn-default"><span class="fa fa-plus"></span></button>
<button id="downloadTemplateAct" type="button" class="btn btn-xs btn-default"><span class="fa fa-download"></span></button>
<button id="addTemplateAct" type="button" class="btn btn-xs btn-primary"><span class="fa fa-fw fa-plus"></span></button>
<button id="downloadTemplateAct" type="button" class="btn btn-xs btn-default"><span class="fa fa-fw fa-download"></span></button>
</td>
</tr>
</tfoot>

View File

@ -111,11 +111,11 @@
<tr>
<td></td>
<td>
<button data-action="add" type="button" class="btn btn-xs btn-default">
<span class="fa fa-plus"></span>
<button data-action="add" type="button" class="btn btn-xs btn-primary">
<span class="fa fa-fw fa-plus"></span>
</button>
<button data-action="deleteSelected" type="button" class="btn btn-xs btn-default">
<span class="fa fa-trash-o"></span>
<span class="fa fa-fw fa-trash-o"></span>
</button>
</td>
</tr>

View File

@ -753,7 +753,7 @@ include("head.inc");
<th><?=gettext("Pool End");?></th>
<th><?=gettext("Description");?></th>
<th class="text-nowrap">
<a href="services_dhcp.php?if=<?=htmlspecialchars($if);?>&amp;act=newpool" class="btn btn-default btn-xs"><i class="fa fa-plus fa-fw"></i></a>
<a href="services_dhcp.php?if=<?=htmlspecialchars($if);?>&amp;act=newpool" class="btn btn-primary btn-xs"><i class="fa fa-plus fa-fw"></i></a>
</th>
</tr>
</thead>
@ -1188,7 +1188,7 @@ include("head.inc");
<td><?=gettext("Hostname");?></td>
<td><?=gettext("Description");?></td>
<td class="text-nowrap">
<a href="services_dhcp_edit.php?if=<?=htmlspecialchars($if);?>" class="btn btn-default btn-xs"><i class="fa fa-plus fa-fw"></i></a>
<a href="services_dhcp_edit.php?if=<?=htmlspecialchars($if);?>" class="btn btn-primary btn-xs"><i class="fa fa-plus fa-fw"></i></a>
</td>
</tr>
<?php

View File

@ -784,7 +784,7 @@ if (isset($config['interfaces'][$if]['dhcpd6track6allowoverride'])) {
<td><?=gettext("Hostname");?></td>
<td><?=gettext("Description");?></td>
<td class="text-nowrap">
<a href="services_dhcpv6_edit.php?if=<?=$if;?>" class="btn btn-default btn-xs"><i class="fa fa-plus fa-fw"></i></a>
<a href="services_dhcpv6_edit.php?if=<?=$if;?>" class="btn btn-primary btn-xs"><i class="fa fa-plus fa-fw"></i></a>
</td>
</tr>
<?php

View File

@ -387,7 +387,7 @@ $( document ).ready(function() {
<td><strong><?= gettext('IP') ?></strong></td>
<td><strong><?= gettext('Description') ?></strong></td>
<td class="text-nowrap">
<a href="services_dnsmasq_edit.php" class="btn btn-default btn-xs"><i class="fa fa-plus fa-fw"></i></a>
<a href="services_dnsmasq_edit.php" class="btn btn-primary btn-xs"><i class="fa fa-plus fa-fw"></i></a>
</td>
</tr>
<?php foreach (config_read_array('dnsmasq', 'hosts') as $i => $hostent): ?>
@ -439,7 +439,7 @@ $( document ).ready(function() {
<td><strong><?= gettext('IP') ?></strong></td>
<td><strong><?= gettext('Description') ?></strong></td>
<td class="text-nowrap">
<a href="services_dnsmasq_domainoverride_edit.php" class="btn btn-default btn-xs">
<a href="services_dnsmasq_domainoverride_edit.php" class="btn btn-primary btn-xs">
<i class="fa fa-plus fa-fw"></i>
</a>
</td>

View File

@ -153,7 +153,7 @@ include_once("head.inc");
<td><strong><?= gettext('Value') ?></strong></td>
<td><strong><?= gettext('Description') ?></strong></td>
<td class="text-nowrap">
<a href="services_unbound_host_edit.php" class="btn btn-default btn-xs"><i class="fa fa-plus fa-fw"></i></a>
<a href="services_unbound_host_edit.php" class="btn btn-primary btn-xs"><i class="fa fa-plus fa-fw"></i></a>
</td>
</tr>
<?php foreach ($a_hosts as $i => $hostent): ?>
@ -223,7 +223,7 @@ include_once("head.inc");
<td><strong><?= gettext('IP') ?></strong></td>
<td><strong><?= gettext('Description') ?></strong></td>
<td class="text-nowrap">
<a href="services_unbound_domainoverride_edit.php" class="btn btn-default btn-xs"><i class="fa fa-plus fa-fw"></i></a>
<a href="services_unbound_domainoverride_edit.php" class="btn btn-primary btn-xs"><i class="fa fa-plus fa-fw"></i></a>
</td>
</tr>
<?php foreach ($a_domains as $i => $doment): ?>

View File

@ -445,6 +445,10 @@ $( document ).ready(function() {
<?= $ph1ent['descr'] ?>
</td>
<td class="text-nowrap">
<a href="vpn_ipsec_phase2.php?ikeid=<?=$ph1ent['ikeid']; ?><?= isset($ph1ent['mobile'])?"&amp;mobile=true":"";?>" class="btn btn-primary btn-xs"
title="<?=gettext("add phase 2 entry"); ?>" data-toggle="tooltip">
<i class="fa fa-plus fa-fw"></i>
</a>
<button data-id="<?=$i; ?>" data-act="move" type="submit" class="act_move btn btn-default btn-xs"
title="<?=gettext("Move selected entries before this");?>" data-toggle="tooltip">
<i class="fa fa-arrow-left fa-fw"></i>
@ -453,22 +457,16 @@ $( document ).ready(function() {
title="<?= html_safe(gettext('Edit')) ?>" data-toggle="tooltip">
<i class="fa fa-pencil fa-fw"></i>
</a>
<button data-id="<?=$i; ?>" title="<?= html_safe(gettext('Delete')) ?>" data-toggle="tooltip"
type="submit" class="act_delete_p1 btn btn-default btn-xs">
<i class="fa fa-trash fa-fw"></i>
</button>
<?php if (!isset($ph1ent['mobile'])):
?>
<?php if (!isset($ph1ent['mobile'])): ?>
<a href="vpn_ipsec_phase1.php?dup=<?=$i; ?>" class="btn btn-default btn-xs"
title="<?= html_safe(gettext('Clone')) ?>" data-toggle="tooltip">
<i class="fa fa-clone fa-fw"></i>
</a>
<?php
endif ?>
<a href="vpn_ipsec_phase2.php?ikeid=<?=$ph1ent['ikeid']; ?><?= isset($ph1ent['mobile'])?"&amp;mobile=true":"";?>" class="btn btn-default btn-xs"
title="<?=gettext("add phase 2 entry"); ?>" data-toggle="tooltip">
<i class="fa fa-plus fa-fw"></i>
</a>
<?php endif ?>
<button data-id="<?=$i; ?>" title="<?= html_safe(gettext('Delete')) ?>" data-toggle="tooltip"
type="submit" class="act_delete_p1 btn btn-default btn-xs">
<i class="fa fa-trash fa-fw"></i>
</button>
</td>
</tr>
<?php
@ -563,14 +561,14 @@ $( document ).ready(function() {
class="btn btn-default btn-xs">
<i class="fa fa-pencil fa-fw"></i>
</a>
<button data-id="<?=$ph2index; ?>" type="submit" class="act_delete_p2 btn btn-default btn-xs"
title="<?= html_safe(gettext('Delete')) ?>" data-toggle="tooltip">
<i class="fa fa-trash fa-fw"></i>
</button>
<a href="vpn_ipsec_phase2.php?dup=<?=$ph2ent['uniqid']; ?>" class="btn btn-default btn-xs"
title="<?= html_safe(gettext('Clone')) ?>" data-toggle="tooltip">
<i class="fa fa-clone fa-fw"></i>
</a>
<button data-id="<?=$ph2index; ?>" type="submit" class="act_delete_p2 btn btn-default btn-xs"
title="<?= html_safe(gettext('Delete')) ?>" data-toggle="tooltip">
<i class="fa fa-trash fa-fw"></i>
</button>
</td>
</tr>
<?php
@ -582,6 +580,10 @@ $( document ).ready(function() {
<td colspan="4" class="hidden-xs"></td>
<td colspan="4"> </td>
<td class="text-nowrap">
<a href="vpn_ipsec_phase1.php" title="<?=gettext("add new phase 1 entry");?>" data-toggle="tooltip"
class="btn btn-primary btn-xs">
<i class="fa fa-plus fa-fw"></i>
</a>
<button
type="submit"
data-id="<?=$i;?>"
@ -598,10 +600,6 @@ $( document ).ready(function() {
class="btn btn-default btn-xs">
<i class="fa fa-trash fa-fw"></i>
</button>
<a href="vpn_ipsec_phase1.php" title="<?=gettext("add new phase 1 entry");?>" data-toggle="tooltip"
class="btn btn-default btn-xs">
<i class="fa fa-plus fa-fw"></i>
</a>
</td>
</tr>
<tr>