<!-- Faraday Penetration Test IDE -->
<!-- Copyright (C) 2017  Infobyte LLC (http://www.infobytesec.com/) -->
<!-- See the file 'doc/LICENSE' for the license information -->

<form name="form" novalidate>
    <div class="modal-header">
        <h3 class="modal-title">{{title}}</h3>
    </div>
    <div class="modal-body">
        <div class="form-horizontal">
           <h5>
               <b>Credential</b>
           </h5>
           <div class="form-group">
                <div class="col-md-3" ng-class="{'has-error': form.nameCredential.$invalid}">
                    <input type="text" class="form-control" id="nameCredential" name="nameCredential" placeholder="Name" ng-model="credentialData.name" ng-required="credentialData.username || credentialData.password"/>
                </div>
                <div class="col-md-3" ng-class="{'has-error': form.usernameCredential.$invalid}">
                    <input type="text" class="form-control" id="usernameCredential" name="usernameCredential" placeholder="Username" ng-model="credentialData.username" ng-required="credentialData.name || credentialData.password"/>
                </div>
                <div class="col-md-3" ng-class="{'has-error': form.passwordCredential.$invalid}">
                    <input type="text" class="form-control" id="passwordCredential" name="passwordCredential" placeholder="Password" ng-model="credentialData.password" ng-required="credentialData.name || credentialData.username"/>
                </div>
           </div>
        </div>
    </div>
    <div class="modal-footer">
        <div class="modal-button">
            <button class="btn btn-success" ng-disabled="form.$invalid" ng-click="ok()">OK</button>
            <button class="btn btn-danger" ng-click="cancel()">Cancel</button>
        </div>
    </div>
</form>
