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"
16 fieldOrder="name,description,owner,start_date,end_date,opac,poll,required,usr_summary"
20 </eg-fm-record-editor>
24 <ngb-tab title="Questions and Answers" i18n-title id="qanda">
25 <ng-template ngbTabContent>
26 <div class="col-lg-8 offset-lg-2 mt-3">
27 <eg-staff-banner bannerText="Questions & Answers" i18n-bannerText>
29 <div *ngFor="let question of localArray; let questionIndex = index;">
30 <div class="mb-3 mt-3 p-2 bg-light input-group">
31 <label class="input-group-text">
34 <input type="text" [(ngModel)]="question.words" class="form-control"
35 name="question-{{questionIndex}}">
36 <span class="input-group-append">
37 <button class="ml-2 btn btn-info"
38 (click)="updateQuestion(question)" i18n>
41 <button class="ml-1 btn btn-danger"
42 (click)="deleteQuestion(question)" i18n>
43 Delete Question & Answers
47 <div *ngFor="let answer of question.answers; let answerIndex = index;"
48 class="mb-2 input-group">
49 <input class="form-control" type="text"
50 [(ngModel)]="answer.words"
51 name="answer-{{questionIndex}}-{{answerIndex}}">
52 <span class="input-group-append">
53 <button class="ml-2 btn btn-info"
54 (click)="updateAnswer(answer, question, questionIndex, answerIndex)"
58 <button class="ml-1 btn btn-danger" (click)="deleteAnswer(answer)"
64 <div class="mb-2 input-group">
65 <input class="form-control" type="text"
66 [(ngModel)]="newAnswerArray[questionIndex].inputText"
68 <span class="input-group-append">
69 <button class="ml-2 btn btn-info"
70 (click)="createAnswer(newAnswerArray[questionIndex].inputText, question)"
77 <div class="mb-3 mt-3 p-2 bg-light input-group">
78 <label class="input-group-text">
81 <input #newQuestionInput
84 [(ngModel)]="newQuestionText"
85 name="question-new" value="">
86 <span class="input-group-append">
87 <button class="ml-2 btn btn-info"
88 (click)="createQuestion(newQuestionText)" i18n>
89 Save Question & Add Answer
98 <eg-string #createAnswerString i18n-text text="New Answer Added"></eg-string>
99 <eg-string #createAnswerErrString i18n-text text="Failed to Create New Answer">
101 <eg-string #createQuestionString i18n-text text="New Question Added"></eg-string>
102 <eg-string #createQuestionErrString i18n-text text="Failed to Create New Question">
104 <eg-string #delAnswerSuccessStr i18n-text text="Survey Answer deleted">
106 <eg-string #delAnswerFailStr i18n-text text="Survey Answer deletion failed">
108 <eg-string #delQuestionSuccessStr i18n-text text="Survey Question deleted">
110 <eg-string #delQuestionFailStr i18n-text text="Survey Question deletion failed">
112 <eg-string #updateAnswerSuccessStr i18n-text text="Survey Answer updated">
114 <eg-string #updateAnswerFailStr i18n-text text="Survey Answer update failed">
116 <eg-string #updateQuestionSuccessStr i18n-text text="Survey Question updated">
118 <eg-string #updateQuestionFailStr i18n-text text="Survey Question update failed">
120 <eg-string #endSurveyFailedString i18n-text
121 text="Ending Survey failed or was not allowed"></eg-string>
122 <eg-string #endSurveySuccessString i18n-text text="Survey ended"></eg-string>
123 <eg-string #questionAlreadyStartedErrString i18n-text
124 text="The survey Start Date must be set for the future to add new questions or modify existing questions.">