Skip to content

Commit f2f89a1

Browse files
committed
Correct link type is now selected when editing link
1 parent 68f8156 commit f2f89a1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

resources/views/components/pageitems/predefined-form.blade.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
<label for='button' class='form-label'>Select a predefined site</label>
2+
<?php use App\Models\Button; $button = Button::find($button_id); if(isset($button->name)){$buttonName = $button->name;}else{$buttonName = 0;} ?>
23

34
<select name='button' class='form-control'>
4-
5+
@if($buttonName != 0)<option value='{{$buttonName}}'>{{ucfirst($buttonName)}}</option>@endif
56
@foreach ($buttons as $b)
6-
@if(!in_array($b["name"], ["custom_website", "custom"]))
7+
@if(!in_array($b["name"], ["custom_website", "custom", $buttonName]))
78
<option class='button button-{{$b["name"]}}' value='{{$b["name"]}}' {{ $b["selected"] == true ? "selected" : ""}}>{{$b["title"]}}</option>
89
@endif
910
@endforeach

0 commit comments

Comments
 (0)