<!DOCTYPE html>
<html>
    <head>
        <title>برنامج المحاسبة</title>
        <meta charset="utf-8">
        <!-- read and write any langs -->
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <!-- Bootstrap -->
        <link href="{$path}/assets/css/bootstrap.min.css" rel="stylesheet" media="screen">
        <!-- Custom styles for project -->
        <link href="{$path}/assets/css/store.css" rel="stylesheet">
    </head>
    <body class="usedfont">
        <div class="container">
            <div class="row mgtop50">
                <div class="col-lg-5 col-lg-offset-4">
                    <div class="panel">
                        <div class="panel-heading loginpanel">
                            <h3 class="panel-title">محاولة الدخول بالسؤال السرى</h3>
                        </div>
                        <form class="form-horizontal" action="login.php?do=enq" method="post" id="ansForm">
                            <div class="form-group">
                                <div class="col-lg-12"><label class="form-group" style="margin-right: 0px;">{$userQuestion}</label> </div>
                            </div>
                            <div class="form-group">
                                <div class="col-lg-12"><textarea class="form-control" name="answer" id="answer" rows="3" required></textarea></div>
                            </div>
                            <input type="hidden" name="username" value="{$username}"/>
                            <div class="form-group">
                                <div class="col-lg-offset-2 col-lg-10">
                                    <button type="button" class="btn btn-default pull-left" id="tryAnswer">دخول</button>
                                </div>
                            </div>
                        </form>
                    </div>
                    <span class="help-block">جميع الحقوق محفوظة لشركة GT4 للبرمجيات.</span> </div>
            </div>
        </div>

        <!-- JavaScript plugins (requires jQuery)
            <script src="http://code.jquery.com/jquery.js"></script>-->
        <script src="{$path}/assets/js/jquery.js"></script>
        <!-- Include all compiled plugins (below), or include individual files as needed -->
        <script src="{$path}/assets/js/bootstrap.min.js"></script>

        <!-- Enable responsive features in IE8 with Respond.js (https://github.com/scottjehl/Respond) -->
        <script src="{$path}/assets/js/respond.min.js"></script>
        {literal}
        <script>
            $('#tryAnswer').on('click', function () {
                if ($("#answer").val() == "")
                {
                    $("#answer").css('background', 'yellow');
                }
                else
                {
                    $("#answer").css('background', 'white');
                    $('#ansForm').submit();
                }
            });


        </script>
        {/literal}
    </body>
</html>