Commit 40037b19 by Tim Krones

Address upstream review comments.

- Wrapp input field for max_attempts in label to be able to use classes instead of ids.
parent 3190b14e
......@@ -79,6 +79,11 @@
font-size: 100%;
}
.xblock--drag-and-drop--editor .tab .nested-input {
display: block;
margin-top: 8px;
}
.xblock--drag-and-drop--editor .tab-header,
.xblock--drag-and-drop--editor .tab-content,
.xblock--drag-and-drop--editor .tab-footer {
......
......@@ -511,7 +511,7 @@ function DragAndDropEditBlock(runtime, element, params) {
var data = {
'display_name': $element.find('#display-name').val(),
'mode': $element.find("#problem-mode").val(),
'max_attempts': $element.find("#max-attempts").val(),
'max_attempts': $element.find(".max-attempts").val(),
'show_title': $element.find('.show-title').is(':checked'),
'weight': $element.find('#weight').val(),
'problem_text': $element.find('#problem-text').val(),
......
......@@ -31,8 +31,14 @@
</select>
<span class="sr">{{ help_texts.mode }}</span>
<label class="h3 setting assessment" for="max-attempts" title="{{ help_texts.max_attempts }}">{% trans "Maximum attempts" %}</label>
<input class="setting assessment" id="max-attempts" type="number" min="1" step="1" {% if self.max_attempts %}value="{{ self.max_attempts }}"{% endif %} />
<label class="h3 setting assessment" title="{{ help_texts.max_attempts }}">
{% trans "Maximum attempts" %}
<input class="nested-input max-attempts"
type="number"
min="1"
step="1"
{% if self.max_attempts %}value="{{ self.max_attempts }}"{% endif %} />
</label>
<label class="h3" for="weight">{% trans "Maximum score" %}</label>
<input id="weight" type="number" step="0.1" value="{{ self.weight|unlocalize }}" />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment