dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Include bot password app ID in audit data"
[lhc/web/wiklou.git]
/
includes
/
widget
/
ExpiryInputWidget.php
diff --git
a/includes/widget/ExpiryInputWidget.php
b/includes/widget/ExpiryInputWidget.php
index
7395df1
..
289cc85
100644
(file)
--- a/
includes/widget/ExpiryInputWidget.php
+++ b/
includes/widget/ExpiryInputWidget.php
@@
-20,11
+20,6
@@
class ExpiryInputWidget extends Widget {
*/
protected $relativeInput;
*/
protected $relativeInput;
- /**
- * @var bool
- */
- protected $noDatePicker;
-
/**
* @var bool
*/
/**
* @var bool
*/
@@
-37,26
+32,20
@@
class ExpiryInputWidget extends Widget {
public function __construct( Widget $relativeInput, array $options = [] ) {
$config = \RequestContext::getMain()->getConfig();
public function __construct( Widget $relativeInput, array $options = [] ) {
$config = \RequestContext::getMain()->getConfig();
- $options['noDatePicker'] = $config->get( 'ExpiryWidgetNoDatePicker' );
-
parent::__construct( $options );
parent::__construct( $options );
- $this->noDatePicker = $options['noDatePicker'];
- $this->required = isset( $options['required'] ) ? $options['required'] : false;
+ $this->required = $options['required'] ?? false;
// Properties
$this->relativeInput = $relativeInput;
$this->relativeInput->addClasses( [ 'mw-widget-ExpiryWidget-relative' ] );
// Initialization
// Properties
$this->relativeInput = $relativeInput;
$this->relativeInput->addClasses( [ 'mw-widget-ExpiryWidget-relative' ] );
// Initialization
- $classes = [
- 'mw-widget-ExpiryWidget',
- ];
- if ( $options['noDatePicker'] === false ) {
- $classes[] = 'mw-widget-ExpiryWidget-hasDatePicker';
- }
$this
$this
- ->addClasses( $classes )
+ ->addClasses( [
+ 'mw-widget-ExpiryWidget',
+ 'mw-widget-ExpiryWidget-hasDatePicker'
+ ] )
->appendContent( $this->relativeInput );
}
->appendContent( $this->relativeInput );
}
@@
-68,7
+57,6
@@
class ExpiryInputWidget extends Widget {
* {@inheritdoc}
*/
public function getConfig( &$config ) {
* {@inheritdoc}
*/
public function getConfig( &$config ) {
- $config['noDatePicker'] = $this->noDatePicker;
$config['required'] = $this->required;
$config['relativeInput'] = [];
$this->relativeInput->getConfig( $config['relativeInput'] );
$config['required'] = $this->required;
$config['relativeInput'] = [];
$this->relativeInput->getConfig( $config['relativeInput'] );