fix(classrooms): blindar vistas presenciales y virtuales sin aulas + feat(admin): reinicializacion de sistema con clave de admin
This commit is contained in:
@@ -206,7 +206,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
function updatePreview() {
|
||||
var bText = '-';
|
||||
if (buildingSelect) {
|
||||
if (buildingSelect.value === '__new__') {
|
||||
if (buildingSelect.value === '__new__' || buildingSelect.value === 'new') {
|
||||
bText = newBuildingNameInput.value.trim() || '{{ _("Nuevo Edificio") }}';
|
||||
} else if (buildingSelect.selectedIndex >= 0) {
|
||||
bText = buildingSelect.options[buildingSelect.selectedIndex].text;
|
||||
@@ -222,7 +222,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
|
||||
if (buildingSelect) {
|
||||
buildingSelect.addEventListener('change', function() {
|
||||
if (this.value === '__new__') {
|
||||
if (this.value === '__new__' || this.value === 'new') {
|
||||
newBuildingContainer.style.display = 'block';
|
||||
if (newBuildingNameInput) newBuildingNameInput.focus();
|
||||
} else {
|
||||
@@ -232,7 +232,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
updatePreview();
|
||||
});
|
||||
// Initial call
|
||||
if (buildingSelect.value === '__new__') {
|
||||
if (buildingSelect.value === '__new__' || buildingSelect.value === 'new') {
|
||||
newBuildingContainer.style.display = 'block';
|
||||
} else if (buildingSelect.value) {
|
||||
updateFloorsDatalist(buildingSelect.value);
|
||||
|
||||
Reference in New Issue
Block a user