<div class="modal-header">
    <h4>Add Asset Type</h4>
    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
            aria-hidden="true">&times;</span></button>
</div>
<div class="modal-body">

        <div class="container col-md-12">
        <form method="post" action="" id="form_new_asset_type" enctype="multipart/form-data">
            <div class="col-md-12 col-lg-12 col-sm-12">
                {{ form.hidden_tag() }}
                <div class="form-group">
                    <label for="asset_type" class="mr-4">Asset Type
                    </label>
                    {{ form.asset_name(class='form-control',  autocomplete="off") }}
                </div>
                <div class="form-group mt-3">
                    <label for="asset_description" class="placeholder">Asset Type description</label>
                    {{ form.asset_description(class='form-control',  autocomplete="off") }}
                </div>
                <div class="row ml-2">
                {% if assettype.asset_icon_not_compromised %}
                    <div class="form-group col-2">
                        <label for="asset_icon_not_compromised" class="mr-4">Preview</label>
                        <div id="asset_icon_not_compromised">
                            <img style="width:2em;height:2em" src="{{ assettype.asset_icon_not_compromised_path }}">
                        </div>
                    </div>
                    <div class="form-group col">
                        <label for="asset_icon_compromised" class="mr-4">Asset Icon - not compromised
                        </label>
                        {{ form.asset_icon_not_compromised(class='form-control',type='file', accept='.svg, .png') }}
                    </div>
                {% else %}
                    <div class="form-group col">
                        <label for="asset_icon_compromised" class="mr-4">Asset Icon - not compromised
                        </label>
                        {{ form.asset_icon_not_compromised(class='form-control',type='file', required='false', value=assettype.asset_icon_not_compromised, accept='.svg, .png') }}
                    </div>
                {% endif %}
                </div>
                <div class="row ml-2">
                    {% if assettype.asset_icon_compromised %}
                        <div class="form-group col-2">
                            <label for="asset_icon_compromised" class="mr-4">Preview</label>
                            <div id="asset_icon_compromised">
                                <img style="width:2em;height:2em" src="{{ assettype.asset_icon_compromised_path }}">
                            </div>
                        </div>
                        <div class="form-group col">
                            <label for="asset_icon_compromised" class="mr-4">Asset Icon - compromised
                            </label>
                            {{ form.asset_icon_compromised(class='form-control',type='file', accept='.svg, .png') }}
                        </div>
                    {% else %}
                        <div class="form-group col">
                            <label for="asset_icon_compromised" class="mr-4">Asset Icon - compromised
                            </label>
                            {{ form.asset_icon_compromised(class='form-control', type='file', required='false', value=assettype.asset_icon_compromised, accept='.svg, .png') }}
                        </div>
                    {% endif %}
                </div>

            {% if assettype.asset_id %}
                <button type="button" class="btn btn-outline-danger mt-5"
                onclick="delete_asset_type('{{ assettype.asset_id }}');">Delete</button>
                <button type="submit" class="btn btn-outline-success ml-4 mt-5 float-right"
                id="submit_new_assettype">Update</button>

            {% else %}

                <button type="submit" class="btn btn-outline-success ml-4 mt-5 float-right"
                id="submit_new_assettype">Save</button>

            {% endif %}
            </div>
        </form>
    </div>

</div>
