mediawiki-extensions-Visual.../modules/ve-mw/ui/dialogs/ve.ui.MWRequiredParamBlankConfirmDialog.js
Alex Monk b3ba809ccb Get confirmation when trying to insert/edit template/citation with required parameters missing
Relies on I5d894f8a in MW core. We'll need to update our wfUseMW when that gets merged.

Bug: 50747
Change-Id: I35e55658a3990121afe4d996ef4ee06547d2aa0c
2014-09-17 12:31:23 -07:00

52 lines
1.5 KiB
JavaScript

/*
* VisualEditor user interface MWRequiredParamBlankConfirmDialog class.
*
* @copyright 2011-2014 VisualEditor Team and others; see AUTHORS.txt
* @license The MIT License (MIT); see LICENSE.txt
*/
/**
* Dialog for letting the user confirm that they really want to insert a template/citation with blank required parameters.
*
* @class
* @extends OO.ui.MessageDialog
*
* @constructor
* @param {Object} [config] Configuration options
*/
ve.ui.MWRequiredParamBlankConfirmDialog = function VeUiMWRequiredParamBlankConfirmDialog( config ) {
// Parent constructor
ve.ui.MWRequiredParamBlankConfirmDialog.super.call( this, config );
};
/* Inheritance */
OO.inheritClass( ve.ui.MWRequiredParamBlankConfirmDialog, OO.ui.MessageDialog );
/* Static Properties */
ve.ui.MWRequiredParamBlankConfirmDialog.static.name = 'requiredparamblankconfirm';
ve.ui.MWRequiredParamBlankConfirmDialog.static.verbose = true;
ve.ui.MWRequiredParamBlankConfirmDialog.static.size = 'medium';
ve.ui.MWRequiredParamBlankConfirmDialog.static.icon = 'help';
ve.ui.MWRequiredParamBlankConfirmDialog.static.actions = [
{
action: 'ok',
label: OO.ui.deferMsg( 'visualeditor-dialog-transclusion-required-parameter-dialog-ok' ),
flags: [ 'primary', 'progressive' ]
},
{
action: 'cancel',
label: OO.ui.deferMsg( 'visualeditor-dialog-transclusion-required-parameter-dialog-cancel' ),
flags: 'safe'
}
];
/* Registration */
ve.ui.windowFactory.register( ve.ui.MWRequiredParamBlankConfirmDialog );