

<div class="row">
    <div class="container">
        <ol class="breadcrumb">
            <li><a href="#">نظام العقارات والوحدات </a></li>
            <li><a href="realestateunits.php?do=show"> العقارات والوحدات </a></li>
            {if $editdata->del lt 2}
            <li class="active">تعديل  </li> 
            {else}
            <li class="active">تفاصيل  </li> 
            {/if}
        </ol>
        <div class="panel panel-default panel-m">
            <div class="panel-heading">
                {if $editdata->del lt 2}
                <h3 class="panel-title">تعديل  </h3>
                {else}
                <h3 class="panel-title">تفاصيل  </h3> 
                {/if}
            </div>
            <div class="panel-body">


                {literal}
                 <form class="form-horizontal"  action="realestateunits.php"  id="submitformajax"  method="post"  enctype="multipart/form-data" data-dosave="?do=savedata" data-direction="?do=show" data-print="">

                    {/literal}

                     <div class="form-group">
                        <label for="txtName" class="col-lg-2 control-label">اسم العقار</label>
                        <div class="col-lg-4">
                            <input    required="required"    type="text" name="realestatename" 
                            class="form-control checkcolumn"  placeholder="اسم العقار"  
                            data-table="realestates" data-tablecol="realestatename" data-tableid="{$editdata->id}"
                            data-parentid="" data-parentcol="" value="{$editdata->realestatename}"/>
                            
                        </div>
                    </div>

                     <div class="form-group">
                        <div class="col-md-12">
                              <div>
                                 <button type="button" class="btn green-meadow btn-sm pull-left addappend" data-controller="realestateunits" data-container="realestatesunits" data-itr=''  style="font-size: 10px;background: #ccc">اضافه وحده </button>
                                  <input type="hidden" id="realestatesunitsitr" name="realestatesunitsitr"  value="{1 + $realestatesunits|@count}" />
                              </div>
                              <div class="clearfix"></div>
                              <ul >
                                <li style="list-style-type: none;">
                                   <div class="col-lg-9">
                                       <label for="txtName" class="control-label">اسم  الوحده</label>
                                   </div>
                                   <div class="col-lg-2">
                                     <label for="txtName" class="control-label">مساحة الوحده</label>
                                   </div>
                                    <div class="col-lg-1 pull-right">
                                        <label for="txtName" class="control-label">حذف</label>
                                    </div>
                                </li>
                              </ul>  
                              <ul class="realestatesunits">
                                {assign var=itr value=1}
                                {foreach $realestatesunits as $units}
                                 <input type="hidden"  name="unitid_{$itr}" value="{$units->id}" />
                                 <li  id="rrealestatesunits1{$units->id}" style="list-style-type: none;">
                                   <div class="col-lg-9">
                                       <input  required="required"    type="text" name="unitname_{$itr}" class="form-control checkcolumn" placeholder="* اسم  الوحده " data-table="realestatesunits" data-tablecol="unitname" data-tableid="-1" data-parentid="-1" data-parentcol=""  value="{$units->unitname}" />
                                   </div>
                                   <div class="col-lg-2">
                                     <input      type="text" name="unitarea_{$itr}" class="form-control  floats" placeholder="مساحة الوحده " data-table="" data-tablecol="" data-tableid="" data-parentid="" data-parentcol=""  value="{$units->unitarea}" />
                                   </div>
                                    <div class="col-lg-1 pull-right">
                                        <a href="javascript:;"  data-id="{$units->id}" data-edit="1" data-controller="realestateunits" data-container="realestatesunits" class="btn btn-xs red pull-right removeappend"> x
                                        </a>
                                    </div>
                                </li>
                                {capture assign=itr}{$itr+1}{/capture}
                                 {/foreach}
                            </ul>  
                        </div>
                    </div>

                    
                    <input type="hidden" name="id" value="{$editdata->id}" />
                    <input type="hidden" class="deldata" value="{$editdata->del}" />


                   {if $editdata->del lt 2}
                    <div class="form-group">
                        <div class="col-lg-offset-2 col-lg-4">
                             <button type="button" class="btn btn-primary pull-left submitformajax" >تعديل الامر</button>
                        </div>
                    </div>
                    {/if}




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




    </div>
</div>



