Enable sending IRC messages from context modal
This commit is contained in:
@@ -65,31 +65,32 @@
|
||||
<div class="is-active" data-content="1">
|
||||
<h4 class="subtitle is-4">Scrollback of {{ channel }} on {{ net }}{{ num }}</h4>
|
||||
{% include 'modals/context_table.html' %}
|
||||
<div class="field has-addons">
|
||||
<div class="control is-expanded has-icons-left">
|
||||
<input
|
||||
hx-post="{% url 'search' %}"
|
||||
hx-trigger="keyup changed delay:200ms"
|
||||
hx-target="#results"
|
||||
hx-swap="innerHTML" id="query" name="query" value="{{ params.query }}" class="input" type="text" placeholder="msg: science AND nick: BillNye AND channel: #science">
|
||||
<span class="icon is-small is-left">
|
||||
<i class="fas fa-magnifying-glass"></i>
|
||||
</span>
|
||||
</div>
|
||||
<div class="control">
|
||||
<div class="field">
|
||||
<button
|
||||
id="search"
|
||||
class="button is-info is-fullwidth"
|
||||
hx-post="{% url 'search' %}"
|
||||
hx-trigger="click"
|
||||
hx-target="#results"
|
||||
hx-swap="innerHTML">
|
||||
Search
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% if user.is_superuser and src == 'irc' %}
|
||||
<form method="PUT">
|
||||
<article class="field has-addons">
|
||||
<article class="control is-expanded has-icons-left">
|
||||
<input id="context-input" name="msg" class="input" type="text" placeholder="Type your message here">
|
||||
<span class="icon is-small is-left">
|
||||
<i class="fas fa-magnifying-glass"></i>
|
||||
</span>
|
||||
</article>
|
||||
<article class="control">
|
||||
<article class="field">
|
||||
<button
|
||||
id="search"
|
||||
class="button is-info is-fullwidth"
|
||||
hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'
|
||||
hx-put="{% url 'threshold_irc_msg' net num channel %}"
|
||||
hx-trigger="click"
|
||||
hx-target="#context-input"
|
||||
hx-swap="outerHTML">
|
||||
Send
|
||||
</button>
|
||||
</article>
|
||||
</article>
|
||||
</article>
|
||||
</form>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
<div data-content="2">
|
||||
|
||||
Reference in New Issue
Block a user