OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
openproject/frontend/app/components/wp-edit/wp-edit-field/wp-edit-field.directive.html

24 lines
830 B

<div ng-click="vm.isEditable && vm.activate()" class="wp-edit-field">
<form ng-show="vm.active"
ng-if="vm.workPackage"
ng-submit="vm.submit()"
ng-switch="vm.field.type">
<div ng-switch-when="text">
<input type="text"
wp-edit-field-requirements="vm.field.schema"
ng-model="vm.workPackage[vm.fieldName]"
ng-blur="vm.deactivate()">
</div>
<div ng-switch-when="select">
<select ng-model="vm.workPackage[vm.fieldName]"
wp-edit-field-requirements="vm.field.schema"
ng-options="value as value.name for value in vm.field.options track by value.id"
ng-change="vm.submit()"
ng-blur="vm.deactivate()"></select>
</div>
</form>
<ng-transclude ng-hide="vm.active"></ng-transclude>
</div>