mirror of
https://github.com/caronc/apprise-api.git
synced 2025-08-23 20:25:25 +02:00
JavaScript error fix when config-lock env var set (#182)
This commit is contained in:
@@ -152,8 +152,9 @@ class NotifyForm(forms.Form):
|
|||||||
required=False,
|
required=False,
|
||||||
)
|
)
|
||||||
|
|
||||||
# Allow support for tags keyword in addition to tag; the 'tag' field will always take priority over this
|
# Allow support for tags keyword in addition to tag; the 'tag' field will
|
||||||
# however adding `tags` gives the user more flexibilty to use either/or keyword
|
# always take priority over this however adding `tags` gives the user more
|
||||||
|
# flexibilty to use either/or keyword
|
||||||
tags = forms.CharField(
|
tags = forms.CharField(
|
||||||
label=_('Tags'),
|
label=_('Tags'),
|
||||||
widget=forms.HiddenInput(),
|
widget=forms.HiddenInput(),
|
||||||
|
@@ -50,8 +50,10 @@
|
|||||||
<ul class="collection z-depth-1">
|
<ul class="collection z-depth-1">
|
||||||
<a class="collection-item" href="{% url 'config' DEFAULT_CONFIG_ID %}"><i class="material-icons">settings</i>
|
<a class="collection-item" href="{% url 'config' DEFAULT_CONFIG_ID %}"><i class="material-icons">settings</i>
|
||||||
{% trans "Configuration Manager" %}</a>
|
{% trans "Configuration Manager" %}</a>
|
||||||
|
{% if not CONFIG_LOCK %}
|
||||||
<a class="collection-item" href="{% url 'config' UNIQUE_CONFIG_ID %}"><i class="material-icons">refresh</i>
|
<a class="collection-item" href="{% url 'config' UNIQUE_CONFIG_ID %}"><i class="material-icons">refresh</i>
|
||||||
{% trans "New Configuration" %}</a>
|
{% trans "New Configuration" %}</a>
|
||||||
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<ul class="collection z-depth-1">
|
<ul class="collection z-depth-1">
|
||||||
|
@@ -12,7 +12,7 @@
|
|||||||
</li>
|
</li>
|
||||||
<li class="tab {% if CONFIG_LOCK %}disabled {% endif %}col s3"><a href="#review"><i class="material-icons">{% if not CONFIG_LOCK %}web{% else %}lock{% endif %}</i> {%trans "Review" %}</a>
|
<li class="tab {% if CONFIG_LOCK %}disabled {% endif %}col s3"><a href="#review"><i class="material-icons">{% if not CONFIG_LOCK %}web{% else %}lock{% endif %}</i> {%trans "Review" %}</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="tab col s3"><a href="#notify"><i class="material-icons">announcement</i> {%trans "Notifications" %} <span class="card-count"></span></a>
|
<li class="tab col s3"><a href="#notify"><i class="material-icons">announcement</i> {%trans "Notifications" %}{% if not CONFIG_LOCK %} <span class="card-count"></span>{% endif %}</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
@@ -70,8 +70,8 @@
|
|||||||
{% endblocktrans %}</p>
|
{% endblocktrans %}</p>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="has-config">
|
{% if not CONFIG_LOCK %}
|
||||||
<div class="section">
|
<div class="section has-config">
|
||||||
<h5>{% trans "Working Remotely With Your Configuration" %}</h5>
|
<h5>{% trans "Working Remotely With Your Configuration" %}</h5>
|
||||||
<h6>{% trans "Using The Apprise CLI" %}</h6>
|
<h6>{% trans "Using The Apprise CLI" %}</h6>
|
||||||
<p>
|
<p>
|
||||||
@@ -121,7 +121,7 @@
|
|||||||
"{{request.scheme}}://{{request.META.HTTP_HOST}}{{BASE_URL}}/notify/<em>{{key}}</em>"</code></pre>
|
"{{request.scheme}}://{{request.META.HTTP_HOST}}{{BASE_URL}}/notify/<em>{{key}}</em>"</code></pre>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<div id="config" class="col s12">
|
<div id="config" class="col s12">
|
||||||
{% if not CONFIG_LOCK %}
|
{% if not CONFIG_LOCK %}
|
||||||
@@ -328,6 +328,7 @@ async function main_init(){
|
|||||||
const data = {
|
const data = {
|
||||||
urls: []
|
urls: []
|
||||||
};
|
};
|
||||||
|
const chipElement = document.querySelector('.chips');
|
||||||
M.Chips.init(chipElement, {
|
M.Chips.init(chipElement, {
|
||||||
placeholder: '{% trans "Optional Tag" %}',
|
placeholder: '{% trans "Optional Tag" %}',
|
||||||
secondaryPlaceholder: '{% trans "Another Tag" %}'
|
secondaryPlaceholder: '{% trans "Another Tag" %}'
|
||||||
|
@@ -1014,7 +1014,6 @@ class NotifyTests(SimpleTestCase):
|
|||||||
assert response.status_code == 200
|
assert response.status_code == 200
|
||||||
assert mock_notify.call_count == 1
|
assert mock_notify.call_count == 1
|
||||||
|
|
||||||
|
|
||||||
# Reset our mock object
|
# Reset our mock object
|
||||||
mock_notify.reset_mock()
|
mock_notify.reset_mock()
|
||||||
|
|
||||||
|
@@ -25,7 +25,6 @@
|
|||||||
#
|
#
|
||||||
import re
|
import re
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from core.themes import SiteTheme, SITE_THEMES
|
|
||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user