restore mandatory field on domain-formfields; add translated require message and correct error-placement of the message

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2023-01-12 15:16:42 +01:00
parent b52d6df777
commit e3f02879cf
4 changed files with 8 additions and 3 deletions

View File

@@ -50,7 +50,7 @@
</form>
{# add translation for custom validations #}
{% if form_data.id is defined and form_data.id in ['customer_add', 'customer_edit'] %}
{% if form_data.id is defined and form_data.id in ['customer_add', 'customer_edit', 'domain_add', 'domain_edit'] %}
<script>$(function() { $.extend($.validator.messages, {required: "{{ lng('error.requiredfield') }}"}) });</script>
{% endif %}
{% endmacro %}

View File

@@ -29,6 +29,9 @@ $(document).ready(function () {
minlength: 1
}
},
errorPlacement: function(error, element) {
$(error).prependTo($(element).parent().parent());
}
});
});
});