示例#1
0
/**
 * CHANGED TO a, b and c values, to see that selected works fine
 */
$multicombo = new afExtjsFieldMultiCombo($fieldset1, array('name' => 'my_multi_combo', 'label' => 'My multi combo', 'help' => "multi combo box", 'comment' => 'comment for multi combo', 'options' => array('a' => 'Value A', 'b' => 'Value B', 'c' => 'Value C'), 'selected' => array('b', 'c'), 'state' => 'editable', 'clear' => true));
$form->endFieldset($fieldset1);
new afExtjsSubmitButton($form, array('action' => '/interface/test'));
new afExtjsResetButton($form);
new afExtjsButton($form, array('label' => 'Just a normal button', 'handlers' => array('click' => array('parameters' => 'field,event', 'source' => 'alert(field.name);'))));
new afExtjsLinkButton($form, array('label' => 'www.immune.dk', 'url' => 'http://www.immune.dk', 'icon' => '/images/famfamfam/cancel.png'));
new afExtjsLinkButton($form, array('label' => 'www.immune.dk', 'url' => 'http://www.immune.dk'));
$form->end();
$layout->addItem('center', $form);
/**
 * SECOND FORM
 */
$form1 = new afExtjsForm(array('action' => '/interface/test'));
$fieldset = $form1->startFieldset(array('legend' => 'Fieldset from second form'));
new afExtjsFieldMultiCombo($fieldset, array('name' => 'my_multi_combo', 'label' => 'My multi combo', 'help' => "multi combo box", 'comment' => 'comment for multi combo', 'options' => array('1' => 'Value 1', '2' => 'Value 2', '3' => 'Value 3'), 'selected' => array('1', '2'), 'state' => 'editable', 'clear' => true));
$form1->endFieldset($fieldset);
new afExtjsSubmitButton($form1, array('action' => '/interface/test'));
new afExtjsResetButton($form1);
new afExtjsButton($form1, array('label' => 'Just a normal button', 'handlers' => array('click' => array('parameters' => 'field,event', 'source' => 'alert(field.name);'))));
new afExtjsLinkButton($form1, array('label' => 'www.immune.dk', 'url' => 'http://www.immune.dk', 'icon' => '/images/famfamfam/cancel.png'));
new afExtjsLinkButton($form1, array('label' => 'www.immune.dk', 'url' => 'http://www.immune.dk'));
$form1->end();
$layout->addItem('center', $form1);
$tools = new afExtjsTools();
$tools->addItem(array('id' => 'gear', 'handler' => array('source' => "Ext.Msg.alert('Message', 'The Settings tool was clicked.');")));
$tools->addItem(array('id' => 'close', 'handler' => array('parameters' => 'e,target,panel', 'source' => "panel.ownerCt.remove(panel, true);")));
$layout->addCenterComponent($tools, array('title' => 'Forms'));
$layout->end();
?>
</head>

<body style="background-image: url(/appFlowerStudioPlugin/images/bg/backgrond_3.2.2.jpg);background-position: 50% 50%;background-repeat: no-repeat;">
    <!-- Page Frame -->
<?php 
$layout = new afExtjsSfGuardLayout();
/**
 * EXTJS REQUEST PASSWORD FORM
 */
$form = new afExtjsForm(array('action' => url_for('/afsAuthorize/passwordRequest')));
$fieldset = $form->startFieldset(array('legend' => 'Receive your login details by email'));
$columns = $fieldset->startColumns(array("columnWidth" => 1));
$col = $columns->startColumn(array("columnWidth" => 1));
$username = new afExtjsFieldInput($col, array('name' => 'email', 'label' => 'Email', 'value' => $sf_params->get('email'), 'help' => "Enter your email", 'comment' => 'write your email', 'width' => '150'));
$columns->endColumn($col);
$fieldset->endColumns($columns);
$form->endFieldset($fieldset);
new afExtjsSubmitButton($form, array('action' => url_for('/afsAuthorize/passwordRequest')));
new afExtjsLinkButton($form, array('url' => url_for('/afsAuthorize/index'), 'label' => 'Go to Login', 'load' => 'page'));
$form->end();
$layout->addItem('center', $form);
$tools = new afExtjsTools();
//$tools->addItem(array('id'=>'gear','handler'=>array('source'=>"Ext.Msg.alert('Message', 'The Settings tool was clicked.');")));
//$tools->addItem(array('id'=>'close','handler'=>array('parameters'=>'e,target,panel','source'=>"panel.ownerCt.remove(panel, true);")));
$layout->addCenterComponent($tools, array('title' => 'Request Password'));
$layout->end();
?>
</body>
</html>
示例#3
0
$double_tree_selected = array(array("text" => "Group 1", "value" => "G1", "leaf" => false, "iconCls" => "folder", "children" => array(array("text" => "Item11", "value" => "item 11", "leaf" => true, "iconCls" => "file"))));
/**
 * WINDOW FORM
 */
$form0 = new afExtjsForm(array('action' => '/interface/test', 'frame' => true));
$fieldset = $form0->startFieldset(array('legend' => 'Fieldset from second form'));
new afExtjsFieldDoubleTree($fieldset, array('name' => 'my_double_tree', 'label' => 'My double tree', 'help' => 'test help', 'comment' => 'comment on double tree', 'state' => 'editable', 'fromLegend' => 'Options grouped', 'toLegend' => 'Selected grouped', 'options' => $double_tree_options, 'selected' => $double_tree_selected));
new afExtjsFieldInput($fieldset, array('name' => 'my_name', 'label' => 'My Name', 'value' => 'RaduX', 'help' => "'+field.value+'", 'comment' => 'comment on the upper field', 'handlers' => array('change' => array('parameters' => 'field', 'source' => 'alert(field.value);'))));
new afExtjsFieldMultiCombo($fieldset, array('name' => 'my_multi_combo', 'label' => 'My multi combo', 'help' => "multi combo box", 'comment' => 'comment for multi combo', 'options' => array('1' => 'Value 1', '2' => 'Value 2', '3' => 'Value 3'), 'selected' => array('1', '2'), 'state' => 'editable', 'clear' => true));
$form0->endFieldset($fieldset);
new afExtjsSubmitButton($form0, array('action' => '/interface/test'));
new afExtjsResetButton($form0);
new afExtjsButton($form0, array('label' => 'Just a normal button', 'handlers' => array('click' => array('parameters' => 'field,event', 'source' => 'alert(field.name);'))));
new afExtjsLinkButton($form0, array('label' => 'www.immune.dk', 'url' => 'http://www.immune.dk', 'icon' => '/images/famfamfam/cancel.png'));
new afExtjsLinkButton($form0, array('label' => 'www.immune.dk', 'url' => 'http://www.immune.dk'));
$form0->end();
/**
 * FIRST FORM
 */
$form = new afExtjsForm(array('action' => '/interface/test'));
//$form->addHelp($html);
/**
 * COLUMNS IN FORM START, ticket #1002
 */
$columns = $form->startColumns();
/**
 * one half column
 */
$column1 = $columns->startColumn(array('labelAlign' => 'top'));
new afExtjsFieldDateTime($column1, array('name' => 'my_datec1', 'label' => 'My Date 1', 'value' => '', 'comment' => 'comment on the upper field', 'type' => 'date', 'helpType' => 'inline'));
$columns->endColumn($column1);