Fixes for incorrect button labels and the password validation error. (#13333)

This commit is contained in:
Aasim Khan
2020-11-10 09:05:28 -08:00
committed by GitHub
parent 0d49744061
commit 1c9322c0e8

View File

@@ -83,7 +83,13 @@ export class NotebookWizardPage extends ResourceTypePage {
if (pageInfo.isLastPage) {
// on the last page either one or both of done button and generateScript button are visible depending on configuration of 'runNotebook' in wizard info
this.wizard.wizardObject.doneButton.hidden = !this.isDoneButtonVisible;
if (this._model.wizardInfo.doneAction?.label) {
this.wizard.wizardObject.doneButton.label = this._model.wizardInfo.doneAction.label;
}
this.wizard.wizardObject.generateScriptButton.hidden = !this.isGenerateScriptButtonVisible;
if (this._model.wizardInfo.scriptAction?.label) {
this.wizard.wizardObject.generateScriptButton.label = this._model.wizardInfo.scriptAction.label;
}
} else {
//on any page but the last page doneButton and generateScriptButton are hidden
this.wizard.wizardObject.doneButton.hidden = true;
@@ -96,7 +102,12 @@ export class NotebookWizardPage extends ResourceTypePage {
this.wizard.wizardObject.registerNavigationValidator((pcInfo) => {
this.wizard.wizardObject.message = { text: '' };
if (pcInfo.newPage > pcInfo.lastPage) {
/**
* In case of the last page, when the user presses the ok Button the new page will be undefined.
* The first condition checks that edge case.
*/
if (pcInfo.newPage === undefined || pcInfo.newPage > pcInfo.lastPage) {
const messages: string[] = [];
this.validators.forEach((validator) => {