diff --git a/client-src/elements/chromedash-add-stage-dialog.js b/client-src/elements/chromedash-add-stage-dialog.js
index 1a746d61..876b141f 100644
--- a/client-src/elements/chromedash-add-stage-dialog.js
+++ b/client-src/elements/chromedash-add-stage-dialog.js
@@ -1,6 +1,7 @@
import {LitElement, css, html} from 'lit';
import {SHARED_STYLES} from '../sass/shared-css.js';
import {CREATEABLE_STAGES, FORMS_BY_STAGE_TYPE} from './form-definition.js';
+import {renderHTMLIf} from './utils.js';
let addStageDialogEl;
@@ -90,17 +91,22 @@ class ChromedashAddStageDialog extends LitElement {
}
renderStageSelect() {
+ const offerChoice = CREATEABLE_STAGES[this.featureType].length > 1;
+ const initialValue = offerChoice ? 0 : CREATEABLE_STAGES[this.featureType][0];
+ this.canSubmit = !offerChoice;
return html`
- Select a stage to create
+ ${renderHTMLIf(
+ offerChoice,
+ html`Select a stage to create`)}
${this.renderSelectMenuItems()}
`;
- return this.renderSection('Metadata', content);
+ return this.renderSection(
+ 'Metadata',
+ content,
+ /* isActive=*/false,
+ /* defaultOpen=*/this.feature.is_enterprise_feature);
}
renderGateChip(feStage, gate) {
@@ -593,8 +597,7 @@ class ChromedashFeatureDetail extends LitElement {
${this.renderSectionFields(fields, feStage)}
`;
-
- const defaultOpen = (feStage.id == this.openStage);
+ const defaultOpen = this.feature.is_enterprise_feature || (feStage.id == this.openStage);
return this.renderSection(name, content, isActive, defaultOpen);
}
diff --git a/client-src/elements/chromedash-feature-page.js b/client-src/elements/chromedash-feature-page.js
index 94a406ea..abce46a6 100644
--- a/client-src/elements/chromedash-feature-page.js
+++ b/client-src/elements/chromedash-feature-page.js
@@ -2,7 +2,7 @@ import {LitElement, css, html, nothing} from 'lit';
import './chromedash-feature-detail';
import './chromedash-gantt';
import {openApprovalsDialog} from './chromedash-approvals-dialog';
-import {autolink, showToastMessage} from './utils.js';
+import {autolink, renderHTMLIf, showToastMessage} from './utils.js';
import {SHARED_STYLES} from '../sass/shared-css.js';
const INACTIVE_STATES = [
@@ -288,13 +288,13 @@ export class ChromedashFeaturePage extends LitElement {
- ${canEdit ? html`
+ ${renderHTMLIf(canEdit && !this.feature.is_enterprise_feature, html`
- `: nothing}
+ `)}