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

{% block title %}
    Alarm Option
{% endblock %}
{% block tail %}
    <script src="static/wgcomm/js/datepicker.js"></script>
    <script src="static/wgcomm/js/wgdatepicker.js"></script>
    <script src="static/wgcomm/js/user-photo.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="static/wgcomm/js/user-photo.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">Alarm Option</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);">Alarm Option</a></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="col-lg-6 col-md-6">
                        <div class="card">
                            <form action="{{ url_for('wgcomm_extern_peripheral_control.web_extern_peripheral_control_option') }}"
                                  method="post" enctype="multipart/form-data" id="formA">
                                <input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
                                {{ wgform._csrf }}
                                <div class="card-body">
                                    <div class="form-group">
                                        <label class="custom-control custom-checkbox no-taskEnd-checkbox-container">
                                            <input type="checkbox" class="custom-control-input" id="f_fire_share"
                                                   name="f_fire_share"
                                                    {% if wgform.f_fire_share.data %}
                                                   value="1" checked
                                                    {% else %}
                                                   value="0"
                                                    {% endif %}
                                            >
                                            <span class="custom-control-label">{{ wgform.f_fire_share.label }}</span>
                                        </label>
                                    </div>

                                    <div class="form-group">
                                        {{ wgform.f_forceopen_password.label }}
                                        {{ wgform.f_forceopen_password( class="form-control") }}
                                    </div>
                                    <div class="form-group">
                                        {{ wgform.f_opendoor_timeout.label }}
                                        {{ wgform.f_opendoor_timeout( class="form-control") }}
                                    </div>

                                </div>

                                <div class="row p-5">
                                    <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>
                                            Cancel
                                        </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 %}
