mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
add html for notification setting
This commit is contained in:
parent
0ff407348d
commit
b16305afef
@ -24,7 +24,7 @@
|
||||
<td>
|
||||
{% if setting.is_bool %}
|
||||
<div class='form-check form-switch'>
|
||||
<input class='form-check-input boolean-setting' fieldname='{{ setting.key.upper }}' pk='{{ setting.pk }}' setting='{{ setting.key.upper }}' id='setting-value-{{ setting.key.upper }}' type='checkbox' {% if setting.as_bool %}checked=''{% endif %} {% if plugin %}plugin='{{ plugin.pk }}'{% endif %}{% if user_setting %}user='{{request.user.id}}'{% endif %}>
|
||||
<input class='form-check-input boolean-setting' fieldname='{{ setting.key.upper }}' pk='{{ setting.pk }}' setting='{{ setting.key.upper }}' id='setting-value-{{ setting.key.upper }}' type='checkbox' {% if setting.as_bool %}checked=''{% endif %} {% if plugin %}plugin='{{ plugin.pk }}'{% endif %}{% if user_setting %}user='{{request.user.id}}'{% endif %}{% if notification_setting %}notification='{{request.user.id}}'{% endif %}>
|
||||
</div>
|
||||
{% else %}
|
||||
<div id='setting-{{ setting.pk }}'>
|
||||
|
@ -70,6 +70,7 @@ $('table').find('.boolean-setting').change(function() {
|
||||
var pk = $(this).attr('pk');
|
||||
var plugin = $(this).attr('plugin');
|
||||
var user = $(this).attr('user');
|
||||
var notification = $(this).attr('notification');
|
||||
|
||||
var checked = this.checked;
|
||||
|
||||
@ -80,6 +81,8 @@ $('table').find('.boolean-setting').change(function() {
|
||||
url = `/api/plugin/settings/${pk}/`;
|
||||
} else if (user) {
|
||||
url = `/api/settings/user/${pk}/`;
|
||||
} else if (notification) {
|
||||
url = `/api/settings/notification/${pk}/`;
|
||||
}
|
||||
|
||||
inventreePut(
|
||||
|
Loading…
Reference in New Issue
Block a user