<form role="form" name="application.form" novalidate><div class="modal-header"><h3 class="modal-title">{{ editionMode ? "Edit" : "Create" | translate }} {{'an application' | translate}}</h3></div><div class="modal-body"><alert ng-repeat="alert in alerts" type="{{ alert.type }}" close="closeAlert($index)">{{alert.msg}}</alert><bootstrap-form-control id="display-name-form-control" form="application.form" label="{{ 'Display name' | translate }}" errors="{ $invalid: i18n.mandatory }"><input type="text" id="display-name" name="displayName" ng-model="application.model.displayName" maxlength="255" required/></bootstrap-form-control><bootstrap-form-control id="url-form-control" form="application.form" label="{{ 'URL' | translate }}" errors="{ $invalid: i18n.mandatory, $duplicate: i18n.duplicateUrl, $reservedToken: i18n.reservedToken}"><div class="input-group"><span class="input-group-addon">../apps/</span> <input type="text" id="url" name="token" ng-model="application.model.token" maxlength="50" urlified required ng-trim="false"/></div></bootstrap-form-control><bootstrap-form-control id="version-form-control" form="application.form" label="{{ 'Version' | translate }}" errors="{ $invalid: i18n.mandatory }"><input type="text" id="version" name="version" ng-model="application.model.version" maxlength="50" required/></bootstrap-form-control><bootstrap-form-control form="application.form" class="select-form-container" label="{{ 'Profile' | translate }}"><select id="profile" name="profile" ng-model="application.model.profileId" ng-options="profile.id as profile.name for profile in profiles" required></select></bootstrap-form-control><bootstrap-form-control form="application.form" label="{{'Description' | translate}}"><textarea id="description" name="description" ng-model="application.model.description" maxlength="1024"></textarea></bootstrap-form-control></div><div class="modal-footer"><div class="form-group has-feedback"><div><button id="btn-submit" type="submit" class="btn btn-primary" ng-disabled="application.form.$invalid" ng-click="submit(application)">{{ editionMode ? "Save" : "Create" | translate }}</button> <button id="btn-cancel" type="submit" class="btn btn-default" ng-click="cancel()">{{ 'Cancel' | translate}}</button></div></div></div></form>