* TODO create function split version 3.

This commit is contained in:
lanzongjun
2023-04-26 19:38:45 +08:00
parent 026fdb0cee
commit ee42cade43
3 changed files with 18 additions and 20 deletions
+1 -3
View File
@@ -41,6 +41,4 @@ $config->todo->objectList = array();
$config->todo->objectList['bug'] = 'bugs';
$config->todo->objectList['task'] = 'tasks';
$config->todo->objectList['story'] = 'stories';
$config->todo->objectList['testtask'] = 'testtasks';
include 'config/form.php';
$config->todo->objectList['testtask'] = 'testtasks';
+16 -16
View File
@@ -1,20 +1,20 @@
<?php
declare(strict_types=1);
$config->todo->createform = array();
$config->todo->createform['type'] = array('required' => true, 'type' => 'string');
$config->todo->createform['name'] = array('required' => true, 'type' => 'string');
$config->todo->createform['status'] = array('required' => true, 'type' => 'string');
$config->todo->createform['pri'] = array('required' => true, 'type' => 'int');
$config->todo->create->form = array();
$config->todo->create->form['type'] = array('required' => true, 'type' => 'string');
$config->todo->create->form['name'] = array('required' => true, 'type' => 'string');
$config->todo->create->form['status'] = array('required' => true, 'type' => 'string');
$config->todo->create->form['pri'] = array('required' => true, 'type' => 'int');
$config->todo->createform['date'] = array('required' => false, 'type' => 'string', 'default' => helper::today());
$config->todo->createform['begin'] = array('required' => false, 'type' => 'int', 'default' => 2400);
$config->todo->createform['end'] = array('required' => false, 'type' => 'int', 'default' => 2400);
$config->todo->createform['private'] = array('required' => false, 'type' => 'int', 'default' => 0);
$config->todo->createform['assignedDate'] = array('required' => false, 'type' => 'string', 'default' => helper::now());
$config->todo->createform['assignedTo'] = array('required' => false, 'type' => 'string', 'default' => '');
$config->todo->createform['assignedBy'] = array('required' => false, 'type' => 'string', 'default' => '');
$config->todo->createform['vision'] = array('required' => false, 'type' => 'string', 'default' => $this->config->vision);
$config->todo->createform['idvalue'] = array('required' => false, 'type' => 'int', 'default' => 0);
$config->todo->createform['desc'] = array('required' => false, 'type' => 'string', 'default' => '');
$config->todo->createform['uid'] = array('required' => false, 'type' => 'string', 'default' => '');
$config->todo->create->form['date'] = array('required' => false, 'type' => 'string', 'default' => helper::today());
$config->todo->create->form['begin'] = array('required' => false, 'type' => 'int', 'default' => 2400);
$config->todo->create->form['end'] = array('required' => false, 'type' => 'int', 'default' => 2400);
$config->todo->create->form['private'] = array('required' => false, 'type' => 'int', 'default' => 0);
$config->todo->create->form['assignedDate'] = array('required' => false, 'type' => 'string', 'default' => helper::now());
$config->todo->create->form['assignedTo'] = array('required' => false, 'type' => 'string', 'default' => '');
$config->todo->create->form['assignedBy'] = array('required' => false, 'type' => 'string', 'default' => '');
$config->todo->create->form['vision'] = array('required' => false, 'type' => 'string', 'default' => $this->config->vision);
$config->todo->create->form['idvalue'] = array('required' => false, 'type' => 'int', 'default' => 0);
$config->todo->create->form['desc'] = array('required' => false, 'type' => 'string', 'default' => '');
$config->todo->create->form['uid'] = array('required' => false, 'type' => 'string', 'default' => '');
+1 -1
View File
@@ -41,7 +41,7 @@ class todo extends control
if(!empty($_POST))
{
$formData = form::data($this->config->todo->createform);
$formData = form::data($this->config->todo->create->form);
$todo = $this->todoZen->beforeCreate($formData);
$todoID = $this->todoZen->doCreate($todo);