123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446 |
- <!--
-
- General Machine Settings
- Copyright (C) 2010-2015 Ian Moore (imoore76 at yahoo dot com)
-
- $Id: settingsGeneral.html 599 2015-07-27 10:40:37Z imoore76 $
-
- -->
- <ul>
- <li><a href="#vboxSettingsTabGeneralBasic"><span class='translate'>Basic</span></a></li>
- <li><a href="#vboxSettingsTabGeneralAdvanced"><span class='translate'>Advanced</span></a></li>
- <li><a href="#vboxSettingsTabGeneralDescription"><span class='translate'>Description</span></a></li>
- <li><a href="#vboxSettingsTabGeneralEncryption"><span class='translate'>Encryption</span></a></li>
- <li id='vboxSettingsTabGeneralInputTab'><a href="#vboxSettingsTabGeneralInput"><span class='translateinputtab'>Input</span></a></li>
- </ul>
-
- <!-- Basic Tab -->
- <div id='vboxSettingsTabGeneralBasic' title='Basic'>
- <table class='vboxVertical'>
- <tr>
- <th><span class='translateos'>Name:</span></th>
- <td colspan='2'><input type='text' class='vboxText' name='vboxSettingsGeneralName' /></td>
- </tr>
- <tr>
- <th><span class='translateos'>Type:</span></th>
- <td><select name='vboxSettingsGeneralOSFamily' id='vboxSettingsGeneralOSFamily' >
- <option value='Linux'>Linux</option>
- </select></td>
- <td rowspan='2'><img name='vboxOSTypeImg' height='32' width='32' /></td>
- </tr>
- <tr>
- <th><span class='translateos'>Version:</span></th>
- <td><select id='vboxSettingsGeneralOSType' name='vboxSettingsGeneralOSType'>
- <option value='Debian'>Debian</option>
- </select></td>
- </tr>
- <tr id='vboxSettingsRowVMIcon' class='vboxRunningEnabled' style='display:none'>
- <th><span class='translate'>Icon URL:</span></th>
- <td><input name='vboxSettingsGeneralIcon' type='text' class='vboxText' style='width:99%'/></td>
- <td style='text-align:center;'><img src='images/vbox/blank.gif' id='vboxSettingsGeneralIconImg' height='32' width='32' /></td>
- </tr>
- <tr class='vboxStartStopConfig vboxRunningEnabled'>
- <th><span class='translate'>Startup Mode:</span></th>
- <td colspan='2'>
- <select name='vboxStartStopConfigStartup'>
- <option value='auto'>Automatic</option>
- <option value='manual'>Manual</option>
- </select>
- </td>
- </tr>
- <!-- Autostart shutdown options -->
- <tr class='vboxAutostartConfig vboxRunningEnabled' id='vboxAutostartConfigShutdown'>
- <th><span class='translate'>Shutdown mode:</span></th>
- <td colspan='2'>
- <select name='vboxAutostartConfigShutdownOptions'>
- <option value='Disabled'>Disabled</option>
- <option value='SaveState'>Save State</option>
- <option value='PowerOff'>Power Off</option>
- <option value='AcpiShutdown'>ACPI Shutdown</option>
- </select>
- </td>
- </tr>
- <!-- Autostart options -->
- <tr class='vboxAutostartConfig vboxRunningEnabled' id='vboxAutostartConfigStartup'>
- <th><span class='translate'>Enable auto-start:</span></th>
- <td colspan='2'>
- <input type='checkbox' class='vboxCheckbox' name='autostartEnabled'/> <span class='translate'>after</span>
- <input type='text' class='vboxText' size='3' name='autostartDelay' style='width: 30px'/>
- <span class='translate'>second(s)</span>
- </td>
- </tr>
- </table>
- </div>
-
- <!-- Advanced Tab -->
- <div id='vboxSettingsTabGeneralAdvanced' title='Advanced'>
- <table class='vboxVertical'>
- <tr>
- <th><span class='translate'>Snapshot Folder:</span></th>
- <td class='vboxFileFolderInput'>
- <input type='text' class='vboxText' name='vboxSettingsGeneralSnapshotFolder' /><input type="button" class="vboxImgButton" style="background-image: url(images/vbox/select_file_16px.png)"
- onClick="vboxSnapshotBrowseFolder(this);" />
- </td>
- </tr>
- </table>
- </div>
-
- <!-- Description Tab -->
- <div id='vboxSettingsTabGeneralDescription' title='Description'>
- <textarea class='vboxRunningEnabled' rows='16' cols='20' name='vboxSettingsGeneralDescription'></textarea>
- </div>
-
- <!-- Encryption Tab -->
- <div id='vboxSettingsTabGeneralEncryption' title='Encryption'>
- <table class='vboxVertical'>
- <tr>
- <td colspan='2'>
- <label><input type='checkbox' class='vboxCheckbox vboxEnablerCheckbox' name='vboxSettingsGeneralEncryptionEnable' />
- <span class='translate'>Enable Encryption</span>
- </label>
- </td>
- </tr>
- <tr>
- <th><span class='translate'>Encryption Cipher:</span></th>
- <td>
- <select name='vboxSettingsTabGeneralEncryptionCipher'>
- <option value=''>Leave Unchanged</option>
- <option value='AES-XTS256-PLAIN64'>AES-XTS256-PLAIN64</option>
- <option value='AES-XTS128-PLAIN64'>AES-XTS128-PLAIN64</option>
- </select>
- </td>
- </tr>
- <tr>
- <th><span class='translate'>Enter New Password:</span></th>
- <td><input type='password' class='vboxText' name='vboxGeneralEncryptionPassword'/></td>
- </tr>
- <tr>
- <th><span class='translate'>Confirm New Password:</span></th>
- <td><input type='password' class='vboxText' name='vboxGeneralEncryptionPassword2'/></td>
- </tr>
-
- </table>
- </div>
-
- <!-- Input Tab -->
- <div id='vboxSettingsTabGeneralInput' title='Input'>
- <table class='vboxVertical'>
- <tr>
- <th><span class='translateinput'>Keyboard</span><span> :</span></th>
- <td><select name='vboxSettingsTabGeneralInputKeyboard'>
- <option value='PS2Keyboard'>PS/2 Keyboard</option>
- <option value='USBKeyboard'>USB Keyboard</option>
- </select>
- </td>
- </tr>
- <tr>
- <th><span class='translateinput'>Mouse</span><span> :</span></th>
- <td><select name='vboxSettingsTabGeneralInputMouse'>
- <option value='PS2Mouse'>PS/2 Mouse</option>
- <option value='USBMouse'>USB Mouse</option>
- <option value='USBTablet'>USB Tablet</option>
- </select>
- </td>
- </tr>
- </table>
- </div>
- <script type='text/javascript'>
-
- /* Translations */
- $('#vboxSettingsTabGeneralInput').find(".translateinput").html(function(i,h){return trans(h,'UIActionPool');});
- $('#vboxSettingsTabGeneralInputTab').find(".translateinputtab").html(function(i,h){return trans(h,'UISettingsDialogGlobal');});
- $('#vboxSettingsTabGeneralBasic').find(".translateos").html(function(i,h){return trans(h,'UINameAndSystemEditor');});
- if($('#vboxPane').data('vboxConfig').vboxAutostartConfig) {
-
- // Shutdown options select buttons
- $('#vboxAutostartConfigShutdown').find('option').each(function(i,opt){
- $(opt).text(i == 0 ? trans('Disabled','UIGDetails',null,'details (audio)') : trans($(opt).text(),'UIActionPool'));
- if($(opt).val() == $('#vboxSettingsDialog').data('vboxMachineData').autostopType)
- $(opt).prop('selected', true);
- });
-
- } else {
- $('#vboxSettingsTabGeneralBasic .vboxAutostartConfig').empty().remove();
- }
-
- $('#vboxSettingsTabGeneralEncryption').find('option').html(function(i,h){ return trans(h, 'UIMachineSettingsGeneral', 'cipher type')});
- $('#vboxSettingsTabGeneralInput').find('option').html(function(i,h){ return trans(h, 'VBoxGlobal')});
-
- /* Browse for snapshot folder */
- function vboxSnapshotBrowseFolder(btn) {
- vboxFileBrowser($(btn).siblings('input').first().val(),function(f){
- if(f) $(btn).siblings('input').first().val(f);
- },true,trans('Snapshot Folder:','UIMachineSettingsGeneral').replace(':',''));
- }
-
- /*
- * Hide start / stop config if not enabled
- */
- if(!$('#vboxPane').data('vboxConfig').startStopConfig) {
-
- $('#vboxSettingsTabGeneralBasic').find('tr.vboxStartStopConfig').hide();
-
- }
-
- /* Custom icons */
- if($('#vboxPane').data('vboxConfig').enableCustomIcons) {
-
- $('#vboxSettingsRowVMIcon').css('display','');
-
- $(document.forms['frmVboxSettings'].vboxSettingsGeneralIcon).blur(function(){
- $('#vboxSettingsGeneralIconImg').attr('src',(this.value ? this.value : 'images/vbox/blank.gif'));
- });
- }
-
- /*
- * Called when OS family type changes
- */
- function vboxSettingsUpdateOSList(osfam) {
- document.forms['frmVboxSettings'].vboxSettingsGeneralOSType.options.length = 0;
- $(document.forms['frmVboxSettings'].vboxSettingsGeneralOSType).children().remove();
- for(var i = 0; i < vboxSettingsOSTypes[osfam].osTypes.length; i++) {
- document.forms['frmVboxSettings'].vboxSettingsGeneralOSType.options[i] = new Option(vboxSettingsOSTypes[osfam].osTypes[i].description, vboxSettingsOSTypes[osfam].osTypes[i].id);
- }
- // Update image
- document.images["vboxOSTypeImg"].src = "images/vbox/" + vboxGuestOSTypeIcon(vboxSettingsOSTypes[osfam].osTypes[0].id);
- }
-
- var vboxSettingsOSTypes = new Array();
- var vboxSettingsOSTypesObj = {};
-
- // shorthand
- var vboxOSTypes = $('#vboxPane').data('vboxOSTypes');
-
- // Default OS Type set to my fav :) Eventually will move to config.php
- var vboxDefaultOSTypeId = 'Debian';
-
- var myOSType = $('#vboxSettingsDialog').data('vboxMachineData').OSTypeId;
- var dosfam = null; // holds defaultostype family id
- for(var i in vboxOSTypes) {
-
- // Only ostypes supported by this install
- if(!vboxOSTypes[i].supported && myOSType != vboxOSTypes[i].id) continue;
-
- // create array of os family types
- if(!vboxSettingsOSTypes[vboxOSTypes[i].familyId]) {
- vboxSettingsOSTypes[vboxOSTypes[i].familyId] = {'id':vboxOSTypes[i].familyId,'description':vboxOSTypes[i].familyDescription,'osTypes':[]};
- }
-
- // We're on the default os type, record family id and index number
- // so that we can set it later on
- if(vboxOSTypes[i].id == vboxDefaultOSTypeId) {
- dosfam = vboxOSTypes[i].familyId;
- vboxDefaultOSTypeId = vboxSettingsOSTypes[vboxOSTypes[i].familyId].osTypes.length;
- }
-
- vboxSettingsOSTypes[vboxOSTypes[i].familyId].osTypes[vboxSettingsOSTypes[vboxOSTypes[i].familyId].osTypes.length] = {'id':vboxOSTypes[i].id,'description':vboxOSTypes[i].description };
-
- vboxSettingsOSTypesObj[vboxOSTypes[i].id] = vboxOSTypes[i];
-
- // Preload icons
- vboxOSTypes[i].icon = new Image();
- vboxOSTypes[i].icon.src = "images/vbox/" + vboxGuestOSTypeIcon(vboxOSTypes[i].id);
-
- }
- // clear all options
- document.forms['frmVboxSettings'].vboxSettingsGeneralOSFamily.options.length = 0;
- $(document.forms['frmVboxSettings'].vboxSettingsGeneralOSFamily).children().remove();
- for(var i in vboxSettingsOSTypes) {
- // default os type family? record in dosfam
- if(i == dosfam) dosfam = document.forms['frmVboxSettings'].vboxSettingsGeneralOSFamily.options.length;
- document.forms['frmVboxSettings'].vboxSettingsGeneralOSFamily.options[document.forms['frmVboxSettings'].vboxSettingsGeneralOSFamily.options.length] = new Option(vboxSettingsOSTypes[i].description, vboxSettingsOSTypes[i].id);
- }
- // OnChange, update os type list and icon
- document.getElementById('vboxSettingsGeneralOSFamily').setAttribute('onChange','vboxSettingsUpdateOSList(this.value)');
- document.getElementById('vboxSettingsGeneralOSType').setAttribute('onChange','document.images["vboxOSTypeImg"].src = "images/vbox/" + vboxGuestOSTypeIcon(this.value)');
-
-
-
-
- /* Update settings when data is loaded */
- $('#vboxSettingsDialog').on('dataLoaded', function(){
-
- /* Defaults from machine */
- document.forms['frmVboxSettings'].vboxSettingsGeneralName.value = $('#vboxSettingsDialog').data('vboxMachineData').name;
- document.forms['frmVboxSettings'].vboxSettingsGeneralOSFamily.value = vboxSettingsOSTypesObj[$('#vboxSettingsDialog').data('vboxMachineData').OSTypeId].familyId;
- $(document.forms['frmVboxSettings'].vboxSettingsGeneralOSFamily).change();
- document.forms['frmVboxSettings'].vboxSettingsGeneralOSType.value = $('#vboxSettingsDialog').data('vboxMachineData').OSTypeId;
- $(document.forms['frmVboxSettings'].vboxSettingsGeneralOSType).change();
- document.forms['frmVboxSettings'].vboxSettingsGeneralSnapshotFolder.value = $('#vboxSettingsDialog').data('vboxMachineData').snapshotFolder;
- document.forms['frmVboxSettings'].vboxSettingsGeneralDescription.innerHTML = $('#vboxSettingsDialog').data('vboxMachineData').description;
-
- /* Advanced config options */
- $(document.forms['frmVboxSettings'].vboxSettingsTabGeneralInputKeyboard).val($('#vboxSettingsDialog').data('vboxMachineData').keyboardHIDType);
- $(document.forms['frmVboxSettings'].vboxSettingsTabGeneralInputMouse).val($('#vboxSettingsDialog').data('vboxMachineData').pointingHIDType);
-
- /* OS Type */
-
- // shorthand
- var vboxOSTypes = $('#vboxPane').data('vboxOSTypes');
- for(var i = 0; i < vboxOSTypes.length; i++) {
- if(vboxOSTypes[i].id == $('#vboxSettingsDialog').data('vboxMachineData').OSTypeId) {
- // Set the family then os type
- $(document.forms['frmVboxSettings'].vboxSettingsGeneralOSFamily).children('[value="'+vboxOSTypes[i].familyId+'"]').prop('selected',true);
- $(document.forms['frmVboxSettings'].vboxSettingsGeneralOSFamily).trigger('change');
- $(document.forms['frmVboxSettings'].vboxSettingsGeneralOSType).children('[value="'+vboxOSTypes[i].id+'"]').prop('selected',true);
- $(document.forms['frmVboxSettings'].vboxSettingsGeneralOSType).trigger('change');
- break;
- }
- }
-
- /* Custom icons */
- if($('#vboxPane').data('vboxConfig').enableCustomIcons) {
-
- if($('#vboxSettingsDialog').data('vboxMachineData').customIcon) {
- $(document.forms['frmVboxSettings'].vboxSettingsGeneralIcon).val($('#vboxSettingsDialog').data('vboxMachineData').customIcon);
- $('#vboxSettingsGeneralIconImg').attr('src',$('#vboxSettingsDialog').data('vboxMachineData').customIcon);
- } else {
- $(document.forms['frmVboxSettings'].vboxSettingsGeneralIcon).val('');
- $('#vboxSettingsGeneralIconImg').attr('src','images/vbox/blank.gif');
- }
-
- }
-
- /* Autostart options */
- if($('#vboxPane').data('vboxConfig').vboxAutostartConfig) {
- document.forms['frmVboxSettings'].autostartEnabled.checked = ($('#vboxSettingsDialog').data('vboxMachineData').autostartEnabled);
- document.forms['frmVboxSettings'].autostartDelay.value = $('#vboxSettingsDialog').data('vboxMachineData').autostartDelay;
- }
-
- /* Start / stop config */
- if($('#vboxPane').data('vboxConfig').startStopConfig) {
- document.forms['frmVboxSettings'].vboxStartStopConfigStartup.selectedIndex = ($('#vboxSettingsDialog').data('vboxMachineData').startupMode == 'auto' ? 0 : 1);
- }
-
- /* Settings that are disabled / enabled depending on if VM is mutable */
- var p = $('#vboxSettingsTabGeneralBasic').parent().children('div');
- if(!$('#vboxSettingsDialog').data('vboxFullEdit')) {
- $(p).find('tr:not(.vboxRunningEnabled)').find('span').addClass('disabled');
- $(p).find('tr:not(.vboxRunningEnabled)').find('input,select,textarea').prop('disabled',true);
- $('#vboxSettingsTabGeneralAdvanced').find('input.vboxImgButton').css('background-image','url(images/vbox/select_file_disabled_16px.png)');
- $(document.images["vboxOSTypeImg"]).addClass('vboxDisabled');
- } else {
- $(p).find('tr:not(.vboxRunningEnabled)').find('span').removeClass('disabled');
- $(p).find('tr:not(.vboxRunningEnabled)').find('input,select,textarea').prop('disabled',false);
- $('#vboxSettingsTabGeneralAdvanced').find('input.vboxImgButton').css('background-image','url(images/vbox/select_file_16px.png)');
- $(document.images["vboxOSTypeImg"]).removeClass('vboxDisabled');
- }
-
- /*
- * This is a poor way to determine extpack installation status, but the web service can't access IExtPackManager :(
- */
- if(!($('#vboxSettingsDialog').data('vboxMachineData').VRDEServer && $('#vboxSettingsDialog').data('vboxMachineData').VRDEServer.VRDEExtPack)) {
- $('#vboxSettingsTabGeneralEncryption').parent().tabs('disable', 3);
- } else {
- $('#vboxSettingsTabGeneralEncryption').parent().tabs('enable', 3);
-
- // Encrypted media
- var encIds = vboxMedia.getEncryptedMediaIds(
- vboxStorage.getAttachedBaseMedia($('#vboxSettingsDialog').data('vboxMachineData'))
- );
-
- var lastCipher = null;
- var uniqueCiphers = true;
- for(var i = 0; i < encIds.length; i++) {
- if(lastCipher && (lastCipher != encIds[i].cipher)) {
- uniqueCiphers = false;
- break;
- }
- lastCipher = encIds[i].cipher;
- }
- $(document.forms['frmVboxSettings'].vboxSettingsGeneralEncryptionEnable).prop('checked', (encIds.length))
- .triggerHandler('click');
-
- if(uniqueCiphers) {
- $(document.forms['frmVboxSettings'].vboxSettingsTabGeneralEncryptionCipher).val(lastCipher);
- }
-
- $('#vboxSettingsDialog').data('vboxEncSettings', {
- enabled: $(document.forms['frmVboxSettings'].vboxSettingsGeneralEncryptionEnable).prop('checked'),
- uniqueCiphers: $(document.forms['frmVboxSettings'].vboxSettingsTabGeneralEncryptionCipher).val()
- });
- }
-
-
- /* Change general settings onSave() */
- }).on('save',function(){
-
- // Start / stop config
- if($('#vboxPane').data('vboxConfig').startStopConfig) {
- $('#vboxSettingsDialog').data('vboxMachineData').startupMode = document.forms['frmVboxSettings'].vboxStartStopConfigStartup.value;
- }
-
- // VirtualBox style start / stop config
- if($('#vboxPane').data('vboxConfig').vboxAutostartConfig) {
-
- $('#vboxSettingsDialog').data('vboxMachineData').autostopType = document.forms['frmVboxSettings'].vboxAutostartConfigShutdownOptions.value;
- $('#vboxSettingsDialog').data('vboxMachineData').autostartEnabled = document.forms['frmVboxSettings'].autostartEnabled.checked;
- if(isNaN(document.forms['frmVboxSettings'].autostartDelay.value))
- document.forms['frmVboxSettings'].autostartDelay.value = 0;
- $('#vboxSettingsDialog').data('vboxMachineData').autostartDelay = parseInt(document.forms['frmVboxSettings'].autostartDelay.value);
-
-
- }
-
- if(jQuery.trim(document.forms['frmVboxSettings'].vboxSettingsGeneralName.value))
- $('#vboxSettingsDialog').data('vboxMachineData').name = jQuery.trim(document.forms['frmVboxSettings'].vboxSettingsGeneralName.value);
-
- $('#vboxSettingsDialog').data('vboxMachineData').OSTypeId = document.forms['frmVboxSettings'].vboxSettingsGeneralOSType.value;
- $('#vboxSettingsDialog').data('vboxMachineData').snapshotFolder = document.forms['frmVboxSettings'].vboxSettingsGeneralSnapshotFolder.value;
- $('#vboxSettingsDialog').data('vboxMachineData').description = $(document.forms['frmVboxSettings'].vboxSettingsGeneralDescription).val();
-
- $('#vboxSettingsDialog').data('vboxMachineData').keyboardHIDType = $(document.forms['frmVboxSettings'].vboxSettingsTabGeneralInputKeyboard).val();
- $('#vboxSettingsDialog').data('vboxMachineData').pointingHIDType = $(document.forms['frmVboxSettings'].vboxSettingsTabGeneralInputMouse).val();
-
- if($('#vboxPane').data('vboxConfig').enableCustomIcons)
- $('#vboxSettingsDialog').data('vboxMachineData').customIcon = $(document.forms['frmVboxSettings'].vboxSettingsGeneralIcon).val();
-
- var encSettings = $('#vboxSettingsDialog').data('vboxEncSettings');
- if(encSettings) {
- var encSettingsChanged = (encSettings.enabled != $(document.forms['frmVboxSettings'].vboxSettingsGeneralEncryptionEnable).prop('checked')) ||
- (encSettings.uniqueCiphers != $(document.forms['frmVboxSettings'].vboxSettingsTabGeneralEncryptionCipher).val()) ||
- $(document.forms['frmVboxSettings'].vboxGeneralEncryptionPassword).val().length > 0;
-
- if(!encSettings.enabled && !$(document.forms['frmVboxSettings'].vboxSettingsGeneralEncryptionEnable).prop('checked'))
- encSettingsChanged = false;
-
- $('#vboxSettingsDialog').data('vboxEncSettingsChanged', encSettingsChanged);
- $('#vboxSettingsDialog').data('vboxEncEnabled', $(document.forms['frmVboxSettings'].vboxSettingsGeneralEncryptionEnable).prop('checked'));
- $('#vboxSettingsDialog').data('vboxEncCipher', $(document.forms['frmVboxSettings'].vboxSettingsTabGeneralEncryptionCipher).val());
- $('#vboxSettingsDialog').data('vboxEncPw', $(document.forms['frmVboxSettings'].vboxGeneralEncryptionPassword).val());
- } else {
- $('#vboxSettingsDialog').data('vboxEncSettingsChanged', false);
- }
-
- });
-
- function vboxSettingsGeneralValidate() {
-
- var encSettings = $('#vboxSettingsDialog').data('vboxEncSettings');
-
- // Going from disabled to enabled
- if(!encSettings.enabled && $(document.forms['frmVboxSettings'].vboxSettingsGeneralEncryptionEnable).prop('checked')) {
-
- if(!$(document.forms['frmVboxSettings'].vboxSettingsTabGeneralEncryptionCipher).val()) {
- vboxAlert(trans("Encryption cipher type not specified.", 'UIMachineSettingsGeneral'));
- return false;
- } else if(!$(document.forms['frmVboxSettings'].vboxGeneralEncryptionPassword).val()) {
- vboxAlert(trans("Encryption password empty.", 'UIMachineSettingsGeneral'));
- return false;
- } else if($(document.forms['frmVboxSettings'].vboxGeneralEncryptionPassword).val() != $(document.forms['frmVboxSettings'].vboxGeneralEncryptionPassword2).val()) {
- vboxAlert(trans("Encryption passwords do not match.", 'UIMachineSettingsGeneral'));
- return false;
- }
-
- // If enabled and poasswords don't match
- } else if($(document.forms['frmVboxSettings'].vboxSettingsGeneralEncryptionEnable).prop('checked')) {
- if($(document.forms['frmVboxSettings'].vboxGeneralEncryptionPassword).val() != $(document.forms['frmVboxSettings'].vboxGeneralEncryptionPassword2).val()) {
- vboxAlert(trans("Encryption passwords do not match.", 'UIMachineSettingsGeneral'));
- return false;
- }
- }
- return true;
- }
-
- </script>
|