[FIX] HORILLA_THEME: Bug fixes in recruitment dashboard
This commit is contained in:
@@ -49,4 +49,4 @@
|
||||
width: '100%'
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
|
||||
@@ -9,4 +9,4 @@
|
||||
: <span>{{instance.options}}</span>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
$("#id_options_parent_div").show();
|
||||
$('[id^="moreOptionContainer_"]').remove();
|
||||
var optionCount = {{ form.option_count }}
|
||||
|
||||
|
||||
for (var i = 1; i < optionCount; i++) {
|
||||
var parentDivId = "id_options"+ i +"_parent_div";
|
||||
var parentDiv = document.getElementById(parentDivId);
|
||||
@@ -28,7 +28,7 @@
|
||||
$(parentDiv).find('.oh-label__info').remove();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Check if "Add more options" button already exists
|
||||
var test = document.getElementById('addOptions')
|
||||
if (!document.getElementById('addOptions')) {
|
||||
@@ -36,32 +36,32 @@
|
||||
divElement.id = 'moreOptionContainer_' + optionCount;
|
||||
divElement.className = 'pt-2';
|
||||
divElement.style.textAlign = 'end';
|
||||
|
||||
|
||||
var anchorElement = document.createElement('a');
|
||||
anchorElement.setAttribute('role', 'button');
|
||||
anchorElement.setAttribute('id', 'addOptions');
|
||||
anchorElement.style.color = 'green';
|
||||
anchorElement.innerText = 'Add more options..';
|
||||
|
||||
|
||||
divElement.appendChild(anchorElement);
|
||||
|
||||
|
||||
//var parentDiv = document.getElementById('id_options_parent_div');
|
||||
if (parentDiv) {
|
||||
parentDiv.insertAdjacentElement('afterend', divElement);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
var parentDivMain = document.getElementById('id_options_parent_div');
|
||||
parentDivMain.insertAdjacentElement('afterend', divElement);
|
||||
var nextDiv = parentDivMain.nextElementSibling;
|
||||
nextDiv.id = 'moreOptionContainer_1';
|
||||
nextDiv.id = 'moreOptionContainer_1';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else{
|
||||
$("#addOptions").show();
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
$("#id_options_parent_div").hide();
|
||||
$("#addOptions").hide();
|
||||
@@ -86,4 +86,3 @@
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user