Add maxlength attributes to matching and dropdown
Sets maxlength to 80 for matching and multiple dropdown questions input fields Fixes CNVS-19584 Test plan - Create a matching or multiple choice question - Try to enter more than 80 characters into input field - You shouldn't be able to Change-Id: I510f38db133756b3633e90295974015130dc88f2 Reviewed-on: https://gerrit.instructure.com/57554 Reviewed-by: Matt Berns <mberns@instructure.com> Reviewed-by: Ryan Taylor <rtaylor@instructure.com> Tested-by: Jenkins Product-Review: Jason Sparks <jsparks@instructure.com> QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
This commit is contained in:
parent
afb0c33f50
commit
dde4def97b
|
@ -4,14 +4,14 @@
|
|||
<tr>
|
||||
<td class="answer_select" style="width: 30px;">
|
||||
<div style="width: 30px;" class="answer_box">
|
||||
<% click_to_set_correct = t('titles.click_to_set_as_correct', "Click to set this answer as correct") %>
|
||||
<% click_to_set_correct = t("Click to set this answer as correct") %>
|
||||
<a href="#" class="select_answer_link no-hover" role="button" title="<%= click_to_set_correct %>"><%= image_tag "blank_answer.png", :class => "answer_image", :alt => click_to_set_correct %></a><br/>
|
||||
<span class="answer_weight"><input class="float_value" type="text" style="width: 25px;" aria-label="<%= t('answer_weight', "Answer Weight") %>" name="answer_weight"/>%</span>
|
||||
<span class="answer_weight"><input class="float_value" type="text" style="width: 25px;" aria-label="<%= t("Answer Weight") %>" name="answer_weight"/>%</span>
|
||||
</div>
|
||||
</td><td>
|
||||
<div class="select_answer answer_type">
|
||||
<label for="answer_text"><b><%= t 'possible_answer', 'Possible Answer' %></b></label>
|
||||
<input type="text" class="disabled_answer" style="width: 200px;" name="answer_text" aria-label="<%= t 'possible_answer', 'Possible Answer' %>" placeholder="<%= t('answer_text', 'Answer Text') %>" />
|
||||
<input type="text" class="disabled_answer" style="width: 200px;" name="answer_text" maxlength="80" aria-label="<%= t 'possible_answer', 'Possible Answer' %>" placeholder="<%= t('Answer Text (80 character limit)') %>" />
|
||||
<input type="hidden" name="answer_html"/>
|
||||
<span class="answer_html" style="display:inline-block;"></span>
|
||||
</div>
|
||||
|
@ -20,20 +20,20 @@
|
|||
</div>
|
||||
<div class="short_answer answer_type">
|
||||
<label class="short_answer_header" for="answer_text"><b><%= t 'possible_answer', 'Possible Answer' %></b></label>
|
||||
<input type="text" name="answer_text" aria-label="<%= t 'possible_answer', 'Possible Answer' %>" placeholder="<%= t('answer_text', 'Answer Text') %>"/>
|
||||
<input type="text" name="answer_text" aria-label="<%= t 'possible_answer', 'Possible Answer' %>" placeholder="<%= t('Answer Text') %>"/>
|
||||
</div>
|
||||
<div class="matching_answer answer_match answer_type">
|
||||
<div class="answer_match_left">
|
||||
<% matching_left_text = t('matching_left', 'Matching left side') %>
|
||||
<input type="text" style="width: 85%;" name="answer_match_left" placeholder="<%= matching_left_text %>" aria-label="<%= matching_left_text %>"/>
|
||||
<% matching_left_text = t('Matching left side (80 character limit)') %>
|
||||
<input type="text" style="width: 85%;" name="answer_match_left" maxlength="80" placeholder="<%= matching_left_text %>" aria-label="<%= matching_left_text %>"/>
|
||||
</div>
|
||||
<input type="hidden" name="answer_match_left_html"/>
|
||||
<div class="answer_match_left_html"></div>
|
||||
<div class="answer_match_middle">
|
||||
</div>
|
||||
<div class="answer_match_right">
|
||||
<% matching_right_text = t('matching_right', 'Matching right side') %>
|
||||
<input type="text" style="width: 95%;" name="answer_match_right" placeholder="<%= matching_right_text %>" aria-label="<%= matching_right_text %>"/>
|
||||
<% matching_right_text = t('Matching right side (80 character limit)') %>
|
||||
<input type="text" style="width: 95%;" name="answer_match_right" maxlength="80" placeholder="<%= matching_right_text %>" aria-label="<%= matching_right_text %>"/>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
@ -55,7 +55,7 @@
|
|||
</div>
|
||||
<div class="answer_comments comment empty">
|
||||
<div class="comment_top"></div>
|
||||
<% edit_comment_text = t('titles.click_to_enter_answer_comments', "Click to enter comments, if the student chooses this answer") %>
|
||||
<% edit_comment_text = t("Click to enter comments, if the student chooses this answer") %>
|
||||
<a href="#" class="comment_focus" title="<%= edit_comment_text %>">
|
||||
<span class="ellipsis">...</span>
|
||||
<i class="icon-edit standalone-icon"><span class="screenreader-only"><%= edit_comment_text %></span></i>
|
||||
|
@ -71,8 +71,8 @@
|
|||
</div>
|
||||
</td><td style="vertical-align: top; padding-top: 0.5em; text-align: right; width: 40px;">
|
||||
<div class="question_actions">
|
||||
<% edit_html_text = t('titles.edit_as_html', "Toggle editing answer text as HTML") %>
|
||||
<% delete_html_text = t('titles.delete_answer', "Delete this Answer") %>
|
||||
<% edit_html_text = t("Toggle editing answer text as HTML") %>
|
||||
<% delete_html_text = t("Delete this Answer") %>
|
||||
<a href="#" class="edit_html" title="<%= edit_html_text %>"><i class="icon-edit standalone-icon"><span class="screenreader-only"><%= edit_html_text %></span></i></a>
|
||||
<a href="#" class="delete_answer_link" title="<%= delete_html_text %>"><i class="icon-trash standalone-icon"><span class="screenreader-only"><%= delete_html_text %></span></i></a>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue