Style updates
This commit is contained in:
Родитель
18e91819e5
Коммит
ca4cb5543b
|
@ -58,7 +58,6 @@ export class ChromedashGuideNewPage extends LitElement {
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
this.userEmail = '';
|
this.userEmail = '';
|
||||||
// this.isEnterpriseFeature = false; // ??
|
|
||||||
this.fieldValues = [];
|
this.fieldValues = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -78,14 +77,12 @@ export class ChromedashGuideNewPage extends LitElement {
|
||||||
|
|
||||||
handleFormSubmit(event, hiddenTokenField) {
|
handleFormSubmit(event, hiddenTokenField) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
// const submitBody =
|
|
||||||
formatFeatureChanges(this.fieldValues, this.featureId);
|
formatFeatureChanges(this.fieldValues, this.featureId);
|
||||||
|
|
||||||
// get the XSRF token and update it if it's expired before submission
|
// get the XSRF token and update it if it's expired before submission
|
||||||
window.csClient.ensureTokenIsValid().then(() => {
|
window.csClient.ensureTokenIsValid().then(() => {
|
||||||
hiddenTokenField.value = window.csClient.token;
|
hiddenTokenField.value = window.csClient.token;
|
||||||
event.target.submit();
|
event.target.submit();
|
||||||
// return csClient.updateFeature(submitBody);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -405,12 +405,12 @@ export function checkMilestoneStartEnd(startEndPair, getFieldValue) {
|
||||||
export function checkFeatureNameAndType(getFieldValue) {
|
export function checkFeatureNameAndType(getFieldValue) {
|
||||||
const name = (getFieldValue('name') || '').toLowerCase();
|
const name = (getFieldValue('name') || '').toLowerCase();
|
||||||
const featureType = Number(getFieldValue('feature_type') || '0');
|
const featureType = Number(getFieldValue('feature_type') || '0');
|
||||||
const deprecationName =
|
const isdeprecationName =
|
||||||
(name.includes('deprecat') || name.includes('remov'));
|
(name.includes('deprecat') || name.includes('remov'));
|
||||||
const deprecationType =
|
const isdeprecationType =
|
||||||
(featureType === FEATURE_TYPES.FEATURE_TYPE_DEPRECATION_ID[0]);
|
(featureType === FEATURE_TYPES.FEATURE_TYPE_DEPRECATION_ID[0]);
|
||||||
if (deprecationName !== deprecationType) {
|
if (isdeprecationName !== isdeprecationType) {
|
||||||
if (deprecationName) {
|
if (isdeprecationName) {
|
||||||
return {
|
return {
|
||||||
warning: `If the feature name contains "deprecate" or "remove",
|
warning: `If the feature name contains "deprecate" or "remove",
|
||||||
the feature type should be "Feature deprecation"`,
|
the feature type should be "Feature deprecation"`,
|
||||||
|
|
Загрузка…
Ссылка в новой задаче