mirror of
https://github.com/rbalsleyMSFT/FFU.git
synced 2026-06-14 02:09:35 -06:00
Hides download settings when using a local ISO
Updates the UI to conditionally hide the Windows language and media type controls. These settings are only applicable when downloading a new image and are irrelevant when a local ISO file is provided. This change simplifies the user interface and prevents confusion by only showing options relevant to the selected action.
This commit is contained in:
@@ -564,6 +564,20 @@ function Get-WindowsSettingsCombos {
|
||||
[psobject]$State
|
||||
)
|
||||
|
||||
# Determine visibility for download-specific controls based on ISO path
|
||||
$visibility = if (-not [string]::IsNullOrEmpty($isoPath) -and $isoPath.EndsWith('.iso', [System.StringComparison]::OrdinalIgnoreCase)) {
|
||||
'Collapsed'
|
||||
}
|
||||
else {
|
||||
'Visible'
|
||||
}
|
||||
|
||||
# Set visibility for Language and Media Type controls
|
||||
$State.Controls.WindowsLangStackPanel.Visibility = $visibility
|
||||
$State.Controls.cmbWindowsLang.Visibility = $visibility
|
||||
$State.Controls.MediaTypeStackPanel.Visibility = $visibility
|
||||
$State.Controls.cmbMediaType.Visibility = $visibility
|
||||
|
||||
# Update Release combo first
|
||||
Update-WindowsReleaseCombo -isoPath $isoPath -State $State
|
||||
|
||||
|
||||
Reference in New Issue
Block a user