diff --git a/app/portainer/components/forms/git-form/git-form-auth-fieldset.controller.ts b/app/portainer/components/forms/git-form/git-form-auth-fieldset.controller.ts index 84fd23846..fe3e712aa 100644 --- a/app/portainer/components/forms/git-form/git-form-auth-fieldset.controller.ts +++ b/app/portainer/components/forms/git-form/git-form-auth-fieldset.controller.ts @@ -52,7 +52,7 @@ export default class GitFormAuthFieldsetController { ...newValues, }; this.onChange?.(value); - await this.runGitValidation(value, false); + await this.runGitValidation(value, this.isAuthEdit); } async runGitValidation(value: GitAuthModel, isAuthEdit: boolean) { diff --git a/app/portainer/components/forms/stack-redeploy-git-form/stack-redeploy-git-form.controller.js b/app/portainer/components/forms/stack-redeploy-git-form/stack-redeploy-git-form.controller.js index 2c2146224..22e2639e6 100644 --- a/app/portainer/components/forms/stack-redeploy-git-form/stack-redeploy-git-form.controller.js +++ b/app/portainer/components/forms/stack-redeploy-git-form/stack-redeploy-git-form.controller.js @@ -179,6 +179,14 @@ class StackRedeployGitFormController { }); } + disablePullAndRedeployButton() { + return this.isSubmitButtonDisabled() || this.state.hasUnsavedChanges || !this.redeployGitForm.$valid; + } + + disableSaveSettingsButton() { + return this.isSubmitButtonDisabled() || !this.state.hasUnsavedChanges || !this.redeployGitForm.$valid; + } + isSubmitButtonDisabled() { return this.state.inProgress || this.state.redeployInProgress; } diff --git a/app/portainer/components/forms/stack-redeploy-git-form/stack-redeploy-git-form.html b/app/portainer/components/forms/stack-redeploy-git-form/stack-redeploy-git-form.html index cafd75c9b..83ae0521b 100644 --- a/app/portainer/components/forms/stack-redeploy-git-form/stack-redeploy-git-form.html +++ b/app/portainer/components/forms/stack-redeploy-git-form/stack-redeploy-git-form.html @@ -75,7 +75,7 @@