Skip to content

Commit

Permalink
Merge pull request #526 from inex/issue-524
Browse files Browse the repository at this point in the history
[BF] - patch-panel/list throws exception if no patch panels defined
  • Loading branch information
nickhilliard authored May 27, 2019
2 parents 2c87997 + 6ed6f7b commit 55c7962
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions resources/views/patch-panel/index.foil.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@
</a>

<?php if( $pp->getActive() ): ?>
<a class="btn btn-white list-delete" id='list-delete-<?= $pp->getId() ?>' href="#" title="Make Inactive">
<a class="btn btn-white list-delete" id='list-delete-<?= $pp->getId() ?>' href="<?= route( 'patch-panel@change-status' , [ 'id' => $pp->getId(), 'status' => ( $pp->getActive() ? '0' : '1' ) ] ) ?>" title="Make Inactive">
<i class="fa fa-trash"></i>
</a>
<?php else: ?>
Expand Down Expand Up @@ -249,10 +249,8 @@
$( '#patch-panel-list' ).on( 'click', '.list-delete', function( event ) {

event.preventDefault();
let ppid = ( this.id ).substring( 12 );
let url = "<?= route( 'patch-panel@change-status' , [ 'id' => $pp->getId(), 'status' => ( $pp->getActive() ? '0' : '1' ) ] ) ?>";
let url = $(this).attr('href');

console.log($(this).attr('href'));
bootbox.dialog({
message: 'Are you sure that you want to delete this Patch Panel ? It will become deactivated.',
title: "Delete Patch Panel",
Expand Down

0 comments on commit 55c7962

Please sign in to comment.