예제 #1
0
파일: option.php 프로젝트: azuya/Wi3
 public function __construct($id = "", $content = "")
 {
     parent::__construct();
     // Set attributes
     $this->attr("value", $id);
     $this->content($content);
 }
예제 #2
0
파일: formelement.php 프로젝트: azuya/Wi3
 public function __construct($name = "", $label = "")
 {
     parent::__construct();
     // Set attributes
     $this->attr("name", $name);
     $this->label($label);
     // Load the value from the Session if possible
     if (class_exists("PageInstanceId")) {
         $pageinstance = PageInstanceId::inst();
         $vars = $pageinstance->getVarsForPageInstance();
         if (isset($vars[$name])) {
             $this->val($vars[$name]);
         }
     }
 }
예제 #3
0
파일: form.php 프로젝트: azuya/Wi3
    public function renderContent()
    {
        $innerContent = parent::renderContent();
        $message = "";
        if (!empty($this->error)) {
            $message = '<div class="alert alert-error">
							' . $this->error . '
						</div>';
        } else {
            if (!empty($this->success)) {
                $message = '<div class="alert alert-success">
							' . $this->success . '
						</div>';
            }
        }
        return $message . $innerContent;
    }