
<div class="page-content-wrapper">
    <div class="page-content all">
        <div class="row">
            <div class="col-md-12">
                <div class="portlet box blue">
                    <div class="portlet-title">
                        <div class="caption">
                            <i class="fa fa-cogs"></i>SMS Control 
                        </div>
                        <div class="actions">
                            <a href="{$hosturl}/controllers/{$controllname}.php" class="btn btn-default btn-sm">
                                <i class="fa fa-plus"></i> Add </a>
                        </div>
                    </div>
                    <div class="portlet-body" style="padding-top: 10px;">
                        <input type="hidden" id="controllName" value="{$controllname}">
                        <table class="table table-striped table-bordered table-hover">
                            <tbody>
                                <tr>
                                    <th class="wds13">User </th>
                                    <td>
                                        <input type="text" class="form-control updateElement" data-colName="username" 
                                               data-id="{$sms_setting->id}"  data-tableName="sms_control_setting" 
                                               value="{$sms_setting->username}">
                                    </td>
                                </tr>
                                <tr>
                                    <th>Password </th>
                                    <td>
                                        <input type="text" class="form-control updateElement" data-colName="password" 
                                               data-id="{$sms_setting->id}"  data-tableName="sms_control_setting"  
                                               value="{$sms_setting->password}">
                                    </td>
                                </tr>
                                <tr>
                                    <th>Sender </th>
                                    <td>
                                        <input type="text" class="form-control updateElement" data-colName="sender" 
                                               data-id="{$sms_setting->id}"  data-tableName="sms_control_setting"  
                                               value="{$sms_setting->sender}">
                                    </td>
                                </tr>
                                <tr>
                                    <th>Server </th>
                                    <td>
                                        <div class="form-group col-md-4">
                                            <label class="col-md-5 control-label"></label>
                                            <div class="radio-list">
                                                <label class="radio-inline">
                                                    <input type="radio" class="updateElement" name="server_type"  value="1"  
                                                           data-colName="server_type" 
                                                           data-id="{$sms_setting->id}"  data-tableName="sms_control_setting"  
                                                           {if  $sms_setting->server_type == 1 } checked {/if} > Local </label>
                                                <label class="radio-inline">
                                                    <input type="radio" class="updateElement" name="server_type"  value="0"  
                                                           data-colName="server_type" 
                                                           data-id="{$sms_setting->id}"  data-tableName="sms_control_setting"  
                                                           {if  $sms_setting->server_type != 1 } checked {/if} > Live </label>
                                            </div>
                                        </div>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                        <table class="table table-striped table-bordered table-hover">
                            <thead>
                                <tr>
                                    <th class="wds13">No</th>
                                    <th>Name</th>
                                    <th width="5%"></th>
                                    <th width="5%">Edit</th>
                                </tr>
                            </thead>
                            <tbody>
                                {assign var=m value=1}
                                {foreach $sms_control as $single}
                                <tr class="odd gradeX ">
                                    <td>{$m}</td>
                                    <td>{$single->name}</td>
                                    <td class="btn_showm_set">
                                        <a  class="btn btn-xs">
                                            <span class="label label-sm label-warning activeIt"  id="active{$single->id}"
                                                  data-id="{$single->id}"  data-tableName="sms_control" data-colName="status"  
                                                  data-val="0"   {if $single->status !=  1}  style="display: none;"   {/if} >
                                                <i class="fa fa-eye"></i>   Active </span>
                                            <span class="label label-sm label-default activeIt" id="notActive{$single->id}"
                                                  data-id="{$single->id}"  data-tableName="sms_control" data-colName="status"  
                                                  data-val="1"  {if $single->status == 1}  style="display: none;"   {/if}   >
                                                <i class="fa fa-eye-slash"></i>  Not Active  </span>
                                        </a>
                                    </td>
                                    <td>
                                        <a href="{$hosturl}/controllers/{$controllname}.php?ac=edit&id={$single->id}" 
                                           class="btn green btn-block btn-xs"><i class="fa fa-pencil"></i> Edit</a>
                                    </td>
                                </tr>
                                {capture assign=m}{$m+1}{/capture}
                                {/foreach}
                            </tbody>

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