{literal}
<script>
$(function() {
    $("table input,textarea").each(function(index, element) {
        $(this).attr('disabled',true);
    });
});
</script>
{/literal}




<div class="row noprint">
    <div class="col-lg-12">
        <div class="panel panel-default">
            <div class="panel-heading headercolorx">
                <h6 class="text-center"><a href="#" id="mantance"><strong>الصيانه</strong></a>
                    
            </div>
            <div class="panel-body" {if empty($mantancedata)}style="display:none"{else} style="display:block"{/if} id="mantancediv">
                <div class="table-responsive">
                    <!-- hidden values -->
                    <input type="hidden" name="mantance_insure_no" id="mantance_insure_no" value="{$mantanceitr}">
                    <input type="hidden" name="mantance_tabindex_no" id="mantance_tabindex_no" value="7">
                    <table class="table table-condensed">
                        <thead>
                            <tr>
                                <td><strong>اسم المنتج</strong></td>
                                <td class="text-center"><strong>سيريل</strong></td>
                                <td class="text-center hidden"><strong>الوصف</strong></td>
                                <td class="text-center"><strong>العيب</strong></td>
                                <td class="text-center"><strong>ملاحظات</strong></td>
                                <td class="text-center"><strong>ملاحقات</strong></td>
                                <td class="text-center"><strong>تكلفه مبدئيه</strong></td>
                               <td class="text-center"><strong> المرحله الحاليه</strong></td>
                        </thead>
                        <tbody  id="mantance_insure_container">
                             {assign var=w value=1}
                             {foreach $mantancedata as $data}
                            <tr>
                             <input type="hidden" name="searchvalue" id="searchvalue" value="{$Programsettingdata->searchvalue}"/>
                            <input type="hidden" name="mantanceitr" id="mantanceitr" value="{$mantanceitr}"/>
                                <td>
                                <div id="returnproductmantancediv{$w}">
                                    <input type="hidden" class="select2ajax select2-offscreen" name="productmantance{$w}" id="productmantance{$w}" tabindex="7" data-placeholder="اختر منتج"  disabled="disabled">
                               		 <input type="hidden" id="reoldproductmantance{$w}" name="reoldproductmantance{$w}" value="{$data->productId}"  />
                                       <input type="hidden" id="reoldnamemantance{$w}" name="reoldnamemantance{$w}"  value="{$data->productName}"  />
                                        
                                        
                                        <input type="hidden" id="productname{$w}" name="productname{$w}"  value="{$data->ourserial}"  />
                                         <input type="hidden" id="mancedetailid{$w}" name="mancedetailid{$w}"  value="{$data->id}"  />
                                                  </div>
                                </td>
                                <td class="text-center">
                                    <input type="text" class="form-control" name="mantance_serial{$w}" id="mantance_serial{$w}" tabindex="7" placeholder="السيريل" value="{$data->productserial}" >
                                </td>
                                <td class="text-center hidden">
                                    <textarea class="form-control" name="mantance_description{$w}" id="mantance_description{$w}" tabindex="7"></textarea>
                                </td>
                                <td class="text-center">
                                    <textarea class="form-control" name="mantance_error{$w}" id="mantance_error{$w}" tabindex="7">{$data->problem}</textarea>
                                </td>
                                <td class="text-center">
                                    <textarea class="form-control" name="mantance_note{$w}" id="mantance_note{$w}" tabindex="7">{$data->comment}</textarea>
                                </td>
                                <td class="text-center">
                                    <textarea class="form-control" name="mantance_attch{$w}" id="mantance_attch{$w}" tabindex="7">{$data->attach}</textarea>
                                </td>
                                <td class="text-center">
                                    <input type="text" class="form-control mantance_intinal_value" value="{$data->initialcost}" name="mantance_intinal_cost{$w}" id="mantance_intinal_cost{$w}" tabindex="7" placeholder="تكلفه مبدئيه"  >
                                    
                                     <input type="hidden" class="form-control mantance_intinal_valuex" value="{$data->initialcost}" name="mantance_intinal_costx{$w}" id="mantance_intinal_costx{$w}" tabindex="7" placeholder="تكلفه مبدئيه"  >
                                </td>
                                
                               <input type="hidden" id="mantancestagefrom{$w}" name="mantancestagefrom{$w}"  value="{$data->stageFrom}"  />
                               <input type="hidden" id="mantancestageto{$w}" name="mantancestageto{$w}"  value="{$data->stageTo}"  />
                               <input type="hidden" id="mantancecurrentstage{$w}" name="mantancecurrentstage{$w}"  value="{$data->currentstage}"  />
                                <input type="hidden" id="mantancestatus{$w}" name="mantancestatus{$w}"  value="{$data->status}"  />
                                 <input type="hidden" id="mantancecost{$w}" name="mantancecost{$w}"  value="{$data->cost}"  />
                                <td class="text-center hidden">
                                    <button  type="button" class="close flt-none removeicon mantance_removeproductx" id="removemantance{$w}" data-type="{$w}" aria-hidden="true">×</button>
                                		<input type="hidden" id="delmantance{$w}" name="delmantance{$w}"  value="0"  />
                                </td>
                                
                                 <td class="text-center">
                                    <input type="text" class="form-control" value="{$data->title}" name="currentstage{$y}" id="currentstage{$y}" tabindex="5" >
                                   
                                </td>
                            </tr>
                            {capture assign=w}{$w+1}{/capture} 
                            {/foreach}
                        </tbody>
                    </table>
                    <table class="table table-condensed">
                        <tbody>
                            <tr>
                                <td class="highrow"></td>
                                <td class="highrow"></td>
                                <td class="highrow"></td>
                                <td class="highrow"></td>
                                <td class="highrow"></td>
                                <td class="highrow text-center totaltxt"><strong>المجموع</strong></td>
                                <td class="highrow text-right totalvalue" id="mantance_total_intial">0</td>
                                
                                <input type="hidden" name="mantance_total_intial" id="mantance_total_intialx"/>
                            </tr>
                        </tbody>
                    </table>

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

</div>