(js) Mark form as dirty when removing an attendee

pull/225/head
Francis Lachapelle 2016-11-04 14:37:23 -04:00
parent 963e3f4587
commit c35e074842
2 changed files with 3 additions and 2 deletions

View File

@ -272,7 +272,7 @@
<md-icon ng-class="'icon-' + $chip.partstat"><!-- partstat --></md-icon>
<md-icon class="sg-chip-remove"
label:aria-label="Delete"
ng-click="editor.removeAttendee($chip)">close</md-icon>
ng-click="editor.removeAttendee($chip, eventForm)">close</md-icon>
</md-chip-template>
</md-chips>
<div class="ng-hide attendees" ng-show="editor.showAttendeesEditor">

View File

@ -282,10 +282,11 @@
}
}
function removeAttendee(attendee) {
function removeAttendee(attendee, form) {
vm.component.deleteAttendee(attendee);
if (vm.component.attendees.length === 0)
vm.showAttendeesEditor = false;
form.$setDirty();
}
function priorityLevel() {