<div class="row">
    <div class="container">
        <ol class="breadcrumb">
            <li><a href="#">المناقصات</a></li>
            <li><a href="boardOpenion.php?do=show">رأي مجلس الادارة</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="boardOpenion.php?do=add"
                      method="post" enctype="multipart/form-data" id="spform">
                    {/literal}

                    <div class="form-group">
                        <label class="col-lg-2 control-label">طلب التقديم (العملية - العضو)</label>
                        <div class="col-lg-6">
                            
                            <select name="num" id="num" data-placeholder="اختر الطلب" class="select2 wdt100">
                                <option value="-1">اختر الطلب (المناقصة - مقدم الطلب)</option>
                                {foreach $requests as $request}
                                    <option value="{$request.id}">
                                        {$request.tender_name} — {$request.member_name}
                                    </option>
                                {/foreach}
                            </select>
                            </span><span class="textfieldRequiredMsg">*</span></span>
                        </div>
                    </div>
                    <!--==============================-->
                       <div class="form-group">
                        <label for="announcementEvaluation" class="col-lg-2 control-label">قرار مجلس الادارة</label>
                        <div class="col-lg-4">
                            <div class="radio-inline">
                                <label>
                                    <input type="radio" name="openion" id="openion0" class="radioR" value="0" checked>
                                    مقبول </label>
                            </div>
                            <div class="radio-inline">
                                <label>
                                    <input type="radio" name="openion" id="openion1" class="radioR" value="1">
                                    مرفوض </label>
                            </div>
                        </div>
                    </div>
                    <!--==============================-->
                    <div class="form-group">
                        <label class="col-lg-2 control-label">صورة القرار</label>
                        <div class="col-lg-4">
                            <input type="file" name="image" id="image" accept=".jpg, .jpeg, .png, .pdf" />
                        </div>
                    </div>
                        <!-- =================================================   -->
                    <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");
            var myForm = document.getElementById("spform");
            var SS = Spry.Widget.Form.validate(myForm);
            if (SS == true) {
                myForm.submit();
            } else {
                $('#spbutton').removeClass("processing");
            }
        }
    });

</script>
{/literal} 