Merge branch 'ConstructionConsent/fix-owner-modal' into 'master'
fixed owner modal See merge request fronk/thetool!1376
This commit is contained in:
@@ -1179,22 +1179,25 @@ $pagination_entity_name = "Adressen";
|
||||
});
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#company').on('input', function() {
|
||||
if ($(this).val().length > 0) {
|
||||
function checkRequirements() {
|
||||
if ($('#company').val().length > 0) {
|
||||
$('#firstname').prop('required', false);
|
||||
$('#lastname').prop('required', false);
|
||||
} else {
|
||||
$('#firstname').prop('required', true);
|
||||
$('#lastname').prop('required', true);
|
||||
}
|
||||
});
|
||||
|
||||
$('#firstname, #lastname').on('input', function() {
|
||||
if ($('#firstname').val().length > 0 && $('#lastname').val().length > 0) {
|
||||
$('#company').prop('required', false);
|
||||
} else {
|
||||
$('#company').prop('required', true);
|
||||
}
|
||||
}
|
||||
checkRequirements();
|
||||
|
||||
$('#company, #firstname, #lastname').on('input change', function() {
|
||||
checkRequirements();
|
||||
});
|
||||
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
|
||||
Reference in New Issue
Block a user