Unbound: overrides: fixup UI and validation due to model change (#5542)

* Unbound: overrides: fixup UI and validation due to model change

* Unbound: overrides: add back references
This commit is contained in:
Stephan de Wit 2022-02-08 10:10:28 +01:00 committed by GitHub
parent 1f8399dfed
commit 65fd3c88a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 1 deletions

View File

@ -96,6 +96,20 @@
<AAAA>AAAA (IPv6 address)</AAAA>
<MX>MX (Mail server)</MX>
</OptionValues>
<Constraints>
<check001>
<reference>mxprio.check001</reference>
</check001>
<check002>
<reference>mx.check001</reference>
</check002>
<check003>
<reference>server.check001</reference>
</check003>
<check004>
<reference>server.check002</reference>
</check004>
</Constraints>
</rr>
<mxprio type="IntegerField">
<Constraints>
@ -125,6 +139,12 @@
<field>rr</field>
<check>A</check>
</check001>
<check002>
<ValidationMessage>The field IP address is required.</ValidationMessage>
<type>SetIfConstraint</type>
<field>rr</field>
<check>AAAA</check>
</check002>
</Constraints>
</server>
<description type="TextField">

View File

@ -80,7 +80,7 @@ $( document ).ready(function() {
/* Hide/unhide input fields based on selected RR (Type) value */
$('select[id="host.rr"]').on('change', function(e) {
if (this.value == "A") {
if (this.value == "A" || this.value == "AAAA") {
$('tr[id="row_host.mx"]').addClass('hidden');
$('tr[id="row_host.mxprio"]').addClass('hidden');
$('tr[id="row_host.server"]').removeClass('hidden');