autocomplete & form reset
This commit is contained in:
		@ -47,11 +47,11 @@
 | 
			
		||||
 | 
			
		||||
        <div v-if="source.isQueue">
 | 
			
		||||
            <hr>
 | 
			
		||||
            <h6 class="title is-6 is-marginless">{% trans "Add sound" %}</h6>
 | 
			
		||||
            <form class="columns" @submit.prevent="source.push($event.target.elements['sound_id'].value)">
 | 
			
		||||
                <div class="column field is-small">
 | 
			
		||||
            <h6 class="title is-6">{% trans "Add sound" %}</h6>
 | 
			
		||||
            <form @submit.prevent="source.push($event.target.elements['sound_id'].value); $event.target.reset()">
 | 
			
		||||
                <div class="field is-grouped">
 | 
			
		||||
                    {# TODO: select station => change the shit #}
 | 
			
		||||
                    <a-autocomplete class="is-fullwidth"
 | 
			
		||||
                    <a-autocomplete class="control is-expanded"
 | 
			
		||||
                        url="{% url "aircox:sound-list" %}?station={{ station.pk }}&search=${query}"
 | 
			
		||||
                        name="sound_id" :model="Sound" label-field="name"
 | 
			
		||||
                        placeholder="{% trans "Select a sound" %}">
 | 
			
		||||
@ -59,20 +59,20 @@
 | 
			
		||||
                                [[ item.data.name ]]
 | 
			
		||||
                                <span class="is-size-7 is-italic has-text-info">[[ item.data.file ]]</span>
 | 
			
		||||
                            </template>
 | 
			
		||||
                        </a-autocomplete>
 | 
			
		||||
                    <p class="help">
 | 
			
		||||
                    {% trans "Add a sound to the queue (queue may start playing)" %}
 | 
			
		||||
                    </p>
 | 
			
		||||
                    {# TODO: help text about how it works #}
 | 
			
		||||
                </div>
 | 
			
		||||
                <div class="column control is-one-fifth">
 | 
			
		||||
                    <button type="submit" class="button is-primary">
 | 
			
		||||
                        <span class="icon">
 | 
			
		||||
                            <span class="fas fa-plus"></span>
 | 
			
		||||
                        </span>
 | 
			
		||||
                        <span>{% trans "Add" %}</span>
 | 
			
		||||
                    </button>
 | 
			
		||||
                    </a-autocomplete>
 | 
			
		||||
                    <div class="control">
 | 
			
		||||
                        <button type="submit" class="button is-primary">
 | 
			
		||||
                            <span class="icon">
 | 
			
		||||
                                <span class="fas fa-plus"></span>
 | 
			
		||||
                            </span>
 | 
			
		||||
                            <span>{% trans "Add" %}</span>
 | 
			
		||||
                        </button>
 | 
			
		||||
                    </div>
 | 
			
		||||
                </div>
 | 
			
		||||
                <p class="help">
 | 
			
		||||
                {% trans "Add a sound to the queue (queue may start playing)" %}
 | 
			
		||||
                </p>
 | 
			
		||||
                {# TODO: help text about how it works #}
 | 
			
		||||
            </form>
 | 
			
		||||
 | 
			
		||||
            <div v-if="source.queue.length">
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user