clearify customer add/edit name/company requirements
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -72,6 +72,29 @@
|
||||
{% if field.note is defined and field.note is not empty %}
|
||||
<small class="text-info">{{ field.note|raw }}</small>
|
||||
{% endif %}
|
||||
|
||||
{% if field.mandatory_ex is not empty and field.mandatory_ex is iterable and field.mandatory_ex|length > 0 %}
|
||||
<script>
|
||||
$(function () {
|
||||
$('#{{ id }}').attr('required', true);
|
||||
$('#{{ id }}').trigger('change');
|
||||
$('#{{ id }}').on('change', function(e) {
|
||||
if ($(this).val().length > 0) {
|
||||
{% for mex in field.mandatory_ex %}
|
||||
$('#{{ mex }}').attr('required', false);
|
||||
{% endfor %}
|
||||
$('#{{ id }}').attr('required', true);
|
||||
} else {
|
||||
{% for mex in field.mandatory_ex %}
|
||||
$('#{{ mex }}').attr('required', true);
|
||||
{% endfor %}
|
||||
$('#{{ id }}').attr('required', false);
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% endif %}
|
||||
|
||||
{% if norow == false and (field.type != 'hidden' or (field.type == 'hidden' and field.display is defined and field.display is not empty)) %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
<i class="fa-solid fa-reply me-1"></i><span class="d-none d-xl-inline">{{ userinfo.switched_user.loginname }}</span>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if userinfo.adminsession == 1 %}
|
||||
{% if userinfo.adminsession == 1 and call_static('\\Froxlor\\CurrentUser', 'getField', ['change_serversettings']) is not empty and call_static('\\Froxlor\\CurrentUser', 'getField', ['change_serversettings']) == 1 %}
|
||||
<li class="nav-item" id="updatecheck"></li>
|
||||
{% endif %}
|
||||
<li class="nav-item">
|
||||
|
||||
Reference in New Issue
Block a user