{% extends "base.html" %}

{% block title %}Maintenance Mode {{ super() }}{% endblock %}
{% block menu %}{% include 'menu.html' %}{% endblock %}
{% block body %}
	{{ super() }}
    <br />
    <div class="row">
	    <h1>Maintenance Mode</h1>
		{% for platform_status in platforms %}
			<h3>{{ platform_status.platform.description }}</h3>
			<div class="switch">
                <input id="{{platform_status.platform}}" class="toggle toggle-round" type="checkbox"{% if platform_status.disabled %}checked="checked"{% endif %}>
				<label for="{{platform_status.platform}}"></label>
			</div>
		{% endfor %}
    </div>
{% endblock %}
{% block scripts %}
	{{ super() }}
	<script type="text/javascript">
		$('input:checkbox').on('change', function () {
		    var platform, status, url;

            platform = $(this).attr('id');
            status = $(this).is(':checked') ? 'True' : 'False';
            url = "{{ url_for('ci.toggle_maintenance', platform='_0_', status='_1_') }}";
            url = url.replace('_0_', platform).replace('_1_', status);

            $.ajax({
                type: "GET",
                url: url,
                dataType: "json",
                success: function (data) {
                    console.log(data.message);
                },
                failure: function (errMsg) {
                    console.log("Error Fetching");
                }
            });
        });
	</script>
{% endblock %}
{% extends "base.html" %}

{% block title %}Maintenance Mode {{ super() }}{% endblock %}
{% block menu %}{% include 'menu.html' %}{% endblock %}
{% block body %}
	{{ super() }}
    <br />
    <div class="row">
	    <h1>Maintenance Mode</h1>
		{% for platform_status in platforms %}
			<h3>{{ platform_status.platform.description }}</h3>
			<div class="switch">
                <input id="{{platform_status.platform.value}}" class="toggle toggle-round" type="checkbox"{% if platform_status.disabled %}checked="checked"{% endif %}>
				<label for="{{platform_status.platform.value}}"></label>
			</div>
		{% endfor %}
    </div>
{% endblock %}
{% block scripts %}
	{{ super() }}
	<script type="text/javascript">
		$('input:checkbox').on('change', function () {
		    var platform, status, url;

            platform = $(this).attr('id');
            status = $(this).is(':checked') ? 'True' : 'False';
            url = "{{ url_for('ci.toggle_maintenance', platform='_0_', status='_1_') }}";
            url = url.replace('_0_', platform).replace('_1_', status);

            $.ajax({
                type: "GET",
                url: url,
                dataType: "json",
                success: function (data) {
                    console.log(data.message);
                },
                failure: function (errMsg) {
                    console.log("Error Fetching");
                }
            });
        });
	</script>
{% endblock %}
Fix platform name in id
Fix platform name in id
