mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-09-24 10:48:42 +00:00
Remove suggested values message for custom inputs
Bug: T296915 Change-Id: Iecd90b02ea5bebceda1e87ddddb43fdb71b91d9e
This commit is contained in:
parent
eef0ce91f7
commit
a2afdee49f
|
@ -2274,7 +2274,6 @@
|
|||
"visualeditor-dialog-transclusion-reset-confirmation-reset",
|
||||
"visualeditor-dialog-transclusion-reset-confirmation-title",
|
||||
"visualeditor-dialog-transclusion-see-template",
|
||||
"visualeditor-dialog-transclusion-suggestedvalues-warning",
|
||||
"visualeditor-dialog-transclusion-template-search",
|
||||
"visualeditor-dialog-transclusion-template-search-help",
|
||||
"visualeditor-dialog-transclusion-template-title-modifier",
|
||||
|
|
|
@ -234,7 +234,6 @@
|
|||
"visualeditor-dialog-transclusion-required-parameter-dialog-title": "Required {{PLURAL:$1|field|fields}} missing",
|
||||
"visualeditor-dialog-transclusion-required-parameter-is-blank": "Are you sure you want to continue without filling the $1 {{PLURAL:$2|field|fields}}?",
|
||||
"visualeditor-dialog-transclusion-see-template": "Templates are user-generated and may lack complete descriptions. There might be additional information on this [[$2|template's page]].",
|
||||
"visualeditor-dialog-transclusion-suggestedvalues-warning": "This is not one of the suggested values and may not work with the template.",
|
||||
"visualeditor-dialog-transclusion-title-insert-template": "Insert a template",
|
||||
"visualeditor-dialog-transclusion-title-insert-known-template": "Insert: $1",
|
||||
"visualeditor-dialog-transclusion-title-edit-known-template": "Edit: $1",
|
||||
|
|
|
@ -252,7 +252,6 @@
|
|||
"visualeditor-dialog-transclusion-required-parameter-dialog-title": "Title for the confirmation dialog opened if the user tries to insert/edit a template without filling all required fields.\n\nParameters:\n* $1 - Number of parameters missing, for PLURAL support.",
|
||||
"visualeditor-dialog-transclusion-required-parameter-is-blank": "Label for the confirmation dialog opened if the user tries to insert/edit a template without filling all required fields.\n\nParameters:\n* $1 - Parameters missing, as a list using {{msg-mw|and}}, {{msg-mw|comma-separator}} and {{msg-mw|word-separator}}.\n* $2 - Number of parameters missing, for PLURAL support.",
|
||||
"visualeditor-dialog-transclusion-see-template": "Message to user that additional template information might be available for a template.\n\nParameters:\n* $1 - Human-readable name of the template.\n* $2 - Full page name of the template.",
|
||||
"visualeditor-dialog-transclusion-suggestedvalues-warning": "Message shown to an editor when they manually add a value that is not a suggested value for a parameter.",
|
||||
"visualeditor-dialog-transclusion-title-insert-template": "Label for the transclusion dialog when selecting a transclusion to insert.",
|
||||
"visualeditor-dialog-transclusion-title-insert-known-template": "Label for the transclusion dialog when editing a transclusion to insert.\n\nParameters:\n* $1 - Transclusion name.",
|
||||
"visualeditor-dialog-transclusion-title-edit-known-template": "Label for the transclusion dialog when editing an existing transclusion.\n\nParameters:\n* $1 - Transclusion name.",
|
||||
|
|
|
@ -188,13 +188,6 @@ ve.ui.MWParameterPage = function VeUiMWParameterPage( parameter, name, config )
|
|||
.insertAfter( labelElement.$element );
|
||||
}
|
||||
|
||||
if ( this.useSuggestedValues && this.parameter.getSuggestedValues().length ) {
|
||||
this.warningMessage = new OO.ui.MessageWidget( {
|
||||
inline: true,
|
||||
classes: [ 've-ui-mwParameterPage-warning' ]
|
||||
} ).toggle( false );
|
||||
this.$field.append( this.warningMessage.$element );
|
||||
}
|
||||
this.$element
|
||||
.addClass( 've-ui-mwParameterPage' )
|
||||
.append( this.$info, this.$field );
|
||||
|
@ -401,16 +394,6 @@ ve.ui.MWParameterPage.prototype.onValueInputChange = function () {
|
|||
if ( this.outlineItem ) {
|
||||
this.outlineItem.setFlags( { empty: !this.containsSomeValue() } );
|
||||
}
|
||||
|
||||
if ( this.warningMessage ) {
|
||||
var isNotSuggestedValue = value &&
|
||||
this.parameter.getSuggestedValues().length > 0 &&
|
||||
this.parameter.getSuggestedValues().indexOf( value ) === -1;
|
||||
if ( isNotSuggestedValue ) {
|
||||
this.warningMessage.setLabel( ve.msg( 'visualeditor-dialog-transclusion-suggestedvalues-warning' ) );
|
||||
}
|
||||
this.warningMessage.toggle( isNotSuggestedValue );
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -12,16 +12,6 @@
|
|||
background-color: #c8ccd1;
|
||||
}
|
||||
|
||||
.ve-ui-mwParameterPage-warning {
|
||||
color: #202122; /* @wmui-color-base10 */
|
||||
font-weight: normal;
|
||||
margin-top: 0.5em;
|
||||
}
|
||||
|
||||
.ve-ui-mwParameterPage-warning .oo-ui-iconElement-icon {
|
||||
opacity: 0.87;
|
||||
}
|
||||
|
||||
.ve-ui-mwParameterPage-info {
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue