          <tr>
            {% for value in element.get_values %}
            <td>{{ value }}</td>
            {% endfor %}
<td>
<button data-dojo-type="dijit.form.Button" data-dojo-identify="{% if element.identify %}1{% else %}0{% endif %}">
{% if not element.identify %}
{% trans "Identify" %}
{% else %}
{% trans "Reset LED" %}
{% endif %}
<script type="dojo/method" data-dojo-event="onClick" data-dojo-args="evt">
var b = this;
require([
  "dojo/json",
  "dojo/request/xhr"
  ], function(
  djson, xhr) {

  b.set('label', '{% trans "Please wait..."|escapejs %}');
  b.set('disabled',true);
  var url;
  if(b.attr('data-dojo-identify') == "0") {
    url = '{% url "storage_enclosure_identify" enc=element.enclosure.num slot=element.slot %}';
  } else {
    url = '{% url "storage_enclosure_identify_clear" enc=element.enclosure.num slot=element.slot %}';
  }

  xhr.get(url, {
    handleAs: 'text'
  }).then(function(data, ioArgs) {
    try {
      var json = djson.parse(data);
      if(json.error == true) { 
        setMessage(json.message, "error");
      } else {
        setMessage(json.message);
        if(b.attr('data-dojo-identify') == "1") {
          b.attr('data-dojo-identify', '0');
          b.set('label', '{% trans "Identify"|escapejs %}');
        } else {
          b.attr('data-dojo-identify', '1');
          b.set('label', '{% trans "Reset LED"|escapejs %}');
        }
      }
    } catch(e) {
      console.log(e);
    }
    b.set('disabled', false);
  });
});
</script>
</button>

</td>
          </tr>
