<!-- 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 class ="planform" action="{$hosturl}/{$controllname}/updateit" method="post" class="form-horizontal" enctype="multipart/form-data" id="myform">
                            <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>
                                <div class="alert alert-warning display-hide" id="showerrorname">
                                    <button class="close" data-close="alert"></button>
                                    اختر اسم اخر لان هذا مستخدم من قبل
                                </div>
                                <div class="clearfix"></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>
                                        <input type="text" class="form-control" placeholder="اسم الصفحه" data-link="{$controllname}" name="name_ar" id="data" data-edit="{$page->name}" value="{$page->name}" required=""  minlength="3" maxlength="50">
                                        <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-info"></i>
                                        </span>
                                        <input type="text" class="form-control"  placeholder="page name" id="data_en" name="name_en" data-edit="{$page->name_en}" value="{$page->name_en}" required="" minlength="3" maxlength="50">
                                        <label for="form_control_1">page name</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-info"></i>
                                                                        </span>
                                                                        <input type="text" class="form-control" placeholder="الترتيب" name="order" value="{$page->order}"  required="">
                                                                        <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-users"></i>
                                                                        </span>
                                                                        <select class="form-control input-xlarge select2me input-sm select2-offscreen noborder" data-placeholder="اختر واحد" name="parent">
                                                                            <option value=""></option>
                                                                            <option value="0" {if {$page->parent} eq 0} selected {/if}>لا يوجد</option>
                                                                            {foreach $pages as $single}
                                                                            <option value="{$single->id}" {if {$page->parent} eq {$single->id}} selected {/if}>{$single->name}</option>
                                                                            {/foreach}
                                                                        </select>
                                                                        <label for="form_control_1">والد العنصر</label>
                                                                    </div>
                                                                </div>
                                                                <div class="form-group">
                                                                    <label class="col-md-1 control-label">النوع</label>
                                                                    <div class="radio-list">
                                                                        <label class="radio-inline">
                                                                            <input type="radio" name="typeshow" value="0" {if $page->type eq 0}checked{/if}> محتوى </label>
                                                                        <label class="radio-inline">
                                                                            <input type="radio" name="typeshow" value="1" {if $page->type eq 1}checked{/if}> رابط </label>
                                                                    </div>
                                                                </div>-->
                                <div id="contentshow"  {if $page->type eq 1} style="display: none; "{/if}>
                                    <div class="form-group form-md-line-input has-info" id="contentshow1">
                                        <div class="input-group">
                                            <span class="input-group-addon">
                                                <i class="fa fa-info"></i>
                                            </span>
                                            <textarea class="form-control ckeditor" rows="3" name="content_ar">{$page->content}</textarea>
                                            <label for="form_control_1">المحتوى</label>
                                        </div>
                                    </div>
                                    <div class="form-group form-md-line-input has-info" id="contentshow1_en">
                                        <div class="input-group">
                                            <span class="input-group-addon">
                                                <i class="fa fa-info"></i>
                                            </span>
                                            <textarea class="form-control ckeditor" rows="3" name="content_en"  minlength="3" maxlength="100" required="">{$page->content_en}</textarea>
                                            <label for="form_control_1">content</label>
                                        </div>
                                    </div>
                                </div>
                                <!--                                <div class="form-group form-md-line-input has-info" id="linkshow" {if $page->type eq 0} style="display: none; "{/if}">
                                                                    <div class="input-group">
                                                                        <span class="input-group-addon">
                                                                            <i class="fa fa-info"></i>
                                                                        </span>
                                                                        <input type="text" class="form-control" placeholder="رابط " name="link" url="true" required="" value="{$page->link}">
                                                                        <label for="form_control_1">رابط </label>
                                                                    </div>
                                                                </div>-->

                                <div class="form-group form-md-line-input has-info col-md-6">
                                    <label for="form_control_1" style="font-size: 13px;color: #888888;margin-left: 15px;">الصورة </label>
                                    <div class="input-group">

                                        <div class="clearfix"></div>
                                        <span class="input-group-addon">
                                            <i class="fa fa-image"></i>
                                        </span>
                                        <div class="fileinput fileinput-new" data-provides="fileinput">
                                            <div class="fileinput-preview thumbnail" data-trigger="fileinput" style="width: 200px; height: 150px;"></div>
                                            <div class=" thumbnail" data-trigger="fileinput" style="width: 200px; height: 150px;">{if {$page->image} eq "no image" OR {$page->image} eq ""}
                                                <input type="hidden" id="imageurl" name="imageurl1" value="no image"/>{else}
                                                <div class="thumb" style="height: 100%;">
                                                    <img src="{$hosturl}/../upload/page/{$page->image}" style="height: 100%; width: 100%; ">
                                                </div>
                                                <input type="hidden" id="imageurl" name="imageurl1" value="{$page->image}" />{/if}</div>
                                            <div>
                                                <span class="btn default btn-file">
                                                    <span class="fileinput-new">استعراض</span>
                                                    <span class="fileinput-exists">تغير</span>
                                                    <input type="file" name="image1" class="img_cls">
                                                </span>
                                                <a href="#" class="btn red fileinput-exists" data-dismiss="fileinput">
                                                    حذف </a>
                                            </div>
                                        </div>
                                        <div class="clearfix margin-top-10 margin-bottom-10">
                                            <span class="label label-danger">ملاحظه!</span> يمكنك فقط رفع صور </div>
                                    </div>
                                </div>
                                <input type="hidden" id="id" name="id" value="{$page->id}" />
                            </div>
                            <div class="form-actions">
                                <div class="row">
                                    <div class="col-md-offset-3 col-md-4">
                                        <button  type="submit" id="submit" class="editBtn 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 -->