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:
@@ -140,7 +140,8 @@ return [
|
|||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
'values' => $ipsandports,
|
'values' => $ipsandports,
|
||||||
'value' => explode(',', Settings::Get('system.defaultip')),
|
'value' => explode(',', Settings::Get('system.defaultip')),
|
||||||
'is_array' => 1
|
'is_array' => 1,
|
||||||
|
'mandatory' => true
|
||||||
],
|
],
|
||||||
'selectserveralias' => [
|
'selectserveralias' => [
|
||||||
'label' => lng('admin.selectserveralias'),
|
'label' => lng('admin.selectserveralias'),
|
||||||
|
|||||||
@@ -154,7 +154,8 @@ return [
|
|||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
'values' => $ipsandports,
|
'values' => $ipsandports,
|
||||||
'value' => $usedips,
|
'value' => $usedips,
|
||||||
'is_array' => 1
|
'is_array' => 1,
|
||||||
|
'mandatory' => true
|
||||||
],
|
],
|
||||||
'selectserveralias' => [
|
'selectserveralias' => [
|
||||||
'label' => lng('admin.selectserveralias'),
|
'label' => lng('admin.selectserveralias'),
|
||||||
|
|||||||
@@ -50,7 +50,7 @@
|
|||||||
</form>
|
</form>
|
||||||
|
|
||||||
{# add translation for custom validations #}
|
{# 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>
|
<script>$(function() { $.extend($.validator.messages, {required: "{{ lng('error.requiredfield') }}"}) });</script>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|||||||
@@ -29,6 +29,9 @@ $(document).ready(function () {
|
|||||||
minlength: 1
|
minlength: 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
errorPlacement: function(error, element) {
|
||||||
|
$(error).prependTo($(element).parent().parent());
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user