backoffice: hide notify/record_on_errors for user datasource (#53598)
This commit is contained in:
parent
b6e849811a
commit
677ef4f88b
|
@ -215,18 +215,19 @@ class NamedDataSourceUI:
|
|||
'data-dynamic-display-value': 'json',
|
||||
},
|
||||
)
|
||||
form.add(
|
||||
CheckboxWidget,
|
||||
'notify_on_errors',
|
||||
title=_('Notify on errors'),
|
||||
value=self.datasource.notify_on_errors,
|
||||
)
|
||||
form.add(
|
||||
CheckboxWidget,
|
||||
'record_on_errors',
|
||||
title=_('Record on errors'),
|
||||
value=self.datasource.record_on_errors,
|
||||
)
|
||||
if not self.datasource or self.datasource.type != 'wcs:users':
|
||||
form.add(
|
||||
CheckboxWidget,
|
||||
'notify_on_errors',
|
||||
title=_('Notify on errors'),
|
||||
value=self.datasource.notify_on_errors,
|
||||
)
|
||||
form.add(
|
||||
CheckboxWidget,
|
||||
'record_on_errors',
|
||||
title=_('Record on errors'),
|
||||
value=self.datasource.record_on_errors,
|
||||
)
|
||||
|
||||
if not self.datasource.is_readonly():
|
||||
form.add_submit('submit', _('Submit'))
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
<li>{% trans "URL:" %} <a href="{{ datasource.get_variadic_url }}">{{ datasource.data_source.value }}</a></li>
|
||||
{% elif datasource.data_source.type == 'formula' %}
|
||||
<li>{% trans "Python Expression:" %} {{ datasource.data_source.value }}</li>
|
||||
{% elif datasource.data_source.type == 'users' %}
|
||||
{% elif datasource.data_source.type == 'wcs:users' %}
|
||||
{% spaceless %}
|
||||
<li>{% trans "Users with roles:" %}
|
||||
<ul>
|
||||
|
@ -48,8 +48,10 @@
|
|||
{% if datasource.cache_duration %}
|
||||
<li>{% trans "Cache Duration:" %} {{ datasource.humanized_cache_duration }}
|
||||
{% endif %}
|
||||
<li>{% trans "Notify on errors:" %} {{ datasource.notify_on_errors|yesno }}</li>
|
||||
<li>{% trans "Record on errors:" %} {{ datasource.record_on_errors|yesno }}</li>
|
||||
{% if not datasource.data_source.type == 'wcs:users' %}
|
||||
<li>{% trans "Notify on errors:" %} {{ datasource.notify_on_errors|yesno }}</li>
|
||||
<li>{% trans "Record on errors:" %} {{ datasource.record_on_errors|yesno }}</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in New Issue