forked from ZwiiCMS-Team/ZwiiCMS
initial
This commit is contained in:
parent
13660bc895
commit
879e9c1c55
@ -31,12 +31,14 @@ class form extends common {
|
|||||||
const TYPE_SELECT = 'select';
|
const TYPE_SELECT = 'select';
|
||||||
const TYPE_TEXT = 'text';
|
const TYPE_TEXT = 'text';
|
||||||
const TYPE_TEXTAREA = 'textarea';
|
const TYPE_TEXTAREA = 'textarea';
|
||||||
|
const TYPE_DATETIME = "date";
|
||||||
|
|
||||||
public static $types = [
|
public static $types = [
|
||||||
self::TYPE_TEXT => 'Champ texte',
|
self::TYPE_TEXT => 'Champ texte',
|
||||||
self::TYPE_TEXTAREA => 'Grand champ texte',
|
self::TYPE_TEXTAREA => 'Grand champ texte',
|
||||||
self::TYPE_MAIL => 'Champ mail',
|
self::TYPE_MAIL => 'Champ mail',
|
||||||
self::TYPE_SELECT => 'Sélection'
|
self::TYPE_SELECT => 'Sélection',
|
||||||
|
self::TYPE_DATETIME => 'Sélection date'
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -88,7 +90,8 @@ class form extends common {
|
|||||||
$this->addOutput([
|
$this->addOutput([
|
||||||
'title' => 'Configuration du module',
|
'title' => 'Configuration du module',
|
||||||
'vendor' => [
|
'vendor' => [
|
||||||
'html-sortable'
|
'html-sortable',
|
||||||
|
'flatpickr'
|
||||||
],
|
],
|
||||||
'view' => 'config'
|
'view' => 'config'
|
||||||
]);
|
]);
|
||||||
@ -178,6 +181,9 @@ class form extends common {
|
|||||||
case self::TYPE_TEXTAREA:
|
case self::TYPE_TEXTAREA:
|
||||||
$filter = helper::FILTER_STRING_LONG;
|
$filter = helper::FILTER_STRING_LONG;
|
||||||
break;
|
break;
|
||||||
|
case self::TYPE_DATE:
|
||||||
|
$filter = helper::FILTER_DATETIME;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
$filter = helper::FILTER_STRING_SHORT;
|
$filter = helper::FILTER_STRING_SHORT;
|
||||||
}
|
}
|
||||||
@ -230,7 +236,7 @@ class form extends common {
|
|||||||
$this->addOutput([
|
$this->addOutput([
|
||||||
'showBarEditButton' => true,
|
'showBarEditButton' => true,
|
||||||
'showPageContent' => true,
|
'showPageContent' => true,
|
||||||
'view' => 'index'
|
'view' => 'index',
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,6 +27,13 @@
|
|||||||
'id' => 'formInput_' . $index,
|
'id' => 'formInput_' . $index,
|
||||||
'label' => $input['name']
|
'label' => $input['name']
|
||||||
]); ?>
|
]); ?>
|
||||||
|
<?php elseif($input['type'] === $module::TYPE_DATETIME): ?>
|
||||||
|
<?php echo template::date('formInput[' . $index . ']', [
|
||||||
|
'id' => 'formInput_' . $index,
|
||||||
|
'label' => $input['name'],
|
||||||
|
'value' => time(),
|
||||||
|
'vendor' => 'flatpickr'
|
||||||
|
]); ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
<?php if($this->getData(['module', $this->getUrl(0), 'config', 'capcha'])): ?>
|
<?php if($this->getData(['module', $this->getUrl(0), 'config', 'capcha'])): ?>
|
||||||
|
Loading…
Reference in New Issue
Block a user