Correct link type is now selected when editing link

This commit is contained in:
Julian Prieber 2022-11-11 15:37:13 +01:00
parent 68f815613c
commit f2f89a19c2
1 changed files with 3 additions and 2 deletions

View File

@ -1,9 +1,10 @@
<label for='button' class='form-label'>Select a predefined site</label>
<?php use App\Models\Button; $button = Button::find($button_id); if(isset($button->name)){$buttonName = $button->name;}else{$buttonName = 0;} ?>
<select name='button' class='form-control'>
@if($buttonName != 0)<option value='{{$buttonName}}'>{{ucfirst($buttonName)}}</option>@endif
@foreach ($buttons as $b)
@if(!in_array($b["name"], ["custom_website", "custom"]))
@if(!in_array($b["name"], ["custom_website", "custom", $buttonName]))
<option class='button button-{{$b["name"]}}' value='{{$b["name"]}}' {{ $b["selected"] == true ? "selected" : ""}}>{{$b["title"]}}</option>
@endif
@endforeach