<?php /* Smarty version Smarty-3.1.11, created on 2019-06-24 11:46:16
         compiled from "..\views\aw_ar\city\edit.html" */ ?>
<?php /*%%SmartyHeaderCode:54225cfd14058a7b56-64462484%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'afd471d9d9d6d9ba24dd2be6fe4e48efcd17adef' => 
    array (
      0 => '..\\views\\aw_ar\\city\\edit.html',
      1 => 1560166239,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '54225cfd14058a7b56-64462484',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.11',
  'unifunc' => 'content_5cfd14059a4e20_79548258',
  'variables' => 
  array (
    'shcontrollname' => 0,
    'breadcrumbs' => 0,
    'hosturl' => 0,
    'controllname' => 0,
    'city' => 0,
    'allcountry' => 0,
    'data' => 0,
    'city_governorate' => 0,
    'cityregions' => 0,
    'count' => 0,
    'single' => 0,
    'path' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_5cfd14059a4e20_79548258')) {function content_5cfd14059a4e20_79548258($_smarty_tpl) {?><!--BEGIN CONTENT -->
<div class="page-content-wrapper">
    <div class="page-content">
        <!-- BEGIN PAGE HEADER-->
        <h3 class="page-title">
            <?php echo $_smarty_tpl->tpl_vars['shcontrollname']->value;?>

        </h3>
        <div class="page-bar">
            <ul class="page-breadcrumb">
                <?php echo $_smarty_tpl->tpl_vars['breadcrumbs']->value;?>

            </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">تعديل في <?php echo $_smarty_tpl->tpl_vars['shcontrollname']->value;?>
</span>
                        </div>
                        <div class="actions">
                            <a class="btn default btn-xs blue tooltips" href="<?php echo $_smarty_tpl->tpl_vars['hosturl']->value;?>
/<?php echo $_smarty_tpl->tpl_vars['controllname']->value;?>
/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="<?php echo $_smarty_tpl->tpl_vars['hosturl']->value;?>
/<?php echo $_smarty_tpl->tpl_vars['controllname']->value;?>
/updateit" method="post" class="form-horizontal editForm" id="subjects_form" data-link="<?php echo $_smarty_tpl->tpl_vars['controllname']->value;?>
" enctype="multipart/form-data">
                            <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="form-group">
                                    <label class="col-md-2 control-label" style="text-align: right">الاسم</label>
                                    <div class="col-md-8">
                                        <input type="text" class="form-control" placeholder="الاسم" name="title" id="title" value="<?php echo $_smarty_tpl->tpl_vars['city']->value->title;?>
" maxlength="50" minlength="2" required>
                                    </div>
                                    <span class="help-block help-block-error" id="showerrortitle" style="color: #F3565D"></span>
                                </div>

                                <div class="form-group">
                                    <label class="col-md-2 control-label" style="text-align: right">الاسم بالانجليزي</label>
                                    <div class="col-md-8">
                                        <input type="text" class="form-control" placeholder="الاسم بالانجليزي" name="title_en" id="title_en" maxlength="50" minlength="2" value="<?php echo $_smarty_tpl->tpl_vars['city']->value->title_en;?>
" required>
                                    </div>
                                    <span class="help-block help-block-error" id="showerrortitle" style="color: #F3565D"></span>
                                </div>
                                <div class="form-group">
                                    <label class="col-md-2 control-label" style="text-align: right">الدولة </label>
                                    <div class="col-md-8">
                                        <select class="form-control select2me" name="country" id="country" required>
                                            <option value="">اختر </option>
                                            <?php  $_smarty_tpl->tpl_vars['data'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['data']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['allcountry']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['data']->key => $_smarty_tpl->tpl_vars['data']->value){
$_smarty_tpl->tpl_vars['data']->_loop = true;
?>
                                            <option value="<?php echo $_smarty_tpl->tpl_vars['data']->value['id'];?>
" <?php if ($_smarty_tpl->tpl_vars['data']->value['id']==$_smarty_tpl->tpl_vars['city_governorate']->value->country_id){?>selected<?php }?>><?php echo $_smarty_tpl->tpl_vars['data']->value['title'];?>
</option>
                                            <?php } ?>
                                        </select>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-md-2 control-label" style="text-align: right">المحافظة </label>
                                    <div class="col-md-8">
                                        <input type="hidden" name="gov_id_h" id="gov_id_h" value="<?php echo $_smarty_tpl->tpl_vars['city_governorate']->value->id;?>
">
                                        <input type="hidden" name="gov_title_h" id="gov_title_h" value="<?php echo $_smarty_tpl->tpl_vars['city_governorate']->value->title;?>
">
                                        <input type="text" style="width: 100%" class="select2governorate" name="governorate" id="governorate" required/>
                                    </div>
                                </div>


                                <div class="col-md-12">
                                    <h5 class="pull-left">المناطق</h5>
                                    <button type="button" class="btn blue-madison pull-right myplusbtn" id="region_btn">اضافه منطقة</button>
                                </div>
                                <div class="clearfix"></div>
                                <br/>


                                <ul class="list-group plusitemprop" id="plusitemprop">
                                    <?php $_smarty_tpl->tpl_vars['count'] = new Smarty_variable(1, null, 0);?>
                                    <?php  $_smarty_tpl->tpl_vars['single'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['single']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['cityregions']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['single']->key => $_smarty_tpl->tpl_vars['single']->value){
$_smarty_tpl->tpl_vars['single']->_loop = true;
?>
                                    <li class="list-group-item row nomargin">
                                        <div class="form-group col-md-5">
                                            <label class="col-md-1 control-label">الاسم</label>
                                            <div class="col-md-11">
                                                <div class="input-icon right" style="margin-right: 10px;">
                                                    <i class="fa fa-font"></i>
                                                    <input type="hidden" id="regid<?php echo $_smarty_tpl->tpl_vars['count']->value;?>
" name="regid<?php echo $_smarty_tpl->tpl_vars['count']->value;?>
" value="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
" />
                                                    <input type="text" class="form-control" placeholder="اسم المنطقة" name="region<?php echo $_smarty_tpl->tpl_vars['count']->value;?>
" required value="<?php echo $_smarty_tpl->tpl_vars['single']->value->title;?>
">
                                                </div>
                                            </div>
                                        </div>
                                        <div class="form-group col-md-5">
                                            <label class="col-md-1 control-label">Name</label>
                                            <div class="col-md-11">
                                                <div class="input-icon right" style="margin-right: 23px;">
                                                    <i class="fa fa-font"></i>
                                                    <input type="text" class="form-control" placeholder="region name" name="region_en<?php echo $_smarty_tpl->tpl_vars['count']->value;?>
" required value="<?php echo $_smarty_tpl->tpl_vars['single']->value->title_en;?>
">
                                                </div>
                                            </div>
                                        </div>
                                        <?php if ($_smarty_tpl->tpl_vars['count']->value!=1){?>
                                        <div class="col-md-1 pull-right">
                                            <button type="button" class="btn spinner-down red minsregion" data-edit="0" data-id="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
">
                                                <i class="fa fa-minus"></i>
                                            </button>
                                        </div>
                                        <?php }?>

                                    </li>
                                    <?php $_smarty_tpl->_capture_stack[0][] = array('default', 'count', null); ob_start(); ?><?php echo $_smarty_tpl->tpl_vars['count']->value+1;?>
<?php list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
if (!empty($_capture_buffer)) {
 if (isset($_capture_assign)) $_smarty_tpl->assign($_capture_assign, ob_get_contents());
 if (isset( $_capture_append)) $_smarty_tpl->append( $_capture_append, ob_get_contents());
 Smarty::$_smarty_vars['capture'][$_capture_buffer]=ob_get_clean();
} else $_smarty_tpl->capture_error();?>
                                    <?php } ?>
                                </ul>
                                <input type="hidden" id="itr" name="itr" value="<?php echo $_smarty_tpl->tpl_vars['count']->value;?>
" />



                                <input type="hidden" id="id" name="id" value="<?php echo $_smarty_tpl->tpl_vars['city']->value->id;?>
" />
                            </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="<?php echo $_smarty_tpl->tpl_vars['controllname']->value;?>
">إلغاء</button>
                                    </div>
                                </div>
                            </div>
                        </form>
                        <!-- END FORM-->
                    </div>
                </div>
            </div>
        </div>
        <!-- END PAGE CONTENT-->
    </div>
</div>
<!-- END CONTENT-->
<script src="<?php echo $_smarty_tpl->tpl_vars['path']->value;?>
/_assets/custom/image_validation.js"></script><?php }} ?>