1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- <div layout="column" ng-cloak class="md-inline-form" angular-busy="appUtils.cgBusy(itemType + '.edit')">
- <md-toolbar class="md-table-toolbar md-default" >
- <div class="md-toolbar-tools">
- <md-button ng-show="!isModal" class="md-icon-button" ng-click="cancel()" title="{{ 'common.back' | translate }}">
- <md-icon class="material-icons">arrow_back</md-icon>
- </md-button>
- <span>{{ isModal ? title : (itemType + '.name' | translate:{count:selected.length}) }}</span>
- <span class="has-changed-warning" ng-show="hasChanged()">
- <md-icon title="{{ 'common.unsavedChanged' | translate }}" class="material-icons">warning</md-icon>
- </span>
- <span flex></span>
- <md-button class="md-icon-button" ng-show="item.id != null && !isModal" ng-click="askRemoveOne(item)" title="{{ 'common.delete' | translate }}">
- <md-icon class="material-icons">delete</md-icon>
- </md-button>
- </div>
- </md-toolbar>
- <md-content layout-padding>
- <form name="editForm">
- <div layout-gt-sm="row">
- <md-input-container class="md-block" flex-gt-sm>
- <label>{{ itemType + '.someText' | translate }}</label>
- <input required ng-model="item.someText">
- </md-input-container>
-
- <md-input-container class="md-block" flex-gt-sm>
- <label>{{ itemType + '.someInt' | translate }}</label>
- <input required type="number" ng-model="item.someInt">
- </md-input-container>
- </div>
- <div flex>
- <md-progress-linear ng-disabled="!running" md-mode="indeterminate"></md-progress-linear>
- </div>
- <div flex layout-gt-sm="row" layout-align=" center">
- <div layout="column">
- <span class="md-caption" ng-show="item.createdAt != null">{{ 'common.createdAt' | translate }} {{ item.createdAt | formatDateTime }}</span>
- <span class="md-caption" ng-show="item.updatedAt != null">{{ 'common.updatedAt' | translate }} {{ item.updatedAt | formatDateTime }}</span>
- </div>
- <span flex></span>
- <div>
- <md-button ng-show="isModal" class="md-raised" type="button" ng-click="cancel()">{{ 'common.cancel' | translate }}</md-button>
- <md-button class="md-raised md-primary" type="submit" ng-click="!editForm.$invalid && submit()">{{ 'common.save' | translate }}</md-button>
- </div>
- </div>
- <div ng-repeat="error in busy.errors(itemType + '.edit')" class="isa_error">
- <i class="fa fa-times-circle"></i>
- {{ error.data.message }}
- </div>
- </form>
- </md-content>
- </div>
|