Skip to content

Commit

Permalink
Remove no hint message after requesting first hint
Browse files Browse the repository at this point in the history
  • Loading branch information
Dillon Lareau committed Apr 17, 2020
1 parent d95e51a commit 3f4777c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions huntserver/static/huntserver/hint.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,9 @@ jQuery(document).ready(function($) {
ajax_delay = 120;
}
}
$("#num_available_hints").html(string_start + response.num_available_hints +
string_mid + ((response.num_available_hints == 1) ? '' : 's') + string_end)
$("#num_available_hints").html(string_start + response.num_available_hints +
string_mid + ((response.num_available_hints == 1) ? '' : 's') + string_end);
$("#no_hint_message").hide();
},
error: function (html) {
console.log(html);
Expand Down Expand Up @@ -83,8 +84,9 @@ jQuery(document).ready(function($) {
response = JSON.parse(response);
receiveMessage(response.hint_list[0]);
last_date = response.last_date;
$("#num_available_hints").html(string_start + response.num_available_hints +
string_mid + ((response.num_available_hints == 1) ? '' : 's') + string_end)
$("#num_available_hints").html(string_start + response.num_available_hints +
string_mid + ((response.num_available_hints == 1) ? '' : 's') + string_end);
$("#no_hint_message").hide();
}
});
$('#id_request').val('');
Expand Down
2 changes: 1 addition & 1 deletion huntserver/templates/puzzle_hint.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ <h3>Previous Hint Requests: </h3>
{% endif %}
</table>
{% if not hint_list %}
<h4> You have not yet submitted any hint requests for this puzzle </h4>
<h4 id="no_hint_message"> You have not yet submitted any hint requests for this puzzle </h4>
{% endif %}
</div>
</div>
Expand Down

0 comments on commit 3f4777c

Please sign in to comment.