{% if training_events.enrolled.any? %}
<div class="np-resource-title">
  Registered
</div>
<div class="np-dashboard-resources">
  <div class="row row-with-thumbnails">
    {% for training_event in training_events.enrolled %}
    <div class="col-xs-12 col-sm-6 col-lg-4 np-stretch-content">
      {% include "cards_training_event" with training_event %}
    </div>
    {% endfor %}
  </div>
</div>
{% endif %}
 <script>
window.onload = function(){
  const registered_label = document.querySelectorAll('.success');
  registered_label.forEach( registered_label => {
    if (registered_label.textContent.includes('registered')){
      registered_label.classList.add('success_green');
    }
  })
};
</script> 
