Skip to content

Commit

Permalink
firewall: open dialog with uuid link, for opnsense#1720
Browse files Browse the repository at this point in the history
  • Loading branch information
AdSchellevis committed Mar 10, 2020
1 parent 455518f commit 00e242f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ public function performValidation($validateFullModel = false)
$rule->source_net->__reference
));
}

}
}
return $messages;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
<script>
$( document ).ready(function() {
$("#grid-rules").UIBootgrid({
let grid = $("#grid-rules").UIBootgrid({
search:'/api/firewall/filter/searchItem/',
get:'/api/firewall/filter/getItem/',
set:'/api/firewall/filter/setItem/',
add:'/api/firewall/filter/addItem/',
del:'/api/firewall/filter/delItem/',
toggle:'/api/firewall/filter/toggleItem/'
});

// open edit dialog when opened with a uuid reference
if (window.location.hash !== "" && window.location.hash.split("-").length >= 4) {
grid.on('loaded.rs.jquery.bootgrid', function(){
$(".command-edit:eq(0)").clone(true).data('row-id', window.location.hash).click();
});
}
});
</script>

Expand Down

0 comments on commit 00e242f

Please sign in to comment.