true, 'name' => 'cat', 'placeholder' => 'Category name' ] ); if ( isset($cat) && strlen($cat) ) { $catInput->setValue( $cat ); } $submit = new OOUI\ButtonInputWidget( [ 'infusable' => true, 'label' => 'Submit', 'type' => 'submit' ] ); $fieldset = new OOUI\FieldsetLayout( [ 'infusable' => true, 'label' => 'Find readability of first ~50 pages in Wikipedia category:', 'classes' => [ "container" ] ] ); $fieldset->addItems( [ new OOUI\FieldLayout( $catInput, [ 'infusable' => true, 'align' => 'left' ] ), new OOUI\FieldLayout( $submit ) ] ); $form = new OOUI\FormLayout( [ 'infusable' => true, 'items' => [ $fieldset ], 'action' => '/category', 'method' => 'get', 'id' => 'category-form' ] ); ?> Readability of Wikipedia Pages by Category ' . htmlspecialchars( $content ) . ''; }; // If we've got a $pageList, go ahead and render it as a table. This is // only going to happen in the situation where a client doesn't have JS // enabled. if ( isset( $pageList ) ) { echo ''; echo ''; foreach ( $pageList as $page ) { echo '', $td( $page[0] ), $td( $page[2] ), ''; } echo '
Page Name Dale-Chall Readability Score
'; } ?>