<div>
    <div class="panel shadow-none mb-0 rounded-0">
        <div class="panel-hdr">
            <h2>
                {if $act eq 'edit'}
                    {$_L['Edit']}
                {elseif $act eq 'view'}
                    Vew Account
                {elseif $act eq 'new'}
                    New Account
                {else}
                    Phone number
                {/if}
            </h2>
        </div>

        <div class="panel-container">
            <div class="panel-content">



                {if $act eq 'edit' || $act eq 'new'}

                    <form class="form-horizontal" id="ib_modal_form">


                        <div class="row">


                            <div class="col-md-12">


                                <div class="mb-3"><label for="name">Name</label>
                                    <input type="text" id="name" name="name" class="form-control" value="{$val['name']}" autocomplete="off">
                                </div>

                                <div class="mb-3"><label for="sid">Account SID</label>
                                    <input type="text" id="sid" name="sid" class="form-control" autocomplete="off" value="{$val['sid']}">
                                </div>

                                <div class="mb-3"><label for="token">Auth Token</label>
                                    <input type="text" id="token" name="token" class="form-control" value="{$val['token']}" autocomplete="off">
                                </div>

                            </div>
                        </div>

                        <input type="hidden" name="act" id="act" value="{$act}">
                        <input type="hidden" name="lid" id="lid" value="{$val['lid']}">

                        <div class="mb-3">
                            <button class="btn btn-primary modal_submit my-3" type="submit" id="modal_submit"><i class="fal fa-check"></i> {$_L['Save']}</button>
                        </div>

                    </form>

                {elseif $act eq 'view'}
                   <div class="row">

                        <div class="col-md-9">

                            <h5>{$lead->name_twilio} </h5>


                            <div id="application_ajaxrender" style="min-height: 200px;">
                                <p>

                                    <strong>Name: </strong> {$lead->name_twilio} <br>
                                    <strong>Account SID: </strong> {$lead->sid_twilio} <br>
                                    <strong>Auth Token: </strong>  {$lead->auth_token}  <br>
                                    <strong>Phones: </strong>  {$phonem} 
                                </p>

                                <input type="hidden" name="v_lid" id="v_lid" value="{$lead->id}">

                                <hr>

                            </div>
                        </div>
                    </div>

                {else}


                    <form class="form-horizontal" id="ib_modal_form_phone">
                        <div class="row">
                            <div class="col-md-12">

                                <div class="mb-3"><label for="phone">Phone number </label>
                                    <input type="text" id="phone" name="phone" class="form-control" autocomplete="off">
                                </div>

                            </div>
                        </div>
                        <input type="hidden" name="act" id="act" value="{$act}"> 
                        <input type="hidden" name="lid" id="lid" value="{$val['lid']}">
                        <input type="hidden" name="id_tlf" id="id_tlf" >

                        <div class="mb-3">
                            <button class="btn btn-primary modal_submit_phone my-3" type="submit" id="modal_submit_phone"><i class="fal fa-check"></i> {$_L['Save']}</button>
                            <button style="display:none;" class="btn btn-danger modal_cancel_phone my-3" type="submit" id="modal_cancel_phone"><i class="fal fa-check"></i> Cancel</button>
                        </div>

                    </form>

                    <div class="row">
                    <div class="col-md-12 col-sm-12 text-center">
                    <b>Lists Phone number</b>
                    </div>
                    <div class="col-md-6 col-sm-6 text-center">
                    <b>Phone number</b>
                    </div>
                    <div class="col-md-6 col-sm-6 text-center">
                    <b>{$_L['Manage']}</b>
                    </div>
                   </div>
                   <br>

                    <div class="row" id="datos_phone">

                   </div>
                   <br>

                {/if}


            </div>
        </div>

    </div>
</div>
