Dyamically change child action translation for backups

This commit is contained in:
= 2024-10-11 13:01:27 -04:00
parent 0572c0a91d
commit b5dd04d4d5
2 changed files with 6 additions and 3 deletions

View File

@ -81,7 +81,7 @@
</select>
<div id="ifBackup" style="display: none;">
<br>
<label for="action_id">{{ translate('serverSchedules', 'actionId' , data['lang']) }}<small
<label id="action_id_label" for="action_id" data-backup-translate="{{ translate('serverSchedules', 'backupPol', data['lang']) }}" data-action-translate="{{ translate('serverSchedules', 'actionId', data['lang']) }}"><small
class="text-muted ml-1"></small> </label><br>
<select id="action_id" name="action_id"
class="form-control form-control-lg select-css" value="{{ data['schedule']['action_id'] }}">
@ -384,10 +384,12 @@
if (document.getElementById('action').value == "backup"){
document.getElementById("ifBackup").style.display = "block";
document.getElementById("action_id").required = true;
$("#action_id_label").html($("#action_id_label").attr("data-backup-translate"));
} else {
document.getElementById("ifBackup").style.display = "none";
document.getElementById("action_id").required = false;
$("#action_id").val(null);
$("#action_id_label").html($("#action_id_label").attr("data-action-translate"));
}
}
function basicAdvanced() {

View File

@ -508,7 +508,8 @@
},
"serverSchedules": {
"action": "Action",
"actionId": "Select Action Child",
"actionId": "Action Child",
"backupPol": "Backup Policy",
"areYouSure": "Delete Scheduled Task?",
"cancel": "Cancel",
"cannotSee": "Not seeing everything?",
@ -699,4 +700,4 @@
"webhook_body": "Webhook Body",
"webhooks": "Webhooks"
}
}
}