|
52 | 52 | <a class="btn btn-info btn-sm" href="{{ url_for('rules.reactivate_rule', rule_type=rtype_int, rule_id=rule.id) }}" role="button" data-bs-toggle="tooltip" data-bs-placement="top" title="set expiration"> |
53 | 53 | <i class="bi bi-clock table-icon"></i> |
54 | 54 | </a> |
55 | | - <form method="POST" action="{{ url_for('rules.delete_rule', rule_type=rtype_int, rule_id=rule.id) }}" style="display:inline;" onsubmit="return confirm('Are you sure you want to delete this rule?');"> |
56 | | - <input type="hidden" name="csrf_token" value="{{ csrf_token() }}"> |
57 | | - <button type="submit" class="btn btn-danger btn-sm" data-bs-toggle="tooltip" data-bs-placement="top" title="delete"> |
58 | | - <i class="bi bi-x-lg"></i> |
59 | | - </button> |
60 | | - </form> |
| 55 | + <a class="btn btn-danger btn-sm" href="{{ url_for('rules.delete_rule', rule_type=rtype_int, rule_id=rule.id, csrf_token=csrf_token()) }}" role="button" data-bs-toggle="tooltip" data-bs-placement="top" title="delete" onclick="return confirm('Are you sure you want to delete this rule?');"> |
| 56 | + <i class="bi bi-x-lg"></i> |
| 57 | + </a> |
61 | 58 | {% endif %} |
62 | 59 | {% if rule.comment %} |
63 | 60 | <button type="button" class="btn btn-info btn-sm" data-bs-toggle="tooltip" data-bs-placement="top" title="{{ rule.comment }}"> |
|
111 | 108 | <a class="btn btn-info btn-sm" href="{{ url_for('rules.reactivate_rule', rule_type=1, rule_id=rule.id) }}" role="button" data-bs-toggle="tooltip" data-bs-placement="top" title="set expiration"> |
112 | 109 | <i class="bi bi-clock table-icon"></i> |
113 | 110 | </a> |
114 | | - <form method="POST" action="{{ url_for('rules.delete_rule', rule_type=1, rule_id=rule.id) }}" style="display:inline;" onsubmit="return confirm('Are you sure you want to delete this rule?');"> |
115 | | - <input type="hidden" name="csrf_token" value="{{ csrf_token() }}"> |
116 | | - <button type="submit" class="btn btn-danger btn-sm" data-bs-toggle="tooltip" data-bs-placement="top" title="delete"> |
117 | | - <i class="bi bi-x-lg"></i> |
118 | | - </button> |
119 | | - </form> |
| 111 | + <a class="btn btn-danger btn-sm" href="{{ url_for('rules.delete_rule', rule_type=1, rule_id=rule.id, csrf_token=csrf_token()) }}" role="button" data-bs-toggle="tooltip" data-bs-placement="top" title="delete" onclick="return confirm('Are you sure you want to delete this rule?');"> |
| 112 | + <i class="bi bi-x-lg"></i> |
| 113 | + </a> |
120 | 114 | {% if rule.community.id in allowed_communities %} |
121 | | - <form method="POST" action="{{ url_for('rules.delete_and_whitelist', rule_type=1, rule_id=rule.id) }}" style="display:inline;" onsubmit="return confirm('Are you sure you want to whitelist and delete this rule?');"> |
122 | | - <input type="hidden" name="csrf_token" value="{{ csrf_token() }}"> |
123 | | - <button type="submit" class="btn btn-success btn-sm" data-bs-toggle="tooltip" data-bs-placement="top" title="whitelist and delete"> |
124 | | - <i class="bi bi-shield-x"></i> |
125 | | - </button> |
126 | | - </form> |
| 115 | + <a class="btn btn-success btn-sm" href="{{ url_for('rules.delete_and_whitelist', rule_type=1, rule_id=rule.id, csrf_token=csrf_token()) }}" role="button" data-bs-toggle="tooltip" data-bs-placement="top" title="whitelist and delete" onclick="return confirm('Are you sure you want to whitelist and delete this rule?');"> |
| 116 | + <i class="bi bi-shield-x"></i> |
| 117 | + </a> |
127 | 118 | {% endif %} |
128 | 119 | {% endif %} |
129 | 120 | {% if rule.comment %} |
|
162 | 153 | <a class="btn btn-info btn-sm" href="{{ url_for('whitelist.reactivate', wl_id=rule.id) }}" role="button" data-bs-toggle="tooltip" data-bs-placement="top" title="set expiration"> |
163 | 154 | <i class="bi bi-clock table-icon"></i> |
164 | 155 | </a> |
165 | | - <form method="POST" action="{{ url_for('whitelist.delete', wl_id=rule.id) }}" style="display:inline;" onsubmit="return confirm('Are you sure you want to delete this whitelist?');"> |
166 | | - <input type="hidden" name="csrf_token" value="{{ csrf_token() }}"> |
167 | | - <button type="submit" class="btn btn-danger btn-sm" data-bs-toggle="tooltip" data-bs-placement="top" title="delete"> |
168 | | - <i class="bi bi-x-lg"></i> |
169 | | - </button> |
170 | | - </form> |
| 156 | + <a class="btn btn-danger btn-sm" href="{{ url_for('whitelist.delete', wl_id=rule.id, csrf_token=csrf_token()) }}" role="button" data-bs-toggle="tooltip" data-bs-placement="top" title="delete" onclick="return confirm('Are you sure you want to delete this whitelist?');"> |
| 157 | + <i class="bi bi-x-lg"></i> |
| 158 | + </a> |
171 | 159 | {% endif %} |
172 | 160 | {% if rule.comment %} |
173 | 161 | <button type="button" class="btn btn-info btn-sm" data-bs-toggle="tooltip" data-bs-placement="top" title="{{ rule.comment }}"> |
|
0 commit comments