试图在模态中传递id,但它破坏了模态

时间:2019-12-22 23:05:12

标签: html mysql laravel bootstrap-4 bootstrap-modal

我面临一个奇怪的问题,我正在尝试将来自数据库的ID传递给模式。我在href中传递值,以便href将使用该ID打开模式。

它可以工作,但是问题是当我在模式中通过href传递值时,我的模式样式会中断,如果我没有id的话,模式也可以正常工作。 谢谢大家的帮助!

@foreach($users as $user)
<tr value="{{ $user->id }}">
    <td data - label="Name"> {{ $user -> name }}</td>
    <td data - label="Email"> {{ $user -> email }}</td>
    <td data - label="CV file"> {{ str_limit($user -> tutor['CV_file'], 5) }}</td>
    <td data - label="Created at"> {{ $user -> created_at }}</td>

    <td data - label="Action">
        <a href="{{ route('admin.users.approve', $user->id) }}" class="btn btn-outline-info"> Approve </a>
        <a href="#sign-in-dialog_{{ $user->id }}" class="btn btn-outline-danger popup-with-zoom-anim">
            <span>Reject
            </span>
        </a>
    </td>
</tr>
<!--Reject Tutor Popup==================================================-->
<div id="sign-in-dialog_{{ $user->id }}" class="zoom-anim-dialog mfp-hide dialog-with-tabs">

    <!--Tabs -->
    <div class="sign-in-form">
        <div class="popup-tabs-container">
            <!--Login -->
            <div class="popup-tab-content modal-body">
                <!--Welcome Text-- >
                <div class="welcome-text" >
                <h3>Reject This User < /h3>
                <span> Reason for Rejection </span>
                < /div>

                < !--Form -->
                <form action="{{ route('rejectTutor',$user->id) }}" METHOD="POST">
                    @csrf
                    <input type="text" name="to" value="{{ $user->email }}">

                    <div class="input-with-icon-left">
                        <textarea name="message" cols="20" rows="5" placeholder="Write Your Message Here!"> </textarea>
                    </div>
                    <!--Button -->
                    <button class="button full-width button-sliding-icon ripple-effect" type="submit"> Send Mail
                        <i class="icon-material-outline-arrow-right-alt">
                        </i></button>
                </form>
            </div>
        </div>
    </div>
</div>
<!--Reject Popup / End-->

@endforeach

0 个答案:

没有答案