<form class="NewArtifact" name="newArtifactForm" ng-submit="createCtrl.create(createCtrl.type, createCtrl.name)">
    <div class="modal-header">
        <h3 class="modal-title" translate>Create new artifact</h3>
    </div>
    <div class="modal-body">
        <div class="form-group NewArtifact-type">
            <label for="type" tranlate>Type</label>

            <div class="radio" ng-repeat="type in createCtrl.types">
                <label><input type="radio" name="type" id="type-{{type.key}}" ng-model="createCtrl.type" ng-value="type">{{type.value | translate}}
                    <i ng-if="type.tooltip" class="fa fa-info-circle" uib-tooltip="{{type.tooltip | translate}}" tooltip-placement="top"></i>
                </label>
            </div>
        </div>
        <div class="form-group">
            <label for="name" translate>Name</label>
            <input id="name" name="name" type="text" class="form-control" required autofocus
                   placeholder="{{ createCtrl.type.value + ' name' | translate }}"
                   ng-model="createCtrl.name"
                   ui-validate="{alreadyExists : '!createCtrl.isArtifactNameAlreadyExist($value, createCtrl.type)'}"
                   ui-validate-watch="'createCtrl.type'"
                   artifact-name-validation>
        </div>
    </div>
    <div class="modal-footer">
        <button type="submit" class="btn btn-primary" ng-disabled="newArtifactForm.$invalid" translate>Create</button>
        <button type="button" class="btn btn-link" ng-click="createCtrl.close()" translate>Cancel</button>
    </div>
</form>
