{% extends "kegadmin/base.html" %}
{% load kegweblib %}
{% load crispy_forms_tags %}

{% block title %}Kegbot Admin: Add Keg | {{ block.super }}{% endblock %}
{% block pagetitle %}Kegbot Admin: Add Keg {% endblock %}

{% block kegadmin-main %}

{% include 'kegadmin/includes/keg_nav.html' %}

{% crispy form %}

{% endblock %}

{% block kb-extrajs %}
<script>

$(document).ready(function() {
  $('#div_id_initial_volume').hide();

  $('#id_keg_size').change(function() {
    var choice = $(this).val();
    if (choice == 'other') {
      $('#div_id_initial_volume').fadeIn();
    } else {
      $('#div_id_initial_volume').fadeOut();
    }
  });
});

</script>
{% endblock %}