<!-- BEGIN CONTENT -->
<div class="page-content-wrapper">
    <div class="page-content">
        <!-- BEGIN PAGE HEADER-->
        <h3 class="page-title">
            {$shcontrollname}
        </h3>
        <div class="page-bar">
            <ul class="page-breadcrumb">
                {$breadcrumbs}
            </ul>
        </div>
        <!-- END PAGE HEADER-->
        <!-- BEGIN PAGE CONTENT-->
        <div class="row">
            <div class="col-md-12">
                <div class="portlet light bg-inverse">
                    <div class="portlet-title">
                        <div class="caption">
                            <i class="icon-equalizer font-red-sunglo"></i>
                            <span class="caption-subject font-red-sunglo bold uppercase">تعديل فى {$shcontrollname}</span>
                        </div>
                        <div class="actions">
                            <a class="btn default btn-xs blue tooltips" href="{$hosturl}/{$controllname}/show" data-container="body" data-placement="top" data-original-title="Show">
                                <i class="icon-list"></i>
                                عرض البيانات
                            </a>
                        </div>
                    </div>
                    <div class="portlet-body form">
                        <!-- BEGIN FORM-->
                        <form action="{$hosturl}/{$controllname}/updateit" method="post" class="form-horizontal" id="member_form">
                            <div class="form-body">
                                <div class="alert alert-danger display-hide">
                                    <button class="close" data-close="alert"></button>
                                    لديك خطا فى ادخال البيانات , حاول مره اخرى
                                </div>
                                <div class="alert alert-success display-hide">
                                    <button class="close" data-close="alert"></button>
                                    لقد ادخلت بيانات صحيح
                                </div>

                                <h3 class="form-section">بياناتى</h3>
                                <div class="form-group form-md-line-input has-info">
                                    <div class="input-group">
                                        <span class="input-group-addon">
                                            <i class="fa fa-user-md"></i>
                                        </span>
                                        <input type="text" class="form-control" placeholder="الاسم" name="name" value="{$user.name}">
                                        <label for="form_control_1">الاسم</label>
                                    </div>
                                </div>
                                <div class="form-group form-md-line-input has-info">
                                    <div class="input-group">
                                        <span class="input-group-addon">
                                            <i class="fa fa-envelope"></i>
                                        </span>
                                        <input type="text" class="form-control" placeholder="البريد الالكترونى" name="email" id="email" value="{$user.user_email}" data-edit="{$user.user_email}">
                                        <label for="form_control_1">البريد الالكترونى</label>
                                    </div>
                                    <div class="alert alert-warning display-hide" id="showerroremail">
                                        <button class="close" data-close="alert"></button>
                                        استخدم بريد اخر لان هذا مستخدم من قبل
                                    </div>
                                </div>

                                <div class="form-group form-md-line-input has-info">
                                    <div class="input-group">
                                        <span class="input-group-addon">
                                            <i class="fa fa-users"></i>
                                        </span>
                                        <select class="form-control input-xlarge select2me input-sm select2-offscreen noborder" id="role_id" data-placeholder="اختر عنصر" name="role">
                                            <option value=""></option>
                                            {foreach $roles as $single}
                                            <option value="{$single->id}" {if $single->id eq $user.role_id}selected{/if}>{$single->name}</option>
                                            {/foreach}
                                        </select>
                                        <label for="form_control_1">المجموعات</label>
                                    </div>
                                </div>
                                <div class="form-group form-md-line-input has-info {if $user.role_id neq 3} hide {/if}" id="caftriaDiv">
                                    <div class="input-group">
                                        <span class="input-group-addon">
                                            <i class="fa fa-users"></i>
                                        </span>
                                        <select name="caftria_id" class="form-control input-xlarge select2me input-sm select2-offscreen noborder" data-placeholder="اختر كافتريا" >
                                            <option value=""></option>
                                            {foreach $caftrias as $single}
                                                <option value="{$single.id}" {if $user.caftria_id eq $single.id} selected {/if} >{$single.name}</option>
                                            {/foreach}
                                        </select>
                                        <label for="form_control_1">الكافتريات</label>
                                    </div>
                                    
                                </div>
                                <h3 class="form-section">بيانات الدخول</h3>
                                <div class="form-group form-md-line-input has-info">
                                    <div class="input-group">
                                        <span class="input-group-addon">
                                            <i class="fa fa-user"></i>
                                        </span>
                                        <input type="text" class="form-control" placeholder="اسم الدخول" name="username" id="username" value="{$user.user_name}" data-edit="{$user.user_name}">
                                        <label for="form_control_1">اسم الدخول</label>
                                    </div>
                                    <div class="alert alert-warning display-hide" id="showerrorusername">
                                        <button class="close" data-close="alert"></button>
                                        اختر اسم اخر لان هذا مستخدم من قبل
                                    </div>
                                </div>
                                <div class="form-group form-md-line-input has-info">
                                    <div class="input-group">
                                        <span class="input-group-addon">
                                            <i class="fa fa-anchor"></i>
                                        </span>
                                        <input type="password" class="form-control" placeholder="كلمه مرور جديده" name="epassword" id="epassword">
                                        <label for="form_control_1">كلمه مرور جديده</label>
                                    </div>
                                </div>
                                <div class="form-group form-md-line-input has-info">
                                    <div class="input-group">
                                        <span class="input-group-addon">
                                            <i class="fa fa-anchor"></i>
                                        </span>
                                        <input type="password" class="form-control" placeholder="تاكيد كلمه المرور" name="econfirmpassword">
                                        <label for="form_control_1">تاكيد كلمه المرور</label>
                                    </div>
                                </div>

                                <input type="hidden" id="id" name="id" value="{$user.user_id}" />
                                <input type="hidden" name="oldpassword" value="{$user.user_password_hash}" />

                            </div>
                            <div class="form-actions">
                                <div class="row">
                                    <div class="col-md-offset-3 col-md-4">
                                        <button type="submit" class="btn green">تعديل</button>
                                        <button type="button" class="btn default rtnshow" data-controll="{$controllname}">الغاء</button>
                                    </div>
                                </div>
                            </div>
                        </form>
                        <!-- END FORM-->
                    </div>
                </div>
            </div>
        </div>
        <!-- END PAGE CONTENT-->
    </div>
</div>
<!-- END CONTENT -->