Skip to content

Commit

Permalink
Fixed some validation
Browse files Browse the repository at this point in the history
  • Loading branch information
mcasperson committed Aug 12, 2024
1 parent 7d048b1 commit 9fbe9a7
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion internal/steps/azure_terraform_state.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,13 @@ func (s AzureTerraformStateStep) GetContainer(parent fyne.Window) *fyne.Containe
s.containerName.SetText(s.State.AzureContainerName)

validation := func(input string) {
if s.resourceGroupName != nil && s.resourceGroupName.Text != "" && s.storageAccountName != nil && s.storageAccountName.Text != "" && s.containerName != nil && s.containerName.Text != "" {
if s.subscriptionId != nil && s.subscriptionId.Text != "" &&
s.tenantId != nil && s.tenantId.Text != "" &&
s.applicationId != nil && s.applicationId.Text != "" &&
s.password != nil && s.password.Text != "" &&
s.resourceGroupName != nil && s.resourceGroupName.Text != "" &&
s.storageAccountName != nil && s.storageAccountName.Text != "" &&
s.containerName != nil && s.containerName.Text != "" {
s.next.Enable()
} else {
s.next.Disabled()
Expand All @@ -167,6 +173,10 @@ func (s AzureTerraformStateStep) GetContainer(parent fyne.Window) *fyne.Containe
s.resourceGroupName.OnChanged = validation
s.storageAccountName.OnChanged = validation
s.containerName.OnChanged = validation
s.subscriptionId.OnChanged = validation
s.tenantId.OnChanged = validation
s.applicationId.OnChanged = validation
s.password.OnChanged = validation

formLayout := container.New(
layout.NewFormLayout(),
Expand Down

0 comments on commit 9fbe9a7

Please sign in to comment.