[UI] change require of ipandport field in domains.add and domains.delete to one-of instead of all; fixes #1078
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -30,6 +30,7 @@ return [
|
|||||||
'title' => lng('admin.domain_add'),
|
'title' => lng('admin.domain_add'),
|
||||||
'image' => 'fa-solid fa-globe',
|
'image' => 'fa-solid fa-globe',
|
||||||
'self_overview' => ['section' => 'domains', 'page' => 'domains'],
|
'self_overview' => ['section' => 'domains', 'page' => 'domains'],
|
||||||
|
'id' => 'domain_add',
|
||||||
'sections' => [
|
'sections' => [
|
||||||
'section_a' => [
|
'section_a' => [
|
||||||
'title' => lng('domains.domainsettings'),
|
'title' => lng('domains.domainsettings'),
|
||||||
@@ -139,8 +140,7 @@ 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'),
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ return [
|
|||||||
'title' => lng('admin.domain_edit'),
|
'title' => lng('admin.domain_edit'),
|
||||||
'image' => 'fa-solid fa-globe',
|
'image' => 'fa-solid fa-globe',
|
||||||
'self_overview' => ['section' => 'domains', 'page' => 'domains'],
|
'self_overview' => ['section' => 'domains', 'page' => 'domains'],
|
||||||
|
'id' => 'domain_edit',
|
||||||
'sections' => [
|
'sections' => [
|
||||||
'section_a' => [
|
'section_a' => [
|
||||||
'title' => lng('domains.domainsettings'),
|
'title' => lng('domains.domainsettings'),
|
||||||
@@ -153,8 +154,7 @@ 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'),
|
||||||
|
|||||||
@@ -1,19 +1,19 @@
|
|||||||
$(document).ready(function() {
|
$(document).ready(function () {
|
||||||
$('#customer_add,#customer_edit').each(function(){
|
$('#customer_add,#customer_edit').each(function () {
|
||||||
$(this).validate({
|
$(this).validate({
|
||||||
rules:{
|
rules: {
|
||||||
'name':{
|
'name': {
|
||||||
required:function(){
|
required: function () {
|
||||||
return $('#company').val().length === 0 || $('#firstname').val().length > 0;
|
return $('#company').val().length === 0 || $('#firstname').val().length > 0;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
'firstname':{
|
'firstname': {
|
||||||
required:function(){
|
required: function () {
|
||||||
return $('#company').val().length === 0 || $('#name').val().length > 0;
|
return $('#company').val().length === 0 || $('#name').val().length > 0;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
'company':{
|
'company': {
|
||||||
required:function(){
|
required: function () {
|
||||||
return $('#name').val().length === 0
|
return $('#name').val().length === 0
|
||||||
&& $('#firstname').val().length === 0;
|
&& $('#firstname').val().length === 0;
|
||||||
}
|
}
|
||||||
@@ -21,4 +21,14 @@ $(document).ready(function() {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
$('#domain_add,#domain_edit').each(function () {
|
||||||
|
$(this).validate({
|
||||||
|
rules: {
|
||||||
|
'ipandport[]': {
|
||||||
|
required: true,
|
||||||
|
minlength: 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user