$title
EOF;
}
public static function formInputTextBlock($args)
{
$name = $args['name'];
$disabled = empty($args['disabled'])?'':'disabled';
$placeholder = isset($args['placeholder'])?$args['placeholder']:'';
$value = isset($args['value'])?$args['value']:'';
$id = 'js'.$name;
if (isset($args['id'])) {
$id = $args['id'];
}
$tip = '';
if (isset($args['tip'])) {
$tip = ''.$args['tip'].'';
}
$label = '';
if (isset($args['label'])) {
$label = '';
}
$class = 'form-control';
if (isset($args['class'])) {
$class = $class.' '.$args['class'];
}
$type = 'text';
if (isset($args['type'])) {
$type = $args['type'];
}
return <<
$label
$tip
EOF;
}
public static function formInputFile($args)
{
$id = 'js'.$args['name'];
if (isset($args['id'])) {
$id = $args['id'];
}
$class = 'custom-file';
if (isset($args['class'])) {
$class = $class.' '.$args['class'];
}
$html = '';
$html .= '';
$html .= '';
$html .= '
';
return $html;
}
public static function formTextarea($args)
{
$id = 'js'.$args['name'];
if (isset($args['id'])) {
$id = $args['id'];
}
$class = 'form-control';
if (isset($args['class'])) {
$class = $class.' '.$args['class'];
}
$html = '';
return $html;
}
public static function formTextareaBlock($args)
{
$id = 'js'.$args['name'];
if (isset($args['id'])) {
$id = $args['id'];
}
$class = 'form-control';
if (!empty($args['class'])) {
$class = $class.' '.$args['class'];
}
$html = '';
if (!empty($args['label'])) {
$html .= '';
}
$html .= '';
if (!empty($args['tip'])) {
$html .= ''.$args['tip'].'';
}
$html .= '
';
return $html;
}
public static function formInputText($args)
{
$name = $args['name'];
$disabled = empty($args['disabled'])?'':'disabled';
$readonly = empty($args['readonly'])?'':'readonly';
$placeholder = isset($args['placeholder'])?$args['placeholder']:'';
$value = isset($args['value'])?$args['value']:'';
$id = 'js'.$name;
if (isset($args['id'])) {
$id = $args['id'];
}
$tip = '';
if (isset($args['tip'])) {
$tip = ''.$args['tip'].'';
}
$label = '';
if (isset($args['label'])) {
$label = '';
}
$class = 'form-control';
if (isset($args['class'])) {
$class = $class.' '.$args['class'];
}
$type = 'text';
if (isset($args['type'])) {
$type = $args['type'];
}
return <<
$label
$tip
EOF;
}
public static function formCheckbox($args)
{
$labelForCheckbox = isset($args['labelForCheckbox'])?$args['labelForCheckbox']:'';
$placeholder = isset($args['placeholder'])?$args['placeholder']:'';
$tip = isset($args['tip'])?$args['tip']:' ';
$value = isset($args['value'])?$args['value']:'';
$name = $args['name'];
$id = 'js'.$name;
if (isset($args['id'])) {
$id = $args['id'];
}
$disabled = isset($args['disabled'])?'disabled':'';
$class = 'form-group';
if (isset($args['class'])) {
$class = $class.' '.$args['class'];
}
$type = 'text';
if (isset($args['type'])) {
$type = $args['type'];
}
$label = '';
if (!empty($args['label'])) {
$label = '';
}
$checked = $args['checked']?'checked':'';
return <<
$label
$tip
EOF;
}
public static function formSelect($args)
{
$id = 'js'.$args['name'];
if (isset($args['id'])) {
$id = $args['id'];
}
$class = 'custom-select';
if (isset($args['class'])) {
$class = $class.' '.$args['class'];
}
$html = '';
return $html;
}
public static function formSelectBlock($args)
{
$id = 'js'.$args['name'];
if (isset($args['id'])) {
$id = $args['id'];
}
$class = 'custom-select';
if (!empty($args['class'])) {
$class = $class.' '.$args['class'];
}
$html = '';
if (!empty($args['label'])) {
$html .= '';
}
$html .= '';
if (!empty($args['tip'])) {
$html .= ''.$args['tip'].'';
}
$html .= '
';
return $html;
}
public static function formInputHidden($args)
{
return '';
}
public static function alert($args)
{
$class = 'alert';
if (!empty($args['class'])) {
$class = $class.' '.$args['class'];
}
$text = $args['text'];
return <<$text
EOF;
}
}