1 <eg-staff-banner bannerText="Survey ID # {{surveyId}}" i18n-bannerText
2 class="mb-3"></eg-staff-banner>
3 <ul ngbNav #surveyTabs="ngbNav" [(activeId)]="surveyTab" (navChange)="onNavChange($event)" [keyboard]="true" [roles]="false" role="tablist" class="mb-3 nav-tabs">
4 <li role="presentation" [ngbNavItem]="'edit'">
5 <a i18n ngbNavLink role="tab">Edit Survey</a>
6 <ng-template ngbNavContent>
7 <div class="col-lg-6 offset-lg-3 mt-3">
8 <div style="text-align: center;">
9 <button class="p-2 mb-3 btn btn-danger btn-lg"
10 (click)="endSurvey()" i18n>
14 <eg-fm-record-editor displayMode="inline"
16 datetimeFieldsList="start_date,end_date"
17 fieldOrder="name,description,owner,start_date,end_date,opac,poll,required,usr_summary"
21 </eg-fm-record-editor>
25 <li role="presentation" [ngbNavItem]="'qanda'">
26 <a i18n ngbNavLink role="tab">Questions and Answers</a>
27 <ng-template ngbNavContent>
28 <div class="col-lg-8 offset-lg-2 mt-3">
29 <eg-staff-banner bannerText="Questions & Answers" i18n-bannerText>
31 <div *ngFor="let question of localArray; let questionIndex = index;">
32 <div class="mb-3 mt-3 p-2 bg-light input-group">
33 <label class="input-group-text">
36 <input type="text" [(ngModel)]="question.words" class="form-control"
37 name="question-{{questionIndex}}">
38 <span class="input-group-append">
39 <button class="ml-2 btn btn-info"
40 (click)="updateQuestion(question)" i18n>
43 <button class="ml-1 btn btn-danger"
44 (click)="deleteQuestion(question)" i18n>
45 Delete Question & Answers
49 <div *ngFor="let answer of question.answers; let answerIndex = index;"
50 class="mb-2 input-group">
51 <input class="form-control" type="text"
52 [(ngModel)]="answer.words"
53 name="answer-{{questionIndex}}-{{answerIndex}}">
54 <span class="input-group-append">
55 <button class="ml-2 btn btn-info"
56 (click)="updateAnswer(answer, question, questionIndex, answerIndex)"
60 <button class="ml-1 btn btn-danger" (click)="deleteAnswer(answer)"
66 <div class="mb-2 input-group">
67 <input class="form-control" type="text"
68 [(ngModel)]="newAnswerArray[questionIndex].inputText"
70 <span class="input-group-append">
71 <button class="ml-2 btn btn-info"
72 (click)="createAnswer(newAnswerArray[questionIndex].inputText, question)"
79 <div class="mb-3 mt-3 p-2 bg-light input-group">
80 <label class="input-group-text">
83 <input #newQuestionInput
86 [(ngModel)]="newQuestionText"
87 name="question-new" value="">
88 <span class="input-group-append">
89 <button class="ml-2 btn btn-info"
90 (click)="createQuestion(newQuestionText)" i18n>
91 Save Question & Add Answer
100 <div [ngbNavOutlet]="surveyTabs" class="mt-2"></div>
102 <eg-string #createAnswerString i18n-text text="New Answer Added"></eg-string>
103 <eg-string #createAnswerErrString i18n-text text="Failed to Create New Answer">
105 <eg-string #createQuestionString i18n-text text="New Question Added"></eg-string>
106 <eg-string #createQuestionErrString i18n-text text="Failed to Create New Question">
108 <eg-string #delAnswerSuccessStr i18n-text text="Survey Answer deleted">
110 <eg-string #delAnswerFailStr i18n-text text="Survey Answer deletion failed">
112 <eg-string #delQuestionSuccessStr i18n-text text="Survey Question deleted">
114 <eg-string #delQuestionFailStr i18n-text text="Survey Question deletion failed">
116 <eg-string #updateAnswerSuccessStr i18n-text text="Survey Answer updated">
118 <eg-string #updateAnswerFailStr i18n-text text="Survey Answer update failed">
120 <eg-string #updateQuestionSuccessStr i18n-text text="Survey Question updated">
122 <eg-string #updateQuestionFailStr i18n-text text="Survey Question update failed">
124 <eg-string #endSurveyFailedString i18n-text
125 text="Ending Survey failed or was not allowed"></eg-string>
126 <eg-string #endSurveySuccessString i18n-text text="Survey ended"></eg-string>
127 <eg-string #questionAlreadyStartedErrString i18n-text
128 text="The survey Start Date must be set for the future to add new questions or modify existing questions.">