ta) {
      if (data.error) {
        $('p.error').remove();
        for (var key in data.response) {
          $('#' + key).after('<p class="error">' + data.response[key] + '</p>');
        }
      } else {
          if (data.edit){
            window.location = '{% url "dashboard:companies" 'company' %}?active=' + data.company_active;
          }
          else{
            window.location = '{% url "dashboard:companies" 'company' %}';
          }
        }
      }
  });
</script>
{% endblock script %}
