Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#12652] Copying feedback session: mark session name as mandatory field when copying feedback session #12670

Merged
merged 7 commits into from
Dec 23, 2023
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,26 @@ exports[`CopySessionModalComponent should snap with default fields 1`] = `
>
<label>
<b>
Name for copied session
Name for copied session*
</b>
</label>
<input
class="form-control ng-untouched ng-pristine ng-valid"
class="form-control ng-untouched ng-pristine ng-invalid"
id="copy-session-name"
maxlength="64"
required=""
type="text"
/>
<div
class="invalid-field"
hidden=""
>
<i
aria-hidden="true"
class="fa fa-exclamation-circle"
/>
The field "Name for copied session" should not be empty.
</div>
<span>
64 characters left
</span>
Expand Down Expand Up @@ -124,15 +135,26 @@ exports[`CopySessionModalComponent should snap with some session and courses can
>
<label>
<b>
Name for copied session
Name for copied session*
</b>
</label>
<input
class="form-control ng-untouched ng-pristine ng-valid"
class="form-control ng-untouched ng-pristine ng-invalid"
id="copy-session-name"
maxlength="64"
required=""
type="text"
/>
<div
class="invalid-field"
hidden=""
>
<i
aria-hidden="true"
class="fa fa-exclamation-circle"
/>
The field "Name for copied session" should not be empty.
</div>
<span>
52 characters left
</span>
Expand Down Expand Up @@ -201,4 +223,4 @@ exports[`CopySessionModalComponent should snap with some session and courses can
</button>
</div>
</tm-copy-session-modal>
`;
`;
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,13 @@ <h5 class="modal-title">
<div class="row">
<div class="col-12">
<div class="form-group">
<label><b>Name for copied session</b></label>
<input id="copy-session-name" type="text" class="form-control" [(ngModel)]="newFeedbackSessionName" [maxlength]="FEEDBACK_SESSION_NAME_MAX_LENGTH">
<label><b>Name for copied session*</b></label>
<input id="copy-session-name" type="text" class="form-control" [(ngModel)]="newFeedbackSessionName" [maxlength]="FEEDBACK_SESSION_NAME_MAX_LENGTH"
required #newSessionName="ngModel">
<div [hidden]="newSessionName.valid || (newSessionName.pristine && newSessionName.untouched)" class="invalid-field">
<i class="fa fa-exclamation-circle" aria-hidden="true"></i>
The field "Name for copied session" should not be empty.
</div>
<span>{{ FEEDBACK_SESSION_NAME_MAX_LENGTH - newFeedbackSessionName.length }} characters left</span>
</div>
<div class="form-check" *ngFor="let course of courseCandidates">
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.invalid-field {
padding-top: 5px;
color: #B50000;
}
Loading