Commit 978c329e authored by ericksho-ipre's avatar ericksho-ipre

acotamos el largo de caracteres en las preguntas a 255

parent 7ae18e04
......@@ -11,8 +11,9 @@
<form>
<div class="form-group">
<label for="exampleInputEmail1">Nueva pregunta</label>
<textarea class="form-control" rows="3" onkeypress="checkQuestionLength()" id="new_question"></textarea>
<textarea class="form-control" maxlength="255" rows="3" onkeypress="checkQuestionLength()" id="new_question"></textarea>
<div id="question-alert"><kbd> La pregunta debe tener al menos 10 caracteres</kbd></div>
<div id="question-alert2"><kbd> La pregunta puede tener como máximo 255 caracteres</kbd></div>
</div>
<input type="button" class="btn btn-primary" disabled id="preguntar" value="Preguntar" onclick="submitQuestion()">
</form>
......@@ -29,6 +30,7 @@
window.onload = function() {
updateQuestions();
$('#question-alert2').hide();
};
window.setInterval(function(){
......@@ -50,6 +52,15 @@
$('#preguntar').prop("disabled", false);
$('#question-alert').hide();
}
if(question.length >= 250)
{
$('#question-alert2').show();
}
else
{
$('#question-alert2').hide();
}
}
var allQuestions = null;
......
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