{% extends 'wgcomm/base.html' %}
{% block tail %}
    <script src="static/wgcomm/js/datepicker.js"></script>
    <script src="static/wgcomm/js/wgdatepicker.js"></script>
    <script src="{{ url_for('static',filename='wgcomm/js/help-startup.js') }}"></script>
{% endblock %}
{% block tail_min %}
    <script src="static/wgcomm/js/datepicker.min.js"></script>
    <script src="static/wgcomm/js/wgdatepicker.min.js"></script>
    <script src="{{ url_for('static',filename='wgcomm/js/help-startup.min.js') }}"></script>
{% endblock %}
{% block title %}
    Startup
{% endblock %}

{% block main_content %}
    <!--app-content open-->
    <div class="app-content main-content mt-0">
        <div class="side-app">
            <!-- CONTAINER -->
            <div class="main-container container-fluid">

                <!-- PAGE-HEADER -->
                <div class="page-header">
                    <div>
                        <h1 class="page-title">Startup</h1>
                    </div>
                    <div class="ms-auto pageheader-btn">
                        <ol class="breadcrumb">
                            <li class="breadcrumb-item">Help</li>
                            <li class="breadcrumb-item"><a href="javascript:void(0);">Startup</a></li>
                            <li class="breadcrumb-item active" aria-current="page">Beginner</li>
                        </ol>
                    </div>
                </div>
                <!-- PAGE-HEADER END -->
                {% with messages = get_flashed_messages() %}
                    {% if messages %}
                        <div class="form-group">
                            <ul>
                                {% for message in messages %}
                                    <li class="text-danger">{{ message }}</li>
                                {% endfor %}
                            </ul>
                        </div>
                    {% endif %}
                {% endwith %}
                <!--ROW OPENED-->
                <input type="hidden" name="wgserver1001" id="wgserver1001"
                       value="{{ g.wgwsserver1001 }}">
                <div class="row">
                    <div class="col-lg-12 col-md-12">
                        <div class="card" id="addController">
                            {#                            <form action="{{ url_for('wgcomm.web_user_add') }}" method="post">#}
                            {#                            <form>#}
                            <input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
                            {#                                {{ wgform._csrf }}#}
                            <div class="card-header border-bottom">
                                <h4 class="mb-0">Add Controller</h4>
                            </div>
                            <ul class="nav1 nav-column flex-column br-7 p-3" id="divInfoHelp" hidden="hidden">
                            </ul><!-- main-mail-menu -->
                            <div id='divautoaddcontrollerinfo'></div>
                            <div class="row p-5">
                                <div class="btn-list text-start">
                                    <button id="btnautoaddall" name="btnautoaddall" class="btn btn-primary"
                                            type="submit"
                                            value="">
                                        Add searched new controllers
                                    </button>
                                </div>
                            </div>
                            {#                                <div class="card-body">#}
                            {#                                    {% if starttime1001=="" %}#}
                            {#                                        <div class="form-group">#}
                            {#                                            <label class="text-danger">1001服务器是Close的, 请重启 Vw3000服务!!!</label>#}
                            {#                                        </div>#}
                            {#                                    {% else %}#}
                            {#                                        {% if arrcontrollers == [] %}#}
                            {#                                            <div class="form-group">#}
                            {#                                                <label>请Close防火墙or者打Open UDP: 61005,TCP: 61005, 61080, 61081, 16085,#}
                            {#                                                    1183Port</label>#}
                            {#                                            </div>#}
                            {#                                            <div class="form-group">#}
                            {#                                                <label>Ensure the controller is connected to the local area network and on the same subnet as the computer.</label>#}
                            {#                                            </div>#}
                            {#                                        {% else %}#}
                            {##}
                            {#                                        {% endif %}#}
                            {##}
                            {#                                    {% endif %}#}
                            {#                                    #}
                            {#                                </div>#}
                            {#                                <div class="row p-5">#}
                            {#                                    <div class="btn-list text-end">#}
                            {#                                        <button id="submitcancel" name="submitcancel" class="btn btn-outline-danger"#}
                            {#                                                type="submit" value="Cancel">#}
                            {#                                            <!--                                            <i class="fe fe-x-circle"></i>-->#}
                            {#                                            Cancel#}
                            {#                                        </button>#}
                            {#                                        <button id="submitsave" name="submitsave" class="btn btn-primary" type="submit"#}
                            {#                                                value="Add Controller">#}
                            {#                                            <!--                                            <i class="fe fe-check-circle"></i>-->#}
                            {#                                            Add Controller#}
                            {#                                        </button>#}
                            {#                                    </div>#}
                            {#                                </div>#}
                            {#                            </form>#}
                        </div>
                        <div class="card" id="addUserAndPrivilege">
                            {#                            <form action="{{ url_for('wgcomm.web_user_add') }}" method="post">#}
                            <input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
                            {#                                {{ wgform._csrf }}#}
                            <div class="card-header border-bottom">
                                <h4 class="mb-0">Add User And Privilege</h4>
                            </div>
                            {#                                <div class="card-body">#}
                            {#                                    <div class="form-group">#}
                            {#                                        <label for="f_ConsumerName">Name</label>#}
                            {#                                        <input class="form-control" id="f_ConsumerName" name="f_ConsumerName"#}
                            {#                                               type="text" value="">#}
                            {#                                    </div>#}
                            {#                                </div>#}
                            <div class="card-body">
                                <h5 class="mb-0">Please Swipe...</h5>
                            </div>
                            <div class="row p-5">
                                {#                                    <div class="btn-list text-end">#}
                                <div class="btn-list text-start">
                                    <button href="#"
                                            class="btn btn-primary" id="btnpri_allowselected"
                                            data-id="Add and Allow Selected Users=>All Doors"
                                            data-name="Add and Allow Selected Users=>All Doors"
                                            data-url="/pri_allowselected_with_adduser_alldoor">
                                        <i class="fe fe-plus-square"></i>Add and Allow Selected Users=>All Doors
                                    </button>
                                    <button id="submitpause" name="submitpause" class="btn btn-outline-danger"
                                            type="submit" value="pause">
                                        pause[receiving]
                                    </button>

                                    <button id="submitadduser" name="submitadduser" class="btn btn-primary"
                                            type="submit"
                                            data-id="Only Add Selected Users"
                                            data-name="Only Add Selected Users"
                                            data-url="/pri_allowselected_with_adduser_alldoor"
                                            value="Only Add Selected Users">
                                        Only Add Selected Users
                                    </button>
                                </div>
                                <p class="card-text text-warning" id="opSelectedResultInfo" hidden>
                                </p>
                                <p class="card-text text-warning" id="opResultInfo" hidden>
                                </p>
                            </div>
                            {#                            <input type="hidden" name="wgserver1001" id="wgserver1001"#}
                            {#                                   value="{{ wgserver1001 }}">#}
                            <div class="card-body">
                                {#                                <h5 class="mb-0">Please Swipe...</h5>#}
                                <ul class="nav1 nav-column flex-column br-7 p-3" id="divInfoHelp2" hidden="hidden">
                                </ul><!-- main-mail-menu -->
                                <div class="form-group" id='cardInfo'>
                                    {#                                    <ul>#}
                                    {#                                        <li>#}
                                    {#                                            <label class="custom-control custom-checkbox no-taskEnd-checkbox-container">#}
                                    {#                                                <input type="checkbox" class="custom-control-input" id="f_Enabled"#}
                                    {#                                                       name="card001" value="334421" checked>#}
                                    {#                                                <span class="custom-control-label">334421</span>#}
                                    {#                                            </label>#}
                                    {#                                        </li>#}
                                    {#                                        <li>#}
                                    {#                                            <label class="custom-control custom-checkbox no-taskEnd-checkbox-container">#}
                                    {#                                                <input type="checkbox" class="custom-control-input" id="f_Enabled"#}
                                    {#                                                       name="card002" value="334422" checked>#}
                                    {#                                                <span class="custom-control-label">334422</span>#}
                                    {#                                            </label>#}
                                    {#                                        </li>#}
                                    {#                                    </ul>#}
                                </div>
                            </div>


                            <form>
                            </form>
                        </div>
                    </div>
                </div>
                <!--ROW CLOSED-->
            </div>
        </div>
    </div>
    <!-- CONTAINER CLOSED -->
{% endblock %}
