<div class="row">
    <div class="container">
        <ol class="breadcrumb">
            <li><a href="#">الشئون القانونية</a></li>
            <li><a href="sessionsreport.php?do=report"> تقرير جلسات</a></li>
            <li class="active">تفاصيل</li>
        </ol>
        <div class="panel panel-default panel-m">
            <div class="panel-heading">
                <h3 class="panel-title">تفاصيل</h3>
            </div>
            <div class="panel-body"> {literal}
                <form class="nameToBeChecked form-horizontal" role="form" action="sessionsreport.php?do=report"
                      method="post" enctype="multipart/form-data" id="spform">
                    {/literal}
                    <!-- =================================================   -->
                   <div class="form-group">
                        <label for="lawyer_id" class="col-lg-2 control-label">القضية</label>
                        <div class="col-lg-4">
                            <select name="case" disabled id="case" class="form-control select2" required>
                                <option value="-1">--- اختر القضية ---</option>
                                {foreach $cases as $case}
                                    <option value="{$case.subject}" {if $showData->case == $case->subject}selected{/if}>
                                        {$case.subject}</option>
                                {/foreach}
                            </select>
                        </div>
                    </div>
                 
                        <!--==============================-->

                          <div class="form-group">
                        <label for="notes" class="col-lg-2 control-label"> تاريخ الجلسة</label>
                        <div class="col-lg-4">
                            <input type="date" readonly name="date" id="date" class="form-control" value="{$showData->session_date}">
                        </div>
                      
                    </div>

                      <!--==============================-->
                     <!--==============================-->
                    <div class="form-group">
                        <label for="court_decision" class="col-lg-2 control-label">النتيجة</label>
                        <div class="col-lg-4">
                            <textarea name="result" readonly id="result" class="form-control" rows="4" >{$showData->result}</textarea>
                        </div>
                    </div>
                     <!--==============================-->
                  
                     <div class="form-group">
                        <label class="col-lg-2 control-label">ملاحظات</label>
                        <div class="col-lg-4">
                            <textarea name="notes" readonly class="form-control" rows="4">{$showData->notes}</textarea>
                        </div>
                    </div>
                     <!--==============================-->
                      <div class="form-group">
                        <label class="col-lg-2 control-label">المرفقات</label>
                        <div class="col-lg-2">
                              {if $showData->images != "" && $showData->images !="." &&
                            $showData->images !="no image"}
                            <div style="margin-bottom: 10px;">
                            {assign var="imgs" value=","|explode:trim($showData->images)}
                            {foreach $imgs as $img}
                                <img src="../upload/sessions/{trim($img)}" width="80" height="60" style="border:1px solid #ccc; margin-left:5px;" />
                                
                            {/foreach}
                            </div>
                            {/if}
                            
                            <input type="hidden" name="imageurl" value="{$showData->images}" />
                        </div>
                    </div>
                    <!--==============================-->
                    <input name="id" id="id" type="hidden" value="{$showData->id}" />
                    <!-- =================================================   -->
                    <div class="form-group">
                        <div class="col-lg-offset-2 col-lg-4">
                            <button type="button" class="btn btn-primary pull-left" id="spbutton">رجوع</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
{literal}
<script type="text/javascript">
    var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1");
    var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2");
    $('#spbutton').live('click', function (e) {
        if (!$('#spbutton').hasClass("processing")) {
            $('#spbutton').addClass("processing");
            $('#productCatName').trigger('blur');
            setTimeout(function () {
                var myForm = document.getElementById("spform");
                var SS = Spry.Widget.Form.validate(myForm);
                if (SS == true) {
                    myForm.submit();
                } else {
                    $('#spbutton').removeClass("processing");
                }
            }, 500);
        }
    });
   
</script>
{/literal}