<div class="row">
    <div class="container">
        <ol class="breadcrumb">
            <li><a href="#">خصائص عامة</a></li>
            <li><a href="knownWaysController.php?do=show"> طرق المعرفة</a></li>
            <li class="active">تعديل طرق المعرفة</li>
        </ol>

        <h3>تعديل طرق المعرفة</h3>
        <hr />

        <form class="form-horizontal" action="knownWaysController.php?do=update" method="post" id="spform">
            <div class="row">
                <div class="col-lg-8">
                    <div class="form-group">
                        <label for="name" class="col-lg-2 control-label">الاسم </label>
                        <div class="col-lg-4">
                            <span id="name">
                                <span id="sprytextfield1">
                                    <input type="text" name="name" id="name" class="form-control" placeholder="الاسم"
                                        value="{$loadData->name}" />
                                    <span class="textfieldRequiredMsg">*</span>
                                </span>
                                <span class="textfieldRequiredMsg">*</span>
                            </span>
                        </div>
                    </div>
                    <!--==============================-->
                    <input type="hidden" name="id" id="companyId" value="{$loadData->id}" />
                    <!--==============================-->
                </div><!-- end of client info-->
            </div><!-- end of frist row-->
            <div class="row">
                <button type="button" class="btn btn-primary" id="spbutton">حفظ</button>
            </div><!-- end of fifth row-->
        </form>
    </div><!-- end of container-->
</div><!-- end of main row-->
{literal}
<script type="text/javascript">
    var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1");
    $('#spbutton').live('click', function (e) {
        if ($('#spform').validate().form()) {
            var myForm = document.getElementById("spform");
            var SS = Spry.Widget.Form.validate(myForm);
            if (SS == true) {
                if (!$('#spbutton').hasClass("processing")) {
                    $('#spbutton').addClass("processing");
                    myForm.submit();
                }
            }
        }
        else {
            e.preventDefault();
        }
    });

</script>
{/literal}