- $form = Xml::openElement( 'form', array( 'method' => 'post',
- 'action' => $this->getPageTitle()->getLocalURL( 'action=submit' ) ) );
- $form .= Xml::inputLabel(
- $this->msg( 'export-addcattext' )->text(),
- 'catname',
- 'catname',
- 40,
- $categoryName
- ) . ' ';
- $form .= Xml::submitButton(
- $this->msg( 'export-addcat' )->text(),
- array( 'name' => 'addcat' )
- ) . '<br />';
-
+ $formDescriptor = array(
+ 'catname' => array(
+ 'type' => 'textwithbutton',
+ 'name' => 'catname',
+ 'horizontal-label' => true,
+ 'label-message' => 'export-addcattext',
+ 'default' => $categoryName,
+ 'size' => 40,
+ 'buttontype' => 'submit',
+ 'buttonname' => 'addcat',
+ 'buttondefault' => $this->msg( 'export-addcat' )->text(),
+ ),
+ );