<div class="modal-header">
    <button type="button" class="close closebtn" data-ng-click="vm.cancel()" aria-hidden="true">&times;</button>
    <h1 class="modal-title">{{vm.editMode ? 'Update custom module' : 'Add custom module' | translate}}</h1>    
</div>
<div class="modal-body customModules">
    <div class="container-fluid" style="overflow-y:auto;">
        <form name="myForm">
            <div class="form-group">
                <label>{{'Title' | translate}}*</label>
                <input class="form-control" type="text" name="title" maxlength="126" placeholder="{{'Title' | translate}}" ng-model="vm.selectedModule.Title" required />
            </div>
            <div class="form-group">
                <label>{{'Version' | translate}}*</label>
                <input class="form-control" type="text" name="version" maxlength="126" placeholder="{{'Version' | translate}}" ng-model="vm.selectedModule.Version" required />
            </div>
            <div class="form-group">
                <label>{{'Description' | translate}}</label>
                <input class="form-control" type="text" maxlength="126" placeholder="{{'Description' | translate}}" ng-model="vm.selectedModule.Description" />
            </div>
            <div class="form-group">
                <label>{{'Icon' | translate}}</label>
                <wizdom365-icon-picker value="{{vm.selectedModule.Icon}}" ng-model="vm.selectedModule.Icon"></wizdom365-icon-picker>
            </div>
            <div class="form-group">
                <label>{{'Admin page' | translate}}*</label>
                <input class="form-control" type="text" name="moduleUrl" placeholder="https://" ng-model="vm.selectedModule.ModuleUrl" required />
            </div>
            <div class="form-group">
                <label>{{'Js link' | translate}}</label>
                <input class="form-control" type="text" name="jsLink" placeholder="https://....js" ng-model="vm.selectedModule.JsLink" />
            </div>
            <div class="form-group">
                <label>{{'Css link' | translate}}</label>
                <input class="form-control" type="text" name="cssLink" placeholder="https://....css" ng-model="vm.selectedModule.CssLink" />
            </div>

            <div class="form-group">
                <label>{{'Enabled' | translate}}</label>
                <br />
                <input type="checkbox" ng-init="vm.selectedModule.Enabled = vm.selectedModule.Enabled || !vm.editMode" ng-model="vm.selectedModule.Enabled" />
            </div> 
        </form>
</div>
</div>
<div class="modal-footer">    
    <button ng-show="vm.editMode" class="btn btn-danger" type="button" ng-click="vm.delete()">{{'Delete' | translate}}</button>
    <button class="btn btn-default" type="button" ng-click="vm.cancel()">{{'Cancel' | translate}}</button>
    <button ng-disabled="!myForm.$valid" class="btn btn-primary" type="button" ng-click="vm.ok()">{{'Ok' | translate}}</button>
</div>
