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', 'Initial value', 'Label', 20 ); $txtField->setJsHint( _M('This is a javascript hint') ); // readonly input field $roField = new MTextField( 'roField', _M('This is readonly'), 'Label', 15 ); $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 \nfield... :-)", 'Label', 25, 5, 20 ); // send file field $fileField = new MFileField( 'fileField', 'value', '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', '', 'Label' ); $controls = array ( new MLabel( "Text Field (with hint): "), $txtField, new MSeparator(), new MLabel( "Read Only Text Field: "), $roField, new MSeparator(), new MLabel( "Password Field: "), $passField, new MSeparator(), new MLabel( "Hidden Field: Uh! it's hidden!"), $hidField, new MSeparator(), new MLabel( "MultiLineField: "), $multiField, new MSeparator(), new MLabel( "File Field: "), $fileField, new MSeparator(), new MLabel( "Calendar Field: "), $calField, new MSeparator(), new MLabel( "Currency Field: "), $currencyField, 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 ); ?>