1 <eg-staff-banner bannerText="Survey ID # {{surveyId}}" i18n-bannerText
2 class="mb-3"></eg-staff-banner>
3 <ngb-tabset #surveyTabs [activeId]="surveyTab" (tabChange)="onTabChange($event)" class="mb-3">
4 <ngb-tab title="Edit Survey" i18n-title id="edit">
5 <ng-template ngbTabContent>
6 <div class="col-lg-6 offset-lg-3 mt-3">
7 <div style="text-align: center;">
8 <button class="p-2 mb-3 btn btn-danger btn-lg"
9 (click)="endSurvey()" i18n>
13 <eg-fm-record-editor displayMode="inline"
15 datetimeFieldsList="start_date,end_date"
19 </eg-fm-record-editor>
23 <ngb-tab title="Questions and Answers" i18n-title id="qanda">
24 <ng-template ngbTabContent>
25 <div class="col-lg-8 offset-lg-2 mt-3">
26 <eg-staff-banner bannerText="Questions & Answers" i18n-bannerText>
28 <div *ngFor="let question of localArray; let questionIndex = index;">
29 <div class="mb-3 mt-3 p-2 bg-light input-group">
30 <label class="input-group-text">
33 <input type="text" [(ngModel)]="question.words" class="form-control"
34 name="question-{{questionIndex}}">
35 <span class="input-group-append">
36 <button class="ml-2 btn btn-info"
37 (click)="updateQuestion(question)" i18n>
40 <button class="ml-1 btn btn-danger"
41 (click)="deleteQuestion(question)" i18n>
42 Delete Question & Answers
46 <div *ngFor="let answer of question.answers; let answerIndex = index;"
47 class="mb-2 input-group">
48 <input class="form-control" type="text"
49 [(ngModel)]="answer.words"
50 name="answer-{{questionIndex}}-{{answerIndex}}">
51 <span class="input-group-append">
52 <button class="ml-2 btn btn-info"
53 (click)="updateAnswer(answer, question, questionIndex, answerIndex)"
57 <button class="ml-1 btn btn-danger" (click)="deleteAnswer(answer)"
63 <div class="mb-2 input-group">
64 <input class="form-control" type="text"
65 [(ngModel)]="newAnswerArray[questionIndex].inputText"
67 <span class="input-group-append">
68 <button class="ml-2 btn btn-info"
69 (click)="createAnswer(newAnswerArray[questionIndex].inputText, question)"
76 <div class="mb-3 mt-3 p-2 bg-light input-group">
77 <label class="input-group-text">
80 <input #newQuestionInput
83 [(ngModel)]="newQuestionText"
84 name="question-new" value="">
85 <span class="input-group-append">
86 <button class="ml-2 btn btn-info"
87 (click)="createQuestion(newQuestionText)" i18n>
88 Save Question & Add Answer
97 <eg-string #createAnswerString i18n-text text="New Answer Added"></eg-string>
98 <eg-string #createAnswerErrString i18n-text text="Failed to Create New Answer">
100 <eg-string #createQuestionString i18n-text text="New Question Added"></eg-string>
101 <eg-string #createQuestionErrString i18n-text text="Failed to Create New Question">
103 <eg-string #delAnswerSuccessStr i18n-text text="Survey Answer deleted">
105 <eg-string #delAnswerFailStr i18n-text text="Survey Answer deletion failed">
107 <eg-string #delQuestionSuccessStr i18n-text text="Survey Question deleted">
109 <eg-string #delQuestionFailStr i18n-text text="Survey Question deletion failed">
111 <eg-string #updateAnswerSuccessStr i18n-text text="Survey Answer updated">
113 <eg-string #updateAnswerFailStr i18n-text text="Survey Answer update failed">
115 <eg-string #updateQuestionSuccessStr i18n-text text="Survey Question updated">
117 <eg-string #updateQuestionFailStr i18n-text text="Survey Question update failed">
119 <eg-string #endSurveyFailedString i18n-text
120 text="Ending Survey failed or was not allowed"></eg-string>
121 <eg-string #endSurveySuccessString i18n-text text="Survey ended"></eg-string>
122 <eg-string #questionAlreadyStartedErrString i18n-text
123 text="The survey Start Date must be set for the future to add new questions or modify existing questions.">