Added committed param to white ip

This commit is contained in:
Sergei Tsoganov 2023-07-07 16:05:06 +03:00
parent e00e44c9b8
commit 1c8a46bd89
12 changed files with 130 additions and 15 deletions

View file

@ -9,6 +9,7 @@
<th class="col-xs-4"><%= WhiteIp.human_attribute_name :ipv4 %></th>
<th class="col-xs-6"><%= WhiteIp.human_attribute_name :ipv6 %></th>
<th class="col-xs-2"><%= WhiteIp.human_attribute_name :interfaces %></th>
<th class="col-xs-2"><%= WhiteIp.human_attribute_name :committed %></th>
</tr>
</thead>
@ -26,6 +27,7 @@
<% end %>
</td>
<td><%= white_ip.interfaces.join(', ').upcase %></td>
<td class="text-right"><%= white_ip.committed %></td>
</tr>
<% end %>
</tbody>

View file

@ -26,7 +26,13 @@
.col-md-7
= f.check_box :interfaces, { multiple: true }, x, nil
= hidden_field_tag "white_ip[interfaces][]", nil
.form-group
.col-md-4.control-label
= f.label :committed
.col-md-7
= f.check_box :committed
%hr
.row
.col-md-8.text-right
= button_tag(t(:save), class: 'btn btn-primary')
= button_tag(t(:save), class: 'btn btn-primary')

View file

@ -22,3 +22,6 @@
%dt= WhiteIp.human_attribute_name :interfaces
%dd= @white_ip.interfaces.join(', ').upcase
%dt= WhiteIp.human_attribute_name :committed
%dd= @white_ip.committed