create_file_chooser($name,$value,$jforms); } } /*-----------------------------------------*/ public function set_chooser_type($type) { $this->type = $type; } /*-----------------------------------------*/ public function get_chooser_type() { return $this->type; } /*-----------------------------------------*/ public function set_choose_name($name) { $this->name = $name; } /*-----------------------------------------*/ public function get_chooser_name() { return $this->name; } /*-----------------------------------------*/ public function create_file_chooser($name, $value="", &$jforms=null) { $style="display: block;"; if($value =="") { $style="display: none;"; } if($this->type == "image") { echo " type}\" name=\"{$name}\" id=\"{$name}\"> get_chooser_type()}\" class=\"btn btn-default btn-sm file_chooser\"> Choose type}\"> Delete "; } else { echo " type}\" name=\"{$name}\" id=\"{$name}\"> get_chooser_type()}\" class=\"btn btn-default btn-sm file_chooser\"> Choose type}\"> Delete "; } if(!is_null($jforms)) { /* $script = " update_chooser('{$name}', '{$value}', '{$this->get_chooser_type()}'); "; $jforms->add_script($script); */ } } } }