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 dateFieldOrderList="start_date,end_date"
18 fieldOrder="name,description,owner,start_date,end_date,opac,poll,required,usr_summary"
22 </eg-fm-record-editor>
26 <li role="presentation" [ngbNavItem]="'qanda'">
27 <a i18n ngbNavLink role="tab">Questions and Answers</a>
28 <ng-template ngbNavContent>
29 <div class="col-lg-8 offset-lg-2 mt-3">
30 <eg-staff-banner bannerText="Questions & Answers" i18n-bannerText>
32 <div *ngFor="let question of localArray; let questionIndex = index;">
33 <div class="mb-3 mt-3 p-2 bg-light input-group">
34 <label class="input-group-text">
37 <input type="text" [(ngModel)]="question.words" class="form-control"
38 name="question-{{questionIndex}}">
39 <span class="input-group-append">
40 <button class="ml-2 btn btn-info"
41 (click)="updateQuestion(question)" i18n>
44 <button class="ml-1 btn btn-danger"
45 (click)="deleteQuestion(question)" i18n>
46 Delete Question & Answers
50 <div *ngFor="let answer of question.answers; let answerIndex = index;"
51 class="mb-2 input-group">
52 <input class="form-control" type="text"
53 [(ngModel)]="answer.words"
54 name="answer-{{questionIndex}}-{{answerIndex}}">
55 <span class="input-group-append">
56 <button class="ml-2 btn btn-info"
57 (click)="updateAnswer(answer, question, questionIndex, answerIndex)"
61 <button class="ml-1 btn btn-danger" (click)="deleteAnswer(answer)"
67 <div class="mb-2 input-group">
68 <input class="form-control" type="text"
69 [(ngModel)]="newAnswerArray[questionIndex].inputText"
71 <span class="input-group-append">
72 <button class="ml-2 btn btn-info"
73 (click)="createAnswer(newAnswerArray[questionIndex].inputText, question)"
80 <div class="mb-3 mt-3 p-2 bg-light input-group">
81 <label class="input-group-text">
84 <input #newQuestionInput
87 [(ngModel)]="newQuestionText"
88 name="question-new" value="">
89 <span class="input-group-append">
90 <button class="ml-2 btn btn-info"
91 (click)="createQuestion(newQuestionText)" i18n>
92 Save Question & Add Answer
101 <div [ngbNavOutlet]="surveyTabs" class="mt-2"></div>
103 <eg-string #createAnswerString i18n-text text="New Answer Added"></eg-string>
104 <eg-string #createAnswerErrString i18n-text text="Failed to Create New Answer">
106 <eg-string #createQuestionString i18n-text text="New Question Added"></eg-string>
107 <eg-string #createQuestionErrString i18n-text text="Failed to Create New Question">
109 <eg-string #delAnswerSuccessStr i18n-text text="Survey Answer deleted">
111 <eg-string #delAnswerFailStr i18n-text text="Survey Answer deletion failed">
113 <eg-string #delQuestionSuccessStr i18n-text text="Survey Question deleted">
115 <eg-string #delQuestionFailStr i18n-text text="Survey Question deletion failed">
117 <eg-string #updateAnswerSuccessStr i18n-text text="Survey Answer updated">
119 <eg-string #updateAnswerFailStr i18n-text text="Survey Answer update failed">
121 <eg-string #updateQuestionSuccessStr i18n-text text="Survey Question updated">
123 <eg-string #updateQuestionFailStr i18n-text text="Survey Question update failed">
125 <eg-string #endSurveyFailedString i18n-text
126 text="Ending Survey failed or was not allowed"></eg-string>
127 <eg-string #endSurveySuccessString i18n-text text="Survey ended"></eg-string>
128 <eg-string #questionAlreadyStartedErrString i18n-text
129 text="The survey Start Date must be set for the future to add new questions or modify existing questions.">