addOption( 'Input Controls', $module, $action ); $panel = new MPanel( 'pnlName', _M('Fields Controls') ); // create some input fields // text input with a javascript hint $txtField = new MTextField( 'txtField', 'value for MTextField', 'Label', 20 ); $txtField->setJsHint( _M('This is a javascript hint') ); // readonly input field $roField = new MTextField( 'roField', _M('readonly MTextField'), 'Label', 20 ); $roField->setReadOnly( true ); // password field $passField = new MPasswordField( 'passField', 'value', 'Label', 15 ); // this is only to demonstrate the use of setClass to set the CSS class $passField->setClass( 'm-link' ); // hidden field $hidField = new MHiddenField( 'hidField', 'value' ); // text input $multiField = new MMultilineField( 'multiField', "This is the initial \nvalue for this \nMMultiLineField... :-)", 'Label', 25, 5, 20 ); // send file field $fileField = new MFileField( 'fileField', 'MFileField', 'Label', 30 ); // input with a calendar selector $calField = new MCalendarField( 'calField', '', 'Label' ); $calField->setJsHint( _M('Click the image to open the calendar') ); $currencyField = new MCurrencyField( 'curField', '10', 'Label' ); //$htmlEditor = new MMultiLineField('multiField'); //$htmlEditor->setHtmlEditor(); $controls = array ( new MLabel( "MTextField (with javascript hint): "), $txtField, new MSeparator(), new MLabel( "Read Only MTextField: "), $roField, new MSeparator(), new MLabel( "MPasswordField: "), $passField, new MSeparator(), new MLabel( "NHiddenField: Uh! it's hidden!"), $hidField, new MSeparator(), new MLabel( "MMultiLineField: "), $multiField, new MSeparator(), new MLabel( "MFileField: "), $fileField, new MSeparator(), new MLabel( "MCalendarField (with javascript hint): "), $calField, new MSeparator(), new MLabel( "MCurrencyField: "), $currencyField, new MSeparator(), // new MLabel( "MMultiLineField with html editor: "), $htmlEditor, new MSeparator() ); $panel->addControl( $controls ); // insert a spacing between the theme elements $theme->breakContent(); // insert the panel as the first element of the theme $theme->insertContent( $panel ); // create a link to view the source of this file $src = new ViewSource( __FILE__ ); // insert as the last element of the theme $theme->appendContent( $src ); ?>