mirror of
https://github.com/OPSnet/Gazelle.git
synced 2026-01-16 18:04:34 -05:00
use autocomplete macro everywhere
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
{% from 'macro/form.twig' import autocomplete %}
|
||||
<div class="box box_info box_addcollage_artist">
|
||||
<div class="head"><strong>Add to artist collage</strong></div>
|
||||
<div class="pad">
|
||||
@@ -15,7 +16,7 @@
|
||||
{% else %}
|
||||
<div>Search for a collage name or URL:</div>
|
||||
{% endfor %}
|
||||
<input type="text" name="collage_ref" id="collage_ref" size="25" data-gazelle-autocomplete="true" />
|
||||
<input type="text" name="collage_ref" id="collage_ref" size="25"{{ autocomplete(viewer, 'other') }} />
|
||||
<input type="hidden" name="action" value="add_artist" />
|
||||
<input type="hidden" name="entryid" value="{{ artist_id }}" />
|
||||
<input type="hidden" name="userid" value="{{ viewer.id }}" />
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{% from 'macro/form.twig' import checked, selected %}
|
||||
{% from 'macro/form.twig' import autocomplete, checked, selected %}
|
||||
{% set is_bookmark = search.isBookmarkView %}
|
||||
{% if is_bookmark %}
|
||||
{{ header('Bookmarked collages', {'js': 'collage'}) }}
|
||||
@@ -46,7 +46,7 @@
|
||||
<tr id="tagfilter">
|
||||
<td class="label">Tags (comma-separated):</td>
|
||||
<td>
|
||||
<input type="text" id="tags" name="tags" size="70" value="{{ input.tags }}"{% if viewer.hasAutocomplete('other') %} data-gazelle-autocomplete="true"{% endif %} />
|
||||
<input type="text" id="tags" name="tags" size="70" value="{{ input.tags }}"{{ autocomplete(viewer, 'other') }} />
|
||||
<br /><br />
|
||||
<label><input type="radio" name="tags_type" value="1"{{ checked(search.isTagAll) }} /> All</label>
|
||||
<label><input type="radio" name="tags_type" value="0"{{ checked(not search.isTagAll) }} /> Any</label>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
{% from 'macro/form.twig' import autocomplete %}
|
||||
{% macro active(t) -%}
|
||||
{%- if t %} class="active"{% endif -%}
|
||||
{% endmacro %}
|
||||
@@ -115,17 +116,15 @@
|
||||
<li id="searchbar_artists">
|
||||
<span class="hidden">Artist: </span>
|
||||
<form class="search_form" name="artists" action="artist.php" method="get">
|
||||
<input id="artistsearch"
|
||||
{%- if viewer.hasAutocomplete('search') %} data-gazelle-autocomplete="true" {% endif -%}
|
||||
value="Artists" placeholder="Artists" type="text" name="artistname" size="17" spellcheck="false" accesskey="a" />
|
||||
<input id="artistsearch"{{ autocomplete(viewer, 'search')
|
||||
}} value="Artists" placeholder="Artists" type="text" name="artistname" size="17" spellcheck="false" accesskey="a" />
|
||||
</form>
|
||||
</li>
|
||||
<li id="searchbar_collages">
|
||||
<span class="hidden">Collage: </span>
|
||||
<form class="search_form" name="collages" action="collages.php" method="get">
|
||||
<input id="collagesearch"
|
||||
{%- if viewer.hasAutocomplete('search') %} data-gazelle-autocomplete="true" {% endif -%}
|
||||
value="Collages" placeholder="Collages" type="text" name="search" size="17" spellcheck="false" accesskey="c" />
|
||||
<input id="collagesearch"{{ autocomplete(viewer, 'search')
|
||||
}} value="Collages" placeholder="Collages" type="text" name="search" size="17" spellcheck="false" accesskey="c" />
|
||||
</form>
|
||||
</li>
|
||||
<li id="searchbar_requests">
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
{%- from 'macro/form.twig' import checked, disabled, selected -%}
|
||||
{%- set autocomplete = viewer.hasAutocomplete('other') ? ' data-gazelle-autocomplete="true"' : '' -%}
|
||||
{%- from 'macro/form.twig' import autocomplete, checked, disabled, selected -%}
|
||||
{%- set new = action == 'new' -%}
|
||||
{{ header('Request › ' ~ (new ? 'Create' : 'Edit › ' ~ request.text), {'js': 'requests,form_validate'}) }}
|
||||
<div class="thin">
|
||||
@@ -62,7 +61,7 @@
|
||||
target="_blank">this</a> for more information.</p>
|
||||
{% for role, name_list in artist_role -%}
|
||||
{% for idx, name in name_list -%}
|
||||
<input type="text" size="45" id="artist_{{ loop.parent.loop.index0 }}" name="artists[]"{{ autocomplete|raw }} value="{{ name }}" />
|
||||
<input type="text" size="45" id="artist_{{ loop.parent.loop.index0 }}" name="artists[]"{{ autocomplete(viewer, 'other') }} value="{{ name }}" />
|
||||
<select id="importance_{{ loop.parent.loop.index0 }}" name="importance[]">
|
||||
<option value="{{ constant('ARTIST_MAIN') }}"{{ selected(role == constant('ARTIST_MAIN')) }}>Main</option>
|
||||
<option value="{{ constant('ARTIST_GUEST') }}"{{ selected(role == constant('ARTIST_GUEST')) }}>Guest</option>
|
||||
@@ -79,7 +78,7 @@
|
||||
{% endif -%}
|
||||
{% endfor -%}
|
||||
{% else -%}
|
||||
<input type="text" size="45" id="artist_0" name="artists[]"{{ autocomplete|raw }} />
|
||||
<input type="text" size="45" id="artist_0" name="artists[]"{{ autocomplete(viewer, 'other') }} />
|
||||
<select id="importance_0" name="importance[]">
|
||||
<option value="{{ constant('ARTIST_MAIN') }}">Main</option>
|
||||
<option value="{{ constant('ARTIST_GUEST') }}">Guest</option>
|
||||
@@ -137,7 +136,7 @@
|
||||
<option value="{{ tag }}">{{ tag }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<input type="text" id="tags" name="tags" size="45" value="{{ tags }}"{{ autocomplete|raw }} />
|
||||
<input type="text" id="tags" name="tags" size="45" value="{{ tags }}"{{ autocomplete(viewer, 'other') }} />
|
||||
<br />
|
||||
Tags should be comma-separated, and you should use a period (".") to separate words inside a tag — e.g. "<strong class="important_text_alt">hip.hop</strong>".
|
||||
<br /><br />
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
{% from 'macro/form.twig' import autocomplete %}
|
||||
<div class="box box_tags">
|
||||
<div class="head">
|
||||
<strong>Tags</strong>
|
||||
@@ -50,7 +51,7 @@
|
||||
<input type="hidden" name="action" value="add_tag" />
|
||||
<input type="hidden" name="auth" value="{{ viewer.auth }}" />
|
||||
<input type="hidden" name="groupid" value="{{ tgroup_id }}>" />
|
||||
<input type="text" name="tagname" id="tagname" size="20"{% if viewer.hasAutocomplete('other') %} data-gazelle-autocomplete="true"{% endif %} />
|
||||
<input type="text" name="tagname" id="tagname" size="20"{{ autocomplete(viewer, 'other') }} />
|
||||
<input type="submit" value="+" />
|
||||
</form>
|
||||
<br /><br />
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
{% from 'macro/form.twig' import checked, selected %}
|
||||
|
||||
{% from 'macro/form.twig' import autocomplete, checked, selected %}
|
||||
{{ header('Browse Torrents', {'js': 'browse'}) }}
|
||||
<div class="thin widethin">
|
||||
<div class="header">
|
||||
@@ -165,7 +164,7 @@
|
||||
<td class="label"><span title="Use !tag to exclude tag" class="tooltip">Tags (comma-separated):</span></td>
|
||||
<td colspan="3" class="ft_taglist">
|
||||
<input type="search" size="40" id="tags" name="taglist" class="inputtext smaller" value="{{
|
||||
tag_list }}"{% if viewer.hasAutocomplete('other') %} data-gazelle-autocomplete="true"{% endif %} />
|
||||
tag_list }}"{{ autocomplete(viewer, 'other') }} />
|
||||
<input type="radio" name="tags_type" id="tags_type0" value="0"{{ checked(input.tags_type == 0) }} /><label for="tags_type0"> Any</label>
|
||||
<input type="radio" name="tags_type" id="tags_type1" value="1"{{ checked(input.tags_type == 1) }} /><label for="tags_type1"> All</label>
|
||||
</td>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
{% from 'macro/form.twig' import autocomplete %}
|
||||
<div class="box box_info box_addcollage_torrent">
|
||||
<div class="head"><strong>Add to collage</strong></div>
|
||||
<div class="pad">
|
||||
@@ -15,7 +16,7 @@
|
||||
{% else %}
|
||||
<div>Search for a collage name or URL:</div>
|
||||
{% endfor %}
|
||||
<input type="text" name="collage_ref" id="collage_ref" size="25" data-gazelle-autocomplete="true" />
|
||||
<input type="text" name="collage_ref" id="collage_ref" size="25"{{ autocomplete(viewer, 'other') }} />
|
||||
<input type="hidden" name="action" value="add_torrent" />
|
||||
<input type="hidden" name="entryid" value="{{ tgroup_id }}" />
|
||||
<input type="hidden" name="userid" value="{{ viewer.id }}" />
|
||||
|
||||
Reference in New Issue
Block a user