Skip to content

Commit

Permalink
Small fix
Browse files Browse the repository at this point in the history
Signed-off-by: Uladzislau <[email protected]>
  • Loading branch information
KUGDev committed Nov 13, 2024
1 parent ed09efc commit 522702a
Showing 1 changed file with 8 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import com.intellij.ui.components.JBCheckBox
import com.intellij.ui.components.JBTextField
import com.intellij.ui.dsl.builder.*
import org.zowe.explorer.common.message
import com.intellij.ui.dsl.gridLayout.HorizontalAlign
import org.zowe.explorer.common.ui.DialogMode
import org.zowe.explorer.common.ui.StatefulDialog
import org.zowe.explorer.common.ui.showUntilDone
Expand All @@ -48,13 +47,10 @@ import org.zowe.explorer.dataops.operations.ChangePasswordOperation
import org.zowe.explorer.dataops.operations.InfoOperation
import org.zowe.explorer.dataops.operations.ZOSInfoOperation
import org.zowe.explorer.explorer.EXPLORER_NOTIFICATION_GROUP_ID
import org.zowe.explorer.utils.*
import org.zowe.explorer.utils.crudable.Crudable
import org.zowe.explorer.utils.crudable.find
import org.zowe.explorer.utils.crudable.getAll
import org.zowe.explorer.utils.runTask
import org.zowe.explorer.utils.validateConnectionName
import org.zowe.explorer.utils.validateForBlank
import org.zowe.explorer.utils.validateZosmfUrl
import org.zowe.kotlinsdk.ChangePassword
import org.zowe.kotlinsdk.annotations.ZVersion
import java.awt.Component
Expand Down Expand Up @@ -309,14 +305,14 @@ class ConnectionDialog(
label("Username: ")
.widthGroup(sameWidthLabelsGroup)
(
if (state.zoweConfigPath == null)
textField()
else
cell(JPasswordField())
if (state.zoweConfigPath == null)
textField()
else
cell(JPasswordField())
)
.bindText(state::username)
.validationOnApply {
if (it !is JPasswordField)
if (it !is JPasswordField)
it.text = it.text.trim()
validateForBlank(it)
}.onApply {
Expand All @@ -330,7 +326,8 @@ class ConnectionDialog(
passField = cell(JPasswordField())
.bindText(state::password)
.validationOnApply {
validateForBlank(it) }
validateForBlank(it)
}
.align(AlignX.FILL)
}
indent {
Expand Down

0 comments on commit 522702a

Please sign in to comment.