{% extends 'bp_util_base.html' %}
            {% block tools %}
                <li class="active"><a href="{{url_for('eisenutil_bp.about')}}">Tools</a>
            {% endblock %}
{% block content %}

    <h1>{% block title %} Tools {% endblock %}</h1>

        <hr>
                    <h3>Export</h3>
                    <p>Export, Backup Radio Names and URLs from database to settings.ini file. ("Save" path)</p>
                    <p></p>
                    <form id="export_all_radios_form" action="{{ url_for('eisenutil_bp.tools_export_ini') }}" method="post">
                        <div class="form-group">
                            <input class="btn btn-primary btn-sm"
                                   type="submit"
                                   id="export_all_radios"
                                   value="Export"
                                   onclick=""
                                   name="post_export_to_ini">
                            <label for="export_all_radios"> Path: {{ export_path }}
                            </label>
                        </div>
                    </form>
        <hr>


                    <h3>Import</h3>
                    <p style="font-size: 1.5;">Import (restore or append) Names and URLs from *.ini file
                        to database. Remember to set the "Save" path. :)</p>
                    <p>
                        You can create a settings.ini on a tablet or PC and then import it on your mobile/cell phone.
                    </p>
                    <p style="color:red;"> App restart required! </p>
                    <p></p>


                    <form id="form_upload" action="{{ url_for('eisenutil_bp.tools_upload_ini') }}" method="post" enctype="multipart/form-data">
                        <div>
                          <label for="inputFile">Choose *.ini file to import.</label>
                          <input type="file" id="inputFile" name="inputFile">
                        </div>
                        <p></p>
                        <div>
                          <button class="btn btn-primary btn-sm">Import</button>
                        </div>
                    </form>

                    <p></p>
                    <div>
                        <p>ini looks like so (mandatory [STATIONS] and your list):</p>
                    </div>
                    <pre>
                    <br>[STATIONS]
		            <br>BLUES_UK = http://149.255.59.3:8232/stream
		            <br>hr3 = http://metafiles.gl-systemhaus.de/hr/hr3_2.m3u
                    <br>pop24 = http://rosewellpop.radioca.st:80/streams/128kbps
		            </pre>

        <hr>
                    <h3>Delete</h3>
                    <p style="font-size: 1.5;">Delete all Radios.</p>
                    <p style="color:red;">Then restart the app.</p>

                    <p></p>
                    <form id="del_all_radios_form" action="{{ url_for('eisenutil_bp.tools_delete_all') }}" method="post">
                        <div class="form-group">
                            <input class="btn btn-primary btn-sm"
                                   type="submit"
                                   id="del_all_radios"
                                   value="Delete"
                                   onclick="return confirm('Are you sure you want to delete all radios?')"
                                   name="post_delete_all_radios">
                            <label for="del_all_radios">
                            </label>
                        </div>
                    </form>
    <hr>

{% endblock %}