<!--
  ~
  ~ Headwind MDM: Open Source Android MDM Software
  ~ https://h-mdm.com
  ~
  ~ Copyright (C) 2019 Headwind Solutions LLC (http://h-sms.com)
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~       http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  ~
  -->

<!-- Localization completed -->
<div class="width-1000" ng-controller="PluginsTabController">
    <div class="text-center">
        <h4 localized>form.settings.plugins.title</h4>
    </div>

    <div>
        <div class='form-group' ng-if='errorMessage'>
            <div class='error'><span>{{errorMessage}}</span></div>
        </div>
        <div class='form-group' ng-if='successMessage'>
            <div class='success'><span>{{successMessage}}</span></div>
        </div>
    </div>

    <form class="form-horizontal margin-top-40" ng-if="plugins && pluginSelection">
        <div class="form-group" ng-repeat="plugin in plugins">
            <div class="col-sm-6 text-right">
                <label for="pl{{plugin.id}}">{{plugin.localizedName}}</label>
            </div>
            <div class="col-sm-1">
                <input type="checkbox" id="pl{{plugin.id}}" ng-disabled="loading"
                       ng-model="pluginSelection[plugin.id]" class="form-control"/>
            </div>
        </div>

        <div class="form-group">
            <div class="col-sm-offset-6">
                <button class="btn btm-default" ng-click="save()" ng-disabled="loading"
                        localized>button.save</button>
            </div>
        </div>
    </form>
</div>