Created
March 17, 2013 22:21
-
-
Save vakopian/5183904 to your computer and use it in GitHub Desktop.
Test for issue https://github.com/qcubed/framework/issues/192
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Include prepend.inc to load Qcodo | |
require('includes/configuration/prepend.inc.php'); | |
class ExampleForm extends QForm { | |
/** @var QAutocomplete */ | |
protected $ac; | |
/** @var QJqButton */ | |
protected $btnClear; | |
protected function Form_Create() { | |
$this->ac = new QAutocomplete($this); | |
$this->ac->Text = "Test"; | |
$this->ac->UseWrapper = false; | |
// Button | |
$this->btnClear = new QJqButton($this); | |
$this->btnClear->Label = "Clear"; | |
$this->btnClear->AddAction(new QClickEvent, new QAjaxAction("button_click")); | |
} | |
protected function button_click() { | |
$this->ac->Text = ""; | |
} | |
} | |
ExampleForm::Run('ExampleForm'); | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
<html><head> | |
<meta http-equiv="Content-Type" content="text/html; charset=<?php _p(QApplication::$EncodingType); ?>" /> | |
<title>Sample QForm</title> | |
<style type="text/css">@import url("<?php _p(__VIRTUAL_DIRECTORY__ . __CSS_ASSETS__); ?>/styles.css");</style> | |
</head><body> | |
<?php $this->RenderBegin(); ?> | |
<?php $this->ac->Render(); ?> | |
<?php $this->btnClear->Render(); ?> | |
<?php $this->RenderEnd(); ?> | |
</body></html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment