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

Add ng-bind to render HTML in label description #3598

Merged
merged 1 commit into from
Sep 18, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions frontend/src/views/web/challenge/submission.html
Original file line number Diff line number Diff line change
Expand Up @@ -328,14 +328,14 @@ <h5 class="w-300">Make Submission</h5>
<div class="input-field align-left col s10">
<input type="text" ng-model="attribute.value" name="{{attribute.name}}" id="{{attribute.name}}" ng-required="attribute.required === true">
<span class="form-icon"><i class="fa fa-text"></i></span>
<label for="{{attribute.name}}">{{attribute.name}} ({{attribute.description}}) <span ng-if="attribute.required === true" class="color-orange">*</span></label>
<label for="{{attribute.name}}" class ng-bind-html="attribute.name + ' (' + attribute.description + ')'" for="{{attribute.name}}"></label><span ng-if="attribute.required === true" class="color-orange">*</span>
</div>
</div>
</div>
<div ng-if="attribute.type == 'radio'">
<div class="row">
<div class="align-left col s10">
<label class="label-radio" for="{{attribute.name}}">{{attribute.name}} ({{attribute.description}}) <span ng-if="attribute.required === true" class="color-orange">*</span>></label>
<label for="{{attribute.name}}" class="label-radio" ng-bind-html="attribute.name + ' (' + attribute.description + ')'" for="{{attribute.name}}"></label><span ng-if="attribute.required === true" class="color-orange">*</span>
<div class="input-field">
<md-radio-group ng-model="attribute.value" id="{{attribute.name}}" name="{{attribute.name}}">
<md-radio-button ng-repeat="option in attribute.options" ng-value="option" ng-model="attribute.value">
Expand All @@ -349,7 +349,7 @@ <h5 class="w-300">Make Submission</h5>
<div ng-if="attribute.type == 'checkbox'">
<div class="row">
<div class="align-left col s10">
<label class="label-checkbox" for="{{attribute.name}}">{{attribute.name}} ({{attribute.description}}) <span ng-if="attribute.required === true" class="color-orange">*</span></label>
<label for="{{attribute.name}}" class="label-checkbox" ng-bind-html="attribute.name + ' (' + attribute.description + ')'" for="{{attribute.name}}"></label><span ng-if="attribute.required === true" class="color-orange">*</span>
<div class="input-field">
<div class="submission-options" ng-repeat="option in attribute.options" id="{{attribute.name}}" name="{{attribute.name}}">
<input type="checkbox" ng-click="challenge.toggleSelection(attribute, option);" id="{{option}}" ng-value="option">
Expand All @@ -363,7 +363,7 @@ <h5 class="w-300">Make Submission</h5>
<div ng-if="attribute.type == 'boolean'">
<div class="row">
<div class="align-left col s10">
<label class="label-radio" for="{{attribute.name}}">{{attribute.name}} ({{attribute.description}}) <span ng-if="attribute.required === true" class="color-orange">*</span></label>
<label for="{{attribute.name}}" class="label-radio" ng-bind-html="attribute.name + ' (' + attribute.description + ')'" for="{{attribute.name}}"></label><span ng-if="attribute.required === true" class="color-orange">*</span>
<div class="input-field">
<md-radio-group ng-model="attribute.value" id="{{attribute.name}}" name="{{attribute.name}}">
<md-radio-button ng-value="'True'">True</md-radio-button>
Expand Down