Remove required
This commit is contained in:
parent
753badab38
commit
1650cb7878
2 changed files with 3 additions and 7 deletions
|
@ -3,10 +3,6 @@ function filterClasse() {
|
|||
$("#eleves div.form-group").filter(function() {
|
||||
var text = $(this).attr('classe').toLowerCase();
|
||||
$(this).toggle(text.indexOf(value) > -1);
|
||||
if (text.indexOf(value) > -1)
|
||||
$(this).find('.form-control').removeAttr('required');
|
||||
else
|
||||
$(this).find('.form-control').addAttr('required');
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -16,4 +12,4 @@ jQuery(function(){
|
|||
});
|
||||
|
||||
filterClasse();
|
||||
});
|
||||
});
|
||||
|
|
|
@ -40,11 +40,11 @@
|
|||
<div class="form-group" classe="{{ eleve.getClasse() }}">
|
||||
<label class="control-label col-sm-2" for="eleve_{{ eleve.getId() }}">{{ eleve.getNom() }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="number" class="form-control" id="eleve_{{ eleve.getId() }}" name="eleve_{{ eleve.getId() }}" min="0" max="20" step="0.1" required>
|
||||
<input type="number" class="form-control" id="eleve_{{ eleve.getId() }}" name="eleve_{{ eleve.getId() }}" min="0" max="20" step="0.1">
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-default">Envoyer</button>
|
||||
</form>
|
||||
</form>
|
||||
|
|
Loading…
Reference in a new issue