|
|
|
@ -8,6 +8,7 @@ import { PollService } from '../../../core/services/poll.service';
|
|
|
|
|
import { DateUtilities } from '../../old-stuff/config/DateUtilities';
|
|
|
|
|
import { DOCUMENT } from '@angular/common';
|
|
|
|
|
import { DateChoice, otherDefaultDates } from '../../old-stuff/config/defaultConfigs';
|
|
|
|
|
import { CdkDragDrop, moveItemInArray } from '@angular/cdk/drag-drop';
|
|
|
|
|
|
|
|
|
|
@Component({
|
|
|
|
|
selector: 'app-admin-form',
|
|
|
|
@ -40,7 +41,9 @@ export class FormComponent implements OnInit {
|
|
|
|
|
private apiService: ApiService,
|
|
|
|
|
@Inject(DOCUMENT) private document: any
|
|
|
|
|
) {}
|
|
|
|
|
|
|
|
|
|
drop(event: CdkDragDrop<string[]>) {
|
|
|
|
|
// moveItemInArray(this.choices, event.previousIndex, event.currentIndex);
|
|
|
|
|
}
|
|
|
|
|
get choices(): FormArray {
|
|
|
|
|
return this.form.get('choices') as FormArray;
|
|
|
|
|
}
|
|
|
|
@ -172,6 +175,7 @@ export class FormComponent implements OnInit {
|
|
|
|
|
areResultsPublic: true,
|
|
|
|
|
expiracyNumberOfDays: 60,
|
|
|
|
|
});
|
|
|
|
|
this.automaticSlug();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
askInitFormDefault(): void {
|
|
|
|
|