{% extends 'wgcomm/base.html' %}

{% block title %}
    ExtendedFunctions
{% endblock %}
{% block tail %}
    <script src="{{ url_for('static',filename='wgcomm/js/controller-add.js') }}"></script>
{% endblock %}
{% block tail_min %}
    <script src="{{ url_for('static',filename='wgcomm/js/controller-add.min.js') }}"></script>
{% 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">ExtendedFunctions</h1>
                    </div>
                    <div class="ms-auto pageheader-btn">
                        <ol class="breadcrumb">
                            <li class="breadcrumb-item">Configuration</li>
                            <li class="breadcrumb-item"><a href="javascript:void(0);">ExtendedFunctions</a></li>
                            <li class="breadcrumb-item active" aria-current="page">Edit</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-->
                <div class="row">
                    <div class="col-lg-12 col-md-12">
                        <div class="card">
                            <form action="{{ url_for('wgcomm_extern_setup.web_extern_setup_edit') }}" method="post">
                                <input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
                                {{ wgform._csrf }}

                                <div class="card-header border-bottom">
                                    <h4 class="mb-0">General  </h4>
                                </div>
                                {#                                <div class="card-header border-bottom">#}
                                {#                                    [勾选Enabled相应功能]#}
                                {#                                </div>#}
                                <div class="card-body">
                                    <div class="col-sm-12 col-md-12 col-xl-3 no-taskEnd-checkbox">
                                        <div class="form-group">
                                            <label class="custom-control custom-checkbox no-taskEnd-checkbox-container">
                                                <input type="checkbox" class="custom-control-input"
                                                       id="f_extfunc5678_record_doorstatus_pb"
                                                       name="f_extfunc5678_record_doorstatus_pb"
                                                        {% if wgform.f_extfunc5678_record_doorstatus_pb.data %}
                                                       value="1" checked
                                                        {% else %}
                                                       value="0"
                                                        {% endif %}
                                                >
                                                <span class="custom-control-label">{{ wgform.f_extfunc5678_record_doorstatus_pb.label }}</span>
                                            </label>
                                        </div>
                                    </div>
                                    <div class="col-sm-12 col-md-12 col-xl-3 no-taskEnd-checkbox">
                                        <div class="form-group">
                                            <label class="custom-control custom-checkbox no-taskEnd-checkbox-container">
                                                <input type="checkbox" class="custom-control-input"
                                                       id="f_extfunc5678_timeprofile"
                                                       name="f_extfunc5678_timeprofile"
                                                        {% if wgform.f_extfunc5678_timeprofile.data %}
                                                       value="1" checked
                                                        {% else %}
                                                       value="0"
                                                        {% endif %}
                                                >
                                                <span class="custom-control-label">{{ wgform.f_extfunc5678_timeprofile.label }}</span>
                                            </label>
                                        </div>
                                    </div>
                                </div>
                                <div class="card-header border-bottom">
                                    <h4 class="mb-0">Advanced  </h4>
                                </div>
                                <div class="card-body">
                                    <div class="col-sm-12 col-md-12 col-xl-3 no-taskEnd-checkbox">
                                        <div class="form-group">
                                            <label class="custom-control custom-checkbox no-taskEnd-checkbox-container">
                                                <input type="checkbox" class="custom-control-input"
                                                       id="f_extfunc5678_multi_card"
                                                       name="f_extfunc5678_multi_card"
                                                        {% if wgform.f_extfunc5678_multi_card.data %}
                                                       value="1" checked
                                                        {% else %}
                                                       value="0"
                                                        {% endif %}
                                                >
                                                <span class="custom-control-label">{{ wgform.f_extfunc5678_multi_card.label }}</span>
                                            </label>
                                        </div>
                                    </div>
                                    <div class="col-sm-12 col-md-12 col-xl-3 no-taskEnd-checkbox">
                                        <div class="form-group">
                                            <label class="custom-control custom-checkbox no-taskEnd-checkbox-container">
                                                <input type="checkbox" class="custom-control-input"
                                                       id="f_extfunc5678_fire_warn"
                                                       name="f_extfunc5678_fire_warn"
                                                        {% if wgform.f_extfunc5678_fire_warn.data %}
                                                       value="1" checked
                                                        {% else %}
                                                       value="0"
                                                        {% endif %}
                                                >
                                                <span class="custom-control-label">{{ wgform.f_extfunc5678_fire_warn.label }}</span>
                                            </label>
                                        </div>
                                    </div>
                                    <div class="col-sm-12 col-md-12 col-xl-3 no-taskEnd-checkbox">
                                        <div class="form-group">
                                            <label class="custom-control custom-checkbox no-taskEnd-checkbox-container">
                                                <input type="checkbox" class="custom-control-input"
                                                       id="f_extfunc5678_inter_lock"
                                                       name="f_extfunc5678_inter_lock"
                                                        {% if wgform.f_extfunc5678_inter_lock.data %}
                                                       value="1" checked
                                                        {% else %}
                                                       value="0"
                                                        {% endif %}
                                                >
                                                <span class="custom-control-label">{{ wgform.f_extfunc5678_inter_lock.label }}</span>
                                            </label>
                                        </div>
                                    </div>
                                    <div class="col-sm-12 col-md-12 col-xl-3 no-taskEnd-checkbox">
                                        <div class="form-group">
                                            <label class="custom-control custom-checkbox no-taskEnd-checkbox-container">
                                                <input type="checkbox" class="custom-control-input"
                                                       id="f_extfunc5678_anti_back"
                                                       name="f_extfunc5678_anti_back"
                                                        {% if wgform.f_extfunc5678_anti_back.data %}
                                                       value="1" checked
                                                        {% else %}
                                                       value="0"
                                                        {% endif %}
                                                >
                                                <span class="custom-control-label">{{ wgform.f_extfunc5678_anti_back.label }}</span>
                                            </label>
                                        </div>
                                    </div>
                                    <div class="col-sm-12 col-md-12 col-xl-3 no-taskEnd-checkbox">
                                        <div class="form-group">
                                            <label class="custom-control custom-checkbox no-taskEnd-checkbox-container">
                                                <input type="checkbox" class="custom-control-input"
                                                       id="f_extfunc5678_tasklist"
                                                       name="f_extfunc5678_tasklist"
                                                        {% if wgform.f_extfunc5678_tasklist.data %}
                                                       value="1" checked
                                                        {% else %}
                                                       value="0"
                                                        {% endif %}
                                                >
                                                <span class="custom-control-label">{{ wgform.f_extfunc5678_tasklist.label }}</span>
                                            </label>
                                        </div>
                                    </div>
                                    <div class="col-sm-12 col-md-12 col-xl-3 no-taskEnd-checkbox">
                                        <div class="form-group">
                                            <label class="custom-control custom-checkbox no-taskEnd-checkbox-container">
                                                <input type="checkbox" class="custom-control-input"
                                                       id="f_extfunc5678_one_key"
                                                       name="f_extfunc5678_one_key"
                                                        {% if wgform.f_extfunc5678_one_key.data %}
                                                       value="1" checked
                                                        {% else %}
                                                       value="0"
                                                        {% endif %}
                                                >
                                                <span class="custom-control-label">{{ wgform.f_extfunc5678_one_key.label }}</span>
                                            </label>
                                        </div>
                                    </div>
                                    <div class="col-sm-12 col-md-12 col-xl-3 no-taskEnd-checkbox">
                                        <div class="form-group">
                                            <label class="custom-control custom-checkbox no-taskEnd-checkbox-container">
                                                <input type="checkbox" class="custom-control-input"
                                                       id="f_extfunc5678_console_displayMoreLog"
                                                       name="f_extfunc5678_console_displayMoreLog"
                                                        {% if wgform.f_extfunc5678_console_displayMoreLog.data %}
                                                       value="1" checked
                                                        {% else %}
                                                       value="0"
                                                        {% endif %}
                                                >
                                                <span class="custom-control-label">{{ wgform.f_extfunc5678_console_displayMoreLog.label }}</span>
                                            </label>
                                        </div>
                                    </div>
                                    <div class="col-sm-12 col-md-12 col-xl-3 no-taskEnd-checkbox">
                                        <div class="form-group">
                                            <label class="custom-control custom-checkbox no-taskEnd-checkbox-container">
                                                <input type="checkbox" class="custom-control-input"
                                                       id="f_extfunc5678_console_location_query"
                                                       name="f_extfunc5678_console_location_query"
                                                        {% if wgform.f_extfunc5678_console_location_query.data %}
                                                       value="1" checked
                                                        {% else %}
                                                       value="0"
                                                        {% endif %}
                                                >
                                                <span class="custom-control-label">{{ wgform.f_extfunc5678_console_location_query.label }}</span>
                                            </label>
                                        </div>
                                    </div>
                                </div>
                                <div class="card-header border-bottom">
                                    <h4 class="mb-0">One-Card System  </h4>
                                </div>
                                <div class="card-body">
{#                                    <div class="col-sm-12 col-md-12 col-xl-3 no-taskEnd-checkbox">#}
{#                                        <div class="form-group">#}
{#                                            <label class="custom-control custom-checkbox no-taskEnd-checkbox-container">#}
{#                                                <input type="checkbox" class="custom-control-input"#}
{#                                                       id="f_extfunc5678_Meal"#}
{#                                                       name="f_extfunc5678_Meal"#}
{#                                                        {% if wgform.f_extfunc5678_Meal.data %}#}
{#                                                       value="1" checked#}
{#                                                        {% else %}#}
{#                                                       value="0"#}
{#                                                        {% endif %}#}
{#                                                >#}
{#                                                <span class="custom-control-label">{{ wgform.f_extfunc5678_Meal.label }}</span>#}
{#                                            </label>#}
{#                                        </div>#}
{#                                    </div>#}
                                    <div class="col-sm-12 col-md-12 col-xl-3 no-taskEnd-checkbox">
                                        <div class="form-group">
                                            <label class="custom-control custom-checkbox no-taskEnd-checkbox-container">
                                                <input type="checkbox" class="custom-control-input"
                                                       id="f_extfunc5678_elevator"
                                                       name="f_extfunc5678_elevator"
                                                        {% if wgform.f_extfunc5678_elevator.data %}
                                                       value="1" checked
                                                        {% else %}
                                                       value="0"
                                                        {% endif %}
                                                >
                                                <span class="custom-control-label">{{ wgform.f_extfunc5678_elevator.label }}</span>
                                            </label>
                                        </div>
                                    </div>
                                </div>
                                <div class="card-header border-bottom">
                                    <h4 class="mb-0">Security Protection  </h4>
                                </div>
                                <div class="card-body">
                                    <div class="col-sm-12 col-md-12 col-xl-3 no-taskEnd-checkbox">
                                        <div class="form-group">
                                            <label class="custom-control custom-checkbox no-taskEnd-checkbox-container">
                                                <input type="checkbox" class="custom-control-input"
                                                       id="f_extfunc5678_firewall"
                                                       name="f_extfunc5678_firewall"
                                                        {% if wgform.f_extfunc5678_firewall.data %}
                                                       value="1" checked
                                                        {% else %}
                                                       value="0"
                                                        {% endif %}
                                                >
                                                <span class="custom-control-label">{{ wgform.f_extfunc5678_firewall.label }}</span>
                                            </label>
                                        </div>
                                    </div>
                                </div>
                                <div class="card-body">
                                    <div class="col-sm-12 col-md-12 col-xl-3 no-taskEnd-checkbox">
                                        <div class="form-group">
                                            <label class="custom-control custom-checkbox no-taskEnd-checkbox-container">
                                                <input type="checkbox" class="custom-control-input"
                                                       id="f_extfunc5678_develop_mode"
                                                       name="f_extfunc5678_develop_mode"
                                                        {% if wgform.f_extfunc5678_develop_mode.data %}
                                                       value="1" checked
                                                        {% else %}
                                                       value="0"
                                                        {% endif %}
                                                >
                                                <span class="custom-control-label">{{ wgform.f_extfunc5678_develop_mode.label }}</span>
                                            </label>
                                        </div>
                                    </div>
                                </div>
                                <div class="row p-5">
                                    <div>
                                        [Note: Check to enable function; after modification, please reopen browser.]
                                    </div>
                                    <div class="btn-list text-end">
                                        <button id="submitsave" name="submitsaveandadd" class="btn btn-primary"
                                                type="submit" value="Get Default Value">
                                            <i class="fe fe-check-square"></i>
                                            Get Default Value
                                        </button>
                                        <button id="submitcancel" name="submitcancel" class="btn btn-outline-danger"
                                                type="submit" value="Cancel">
                                            <i class="fe fe-x-circle"></i>
                                            Close
                                        </button>
                                        <button id="submitsave" name="submitsave" class="btn btn-primary" type="submit"
                                                value="Save">
                                            <i class="fe fe-check-circle"></i>
                                            Save
                                        </button>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
                <!--ROW CLOSED-->
            </div>
        </div>
    </div>
    <!-- CONTAINER CLOSED -->
{% endblock %}
