SpecialUploadStash: Convert form to OOUI
authorBartosz Dziewoński <matma.rex@gmail.com>
Thu, 17 Mar 2016 22:45:20 +0000 (23:45 +0100)
committerBartosz Dziewoński <matma.rex@gmail.com>
Thu, 17 Mar 2016 22:54:33 +0000 (23:54 +0100)
Bug: T130328
Change-Id: I2ebbc783ff93dd47c552fa88230ea5ab2dbefb1e

includes/specials/SpecialUploadStash.php

index 2e622e1..199eebd 100644 (file)
@@ -369,13 +369,14 @@ class SpecialUploadStash extends UnlistedSpecialPage {
 
                $context = new DerivativeContext( $this->getContext() );
                $context->setTitle( $this->getPageTitle() ); // Remove subpage
-               $form = new HTMLForm( [
+               $form = HTMLForm::factory( 'ooui', [
                        'Clear' => [
                                'type' => 'hidden',
                                'default' => true,
                                'name' => 'clear',
                        ]
                ], $context, 'clearStashedUploads' );
+               $form->setSubmitDestructive();
                $form->setSubmitCallback( [ __CLASS__, 'tryClearStashedUploads' ] );
                $form->setSubmitTextMsg( 'uploadstash-clear' );