12 lines
470 B
PHP
12 lines
470 B
PHP
<?
|
|
|
|
namespace ui\input;
|
|
class Submit extends Input{
|
|
public function render(array $opt = array()): string {
|
|
if(file_exists($file = dirname(__FILE__).'/views/'.$this->theme.'.php')) {
|
|
ob_start();include($file);return ob_get_clean();
|
|
} else {
|
|
return '<button class="btn btn-primary ' . $this->options[Input::CSS_CLASS] . '" name="' . $this->name . '" value="' . $this->value . '">' . $this->label . '</button>';
|
|
}
|
|
}
|
|
} |