<div class="page-content-wrapper">
    <div class="page-content">
        <div class="row">
            <div class="col-md-12">
                <!-- BEGIN EXAMPLE TABLE PORTLET-->
                <div class="portlet box blue">
                    <div class="portlet-title">
                        <div class="caption">
                            <i class="fa fa-user"></i>Vote
                        </div>
                    </div>
                    <div class="portlet-body">

                        <!--Begin Semen-->

                        <div class="row">

                            <div class="portlet-title tbox">
                                <div class="caption font-blue-haze col-md-6">
                                    <span class="caption-subject bold uppercase">Add new</span>
                                </div>

                            </div>

                            <div class="clearfix"></div>

                            <form action="{$hosturl}/controllers/{$controllname}.php?ac=add" class="clinick vote-form" method="post">

                                <div class="form-body">
                                    <div class="col-md-3">
                                        <div class="form-group">
                                            <label class="col-md-3 control-label">Device</label>
                                            <div class="col-md-9">
                                                <select class="form-control select2me" required="required" name="vote_device_id" data-placeholder="Select...">
                                                    <option></option>
                                                    {foreach $vote_devices as $single}
                                                    <option value="{$single->id}">{$single->name}</option>
                                                    {/foreach}
                                                </select>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-md-3">
                                        <div class="form-group">
                                            <label class="col-md-5 control-label">Voter required</label>
                                            <div class="col-md-7">
                                                <div class="radio-list">
                                                    <label class="radio-inline">
                                                        <input type="radio" name="voter_required" value="1" checked> Yes </label>
                                                    <label class="radio-inline">
                                                        <input type="radio" name="voter_required" value="0"> No </label>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-md-3">
                                        <div class="form-group">
                                            <label class="col-md-2 control-label">Email</label>
                                            <div class="col-md-10">
                                                <input class="form-control" name="email" required type="text" email="true">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-md-3">
                                        <div class="form-group">
                                            <label class="col-md-2 control-label">Role</label>
                                            <div class="col-md-10">
                                                <select class="form-control select2me" required="required" name="role_id" data-placeholder="Select...">
                                                    <option></option>
                                                    {foreach $roles as $single}
                                                    <option value="{$single->id}">{$single->name}</option>
                                                    {/foreach}
                                                </select>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="clearfix"></div>
                                    <hr>
                                    <h4 style="text-decoration: underline;">
                                        <strong>Questions</strong>
                                        <button type="button" class="btn blue-madison pull-right" id="append-vote-question">Add Question</button>
                                    </h4>
                                    <div class="clearfix"></div>

                                    <ul class="list-group" style="margin-top: 15px;" id="vote_question_container">
                                        <li class="list-group-item row">
                                            <div class="form-group col-md-11">
                                                <label class="col-md-3 control-label">Question 1</label>
                                                <div class="col-md-9">
                                                    <input type="text" class="form-control" name="question_1" required>
                                                </div>
                                            </div>
                                            <!--<div class="col-md-1 pull-right">
                                                <button type="button" class="btn btn-sm spinner-down red remove-vote-question" data-edit-mode="0" data-question-id="0">
                                                    <i class="fa fa-minus"></i>
                                                </button>
                                            </div>-->
                                            <div class="form-group col-md-2">
                                                <label class="control-label">Answers:</label>
                                            </div>
                                            <div class="form-group col-md-2">
                                                <input type="text" class="form-control" placeholder="Answer 1" name="answer_1_1" value="ممتاز" required>
                                                <label class="col-md-11 control-label bold">Send Email
                                                    <span style="float: left;">
                                                        <input type="checkbox" class="checkGroup" value="1" name="send_mail_1_1">
                                                    </span>
                                                </label>
                                                <select class="form-control select2me" required="required" name="face_1_1" data-placeholder="Select...">
                                                    <option value="happy" selected>&#128513; &nbsp; happy</option>
                                                    <option value="good">&#128523; &nbsp; good</option>
                                                    <option value="ok">&#128528; &nbsp; ok</option>
                                                    <option value="sad">&#128542; &nbsp; sad</option>
                                                    <option value="angry">&#128545; &nbsp; angry</option>
                                                </select>
                                            </div>
                                            <div class="form-group col-md-2">
                                                <input type="text" class="form-control" placeholder="Answer 2" name="answer_2_1" value="جيد" required>
                                                <label class="col-md-11 control-label bold">Send Email
                                                    <span style="float: left;">
                                                        <input type="checkbox" class="checkGroup" value="1" name="send_mail_2_1">
                                                    </span>
                                                </label>
                                                <select class="form-control select2me" required="required" name="face_2_1" data-placeholder="Select...">
                                                    <option value="happy">&#128513; &nbsp; happy</option>
                                                    <option value="good" selected>&#128523; &nbsp; good</option>
                                                    <option value="ok">&#128528; &nbsp; ok</option>
                                                    <option value="sad">&#128542; &nbsp; sad</option>
                                                    <option value="angry">&#128545; &nbsp; angry</option>
                                                </select>
                                            </div>
                                            <div class="form-group col-md-2">
                                                <input type="text" class="form-control" placeholder="Answer 3" name="answer_3_1" value="مقبول" required>
                                                <label class="col-md-11 control-label bold">Send Email
                                                    <span style="float: left;">
                                                        <input type="checkbox" class="checkGroup" value="1" name="send_mail_3_1">
                                                    </span>
                                                </label>
                                                <select class="form-control select2me" required="required" name="face_3_1" data-placeholder="Select...">
                                                    <option value="happy">&#128513; &nbsp; happy</option>
                                                    <option value="good">&#128523; &nbsp; good</option>
                                                    <option value="ok" selected>&#128528; &nbsp; ok</option>
                                                    <option value="sad">&#128542; &nbsp; sad</option>
                                                    <option value="angry">&#128545; &nbsp; angry</option>
                                                </select>
                                            </div>
                                            <div class="form-group col-md-2">
                                                <input type="text" class="form-control" placeholder="Answer 4" name="answer_4_1" value="غير راضي">
                                                <label class="col-md-11 control-label bold">Send Email
                                                    <span style="float: left;">
                                                        <input type="checkbox" class="checkGroup" value="1" name="send_mail_4_1">
                                                    </span>
                                                </label>
                                                <select class="form-control select2me" name="face_4_1" data-placeholder="Select...">
                                                    <option></option>
                                                    <option value="happy">&#128513; &nbsp; happy</option>
                                                    <option value="good">&#128523; &nbsp; good</option>
                                                    <option value="ok">&#128528; &nbsp; ok</option>
                                                    <option value="sad" selected>&#128542; &nbsp; sad</option>
                                                    <option value="angry">&#128545; &nbsp; angry</option>
                                                </select>
                                            </div>
                                            <div class="form-group col-md-2">
                                                <input type="text" class="form-control" placeholder="Answer 5" name="answer_5_1" value="غاضب جدا">
                                                <label class="col-md-11 control-label bold">Send Email
                                                    <span style="float: left;">
                                                        <input type="checkbox" class="checkGroup" value="1" name="send_mail_5_1">
                                                    </span>
                                                </label>
                                                <select class="form-control select2me" name="face_5_1" data-placeholder="Select...">
                                                    <option></option>
                                                    <option value="happy">&#128513; &nbsp; happy</option>
                                                    <option value="good">&#128523; &nbsp; good</option>
                                                    <option value="ok">&#128528; &nbsp; ok</option>
                                                    <option value="sad">&#128542; &nbsp; sad</option>
                                                    <option value="angry" selected>&#128545; &nbsp; angry</option>
                                                </select>
                                            </div>
                                        </li>
                                    </ul>
                                    <input type="hidden" id="vote_questions_itr" name="vote_questions_itr" value="1"/>

                                </div>

                                <div class="form-actions">
                                    <div class="row">
                                        <div class="col-md-offset-2 col-md-10">
                                            <a class="btn default" href="{$hosturl}/controllers/{$controllname}.php?ac=show">Cancel</a>
                                            <button class="btn blue" type="submit">Submit</button>

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

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

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


