本文整理汇总了PHP中task::load_form_data方法的典型用法代码示例。如果您正苦于以下问题:PHP task::load_form_data方法的具体用法?PHP task::load_form_data怎么用?PHP task::load_form_data使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类task
的用法示例。
在下文中一共展示了task::load_form_data方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: render
function render()
{
global $TPL;
$defaults = array("showHeader" => true, "showTaskID" => true, "taskView" => "prioritised", "showStatus" => "true", "url_form_action" => $TPL["url_alloc_home"], "form_name" => "taskListHome_filter");
$current_user =& singleton("current_user");
if (!$current_user->prefs["taskListHome_filter"]) {
$defaults["taskStatus"] = "open";
$defaults["personID"] = $current_user->get_id();
$defaults["showStatus"] = true;
$defaults["showProject"] = true;
$defaults["limit"] = 10;
$defaults["applyFilter"] = true;
}
$_FORM = task::load_form_data($defaults);
$TPL["taskListRows"] = task::get_list($_FORM);
$TPL["_FORM"] = $_FORM;
return true;
}
示例2: show_projects
function show_projects($template_name)
{
global $TPL;
global $default;
$_FORM = task::load_form_data($defaults);
$arr = task::load_task_filter($_FORM);
is_array($arr) and $TPL = array_merge($TPL, $arr);
if (is_array($_FORM["projectID"])) {
$projectIDs = $_FORM["projectID"];
foreach ($projectIDs as $projectID) {
$project = new project();
$project->set_id($projectID);
$project->select();
$_FORM["projectID"] = array($projectID);
$TPL["graphTitle"] = urlencode($project->get_value("projectName"));
$arr = task::load_task_filter($_FORM);
is_array($arr) and $TPL = array_merge($TPL, $arr);
include_template($template_name);
}
}
}
示例3: array
* the Free Software Foundation, either version 3 of the License, or (at
* your option) any later version.
*
* allocPSA is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
* License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with allocPSA. If not, see <http://www.gnu.org/licenses/>.
*/
require_once "../alloc.php";
$TPL["main_alloc_title"] = "Task List - " . APPLICATION_NAME;
$defaults = array("showHeader" => true, "showTaskID" => true, "showEdit" => true, "taskView" => "byProject", "showStatus" => "true", "showTotals" => "true", "padding" => 1, "url_form_action" => $TPL["url_alloc_taskList"], "form_name" => "taskList_filter");
// Load task list
$_FORM = task::load_form_data($defaults);
$TPL["taskListRows"] = task::get_list($_FORM);
$TPL["_FORM"] = $_FORM;
// Load filter
$arr = task::load_task_filter($_FORM);
is_array($arr) and $TPL = array_merge($TPL, $arr);
// Check for updates
if ($_POST["mass_update"]) {
if ($_POST["select"]) {
$allowed_auto_fields = array("dateTargetStart", "dateTargetCompletion", "dateActualStart", "dateActualCompletion", "managerID", "timeLimit", "timeBest", "timeWorst", "timeExpected", "priority", "taskTypeID", "taskStatus", "personID");
foreach ($_POST["select"] as $taskID => $selected) {
$task = new task();
$task->set_id($taskID);
$task->select();
// Special case: projectID and parentTaskID have to be done together
if ($_POST["update_action"] == "projectIDAndParentTaskID") {