{% extends 'rcr/base.html' %}
{% load crispy_forms_tags %}
{% block content %}
    <h2>Item: {{object.name}}</h2>
{% comment %} {% if request.user.is_superuser %}
    (<a href="{% url 'admin:auth_user_change' object.id %}" title="Edit the user using the admin interface">Admin Edit</a>)
{% endif %} {% endcomment %}


    {% include "rcr/item_rcr_details.html" %}

    <form method="post">{% csrf_token %}
        {{ form|crispy }}
        <input type="submit" value="Update">


    </form>
    {% if skip == 0 or skip %}
        <a href="{% url 'rcr:radiology_update_next_skip_view' skip|add:1 %}"><button>Skip</button></a>
    {% endif %}

    <details><summary> </summary>
    </details>
{% endblock %}

{% block css %}
    <style>
        pre {
            white-space: pre-wrap;
        }
        select option:checked {
            color: white;
            background-color: rgba(59, 59, 59, 0.8);

        }
    </style>
{% endblock css %}

{% block js %}

    <script type="text/javascript">
        $(document).ready(function() {
    // Add a class to the selected option in the select element
            //expand = $(" <span> (Click to expand)</span>").on('click', function() {
            //        //$('#id_radiology_condition').height("800px");
            //        $('#id_radiology_condition').height() == 800 ? $('#id_radiology_condition').height(100) : $('#id_radiology_condition').height(800);
            //        $(this).text($(this).text() == ' (Click to expand)' ? ' (Click to collapse)' : ' (Click to expand)');
            //    });
            //$('#div_id_radiology_condition label').after(
            //    expand
            //);
            $('#div_id_radiology_condition').css("display", "grid");
        });
    </script>

{% endblock js %}
