我有一个按钮来删除“删除注册类型”以删除注册类型。单击此按钮时,它会显示一个模式,供用户确认他要删除注册类型。
但是它不能正常工作,例如对于有问题的会议,有两种注册类型(普通和加号),并且当用户单击“删除注册类型”按钮时,注册类型为“普通”或“加号” “模式出现,并且” yes“按钮的链接始终相同,具有相同的注册类型ID,例如” https://proj.test/conference/destroy/1/rtypes“。
但是相对于注册类型“ general”的模式应在模式中显示“ https://proj.test/conference/destroy/1/rtypes”,相对于注册类型“ plus”的模式应在模式中显示“ https://proj.test/conference/destroy/2/rtypes”。
您知道问题出在哪里吗?
<div class="form-group col col-lg-6">
<label for="registration_types">Registration types</label>
<div class="hide-first">
@foreach($registrationType as $rtype)
<div class="form-check">
<input {{ (old('radiobutton') && old('radiobutton') == $rtype->id) ? 'checked' : '' }} class="form-check-input radio" type="radio" name="radiobutton" value="{{ $rtype->id }}" id="{{$rtype->id}}">
<label class="form-check-label" for="exampleRadios1">
<span>{{$rtype->name}} </span><span><a data-toggle="modal" class="btn btn-sm btn-outline-light-gray"
data-target="#removeRtype">
<i class="fa fa-times" aria-hidden="true"></i> Remove registration type</a></span>
</label>
</div>
<div class="modal fade bd-example-modal-lg" id="removeRtype" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
<div class="modal-dialog modal-sm">
<div class="modal-content">
<div class="modal-body">
<div class="container">
<div class="row d-flex justify-content-center">
<p>Do you want to remove the registration type?</p>
<button class="btn btn-outline-primary" id="cancel_remove" href="#" data-dismiss="modal">No</button>
<a class="btn btn-primary ml-2" id="confirm_remove" href="{{route('rtype.remove', ['rtypeID' => $rtype->id])}}">Yes</a>
</div>
</div>
</div>
</div>
</div>
</div>
@endforeach
</div>
</div>