formbar / formbar / templates / timefield.mako

Full commit
% if field.is_readonly():
  <div class="readonlyfield" name="${}">
% else:
  <input class="form-control" id="${}" type="text" name="${}" value="${field.get_value()}" placeholder="HH:MM:SS"/>
% endif
$('#${}').keyup(function() {
    /* TODO: Check wo to improve to prevent the user to insert only
    allowed chars. Now the char can be entered but it gets replaced
    imediately if it does not match the allowed char. (None) <2013-08-25
    21:11> */
    this.value = this.value.replace(/[^0-9:]/g, '');