Merge "Drop index oi_name_archive_name on table oldimage"
[lhc/web/wiklou.git] / includes / htmlform / fields / HTMLFormFieldCloner.php
index abb50d0..dd9184b 100644 (file)
@@ -46,7 +46,7 @@ class HTMLFormFieldCloner extends HTMLFormField {
        protected $uniqueId;
 
        public function __construct( $params ) {
-               $this->uniqueId = get_class( $this ) . ++self::$counter . 'x';
+               $this->uniqueId = static::class . ++self::$counter . 'x';
                parent::__construct( $params );
 
                if ( empty( $this->mParams['fields'] ) || !is_array( $this->mParams['fields'] ) ) {
@@ -57,6 +57,7 @@ class HTMLFormFieldCloner extends HTMLFormField {
                if ( isset( $this->mParams['fields']['delete'] ) ) {
                        $class = 'mw-htmlform-cloner-delete-button';
                        $info = $this->mParams['fields']['delete'] + [
+                               'formnovalidate' => true,
                                'cssclass' => $class
                        ];
                        unset( $info['name'], $info['class'] );
@@ -310,6 +311,7 @@ class HTMLFormFieldCloner extends HTMLFormField {
                                : 'htmlform-cloner-delete';
                        $field = HTMLForm::loadInputFromParameters( $name, [
                                'type' => 'submit',
+                               'formnovalidate' => true,
                                'name' => $name,
                                'id' => Sanitizer::escapeId( "{$this->mID}--$key--delete" ),
                                'cssclass' => 'mw-htmlform-cloner-delete-button',
@@ -382,6 +384,7 @@ class HTMLFormFieldCloner extends HTMLFormField {
                        : 'htmlform-cloner-create';
                $field = HTMLForm::loadInputFromParameters( $name, [
                        'type' => 'submit',
+                       'formnovalidate' => true,
                        'name' => $name,
                        'id' => Sanitizer::escapeId( "{$this->mID}--create" ),
                        'cssclass' => 'mw-htmlform-cloner-create-button',