当前位置: 首页>>代码示例>>PHP>>正文


PHP Html::multiColForm方法代码示例

本文整理汇总了PHP中Html::multiColForm方法的典型用法代码示例。如果您正苦于以下问题:PHP Html::multiColForm方法的具体用法?PHP Html::multiColForm怎么用?PHP Html::multiColForm使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Html的用法示例。


在下文中一共展示了Html::multiColForm方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: edit_GET

function edit_GET(Web $w)
{
    $w->Admin->navigation($w, "Templates");
    $p = $w->pathMatch("id");
    $t = $w->Template->getTemplate($p['id']);
    $t = $t ? $t : new Template($w);
    $newForm = array();
    $newForm["Template Details"] = array(array(array("Title", "text", "title", $t->title), array("Active", "checkbox", "is_active", $t->is_active)), array(array("Module", "text", "module", $t->module), array("Category", "text", "category", $t->category)));
    $newForm['Description'] = array(array(array("", "textarea", "description", $t->description)));
    $w->ctx("editdetailsform", Html::multiColForm($newForm, $w->localUrl('/admin-templates/edit/' . $t->id)));
    $newForm = array();
    $newForm["Template Title"] = array(array(array("", "textarea", "template_title", $t->template_title, 100, 1, false)));
    $newForm["Template Body"] = array(array(array("", "textarea", "template_body", $t->template_body, 60, 100, "codemirror")));
    $w->ctx("templateform", Html::multiColForm($newForm, $w->localUrl('/admin-templates/edit/' . $t->id)));
    $newForm = array();
    $newForm["Title Data"] = array(array(array("", "textarea", "test_title_json", $t->test_title_json, 100, 5, false)));
    $newForm["Body Data"] = array(array(array("", "textarea", "test_body_json", $t->test_body_json, 100, 20, false)));
    $w->ctx("testdataform", Html::multiColForm($newForm, $w->localUrl('/admin-templates/edit/' . $t->id)));
    $w->ctx("id", $p['id']);
    //        try {
    //            $w->ctx("testtitle",$t->testTitle());
    //            $w->ctx("testbody",$t->testBody());
    //        } catch (Exception $e) {
    //            $w->ctx("testbody", "Error: Couldn't not render Twig template.<br/>Error Message: " . $e->getMessage());
    //        }
}
开发者ID:itillawarra,项目名称:cmfive,代码行数:26,代码来源:edit.php

示例2: addcategory_GET

function addcategory_GET(Web $w)
{
    list($parent_id) = $w->pathMatch("a");
    $parent = $w->Bend->getWorkCategoryForId($parent_id);
    $form = array("Category" => array(array(array("Title", "text", "title", "")), array(array("Description", "text", "description", ""))));
    $w->out(Html::multiColForm($form, "/bend-workhours/addcategory/{$parent_id}", "POST", "Save"));
}
开发者ID:careck,项目名称:bendms,代码行数:7,代码来源:addcategory.php

示例3: edit_GET

function edit_GET(Web $w)
{
    $p = $w->pathMatch("report_id", "id");
    $report_template = !empty($p['id']) ? $w->Report->getReportTemplate($p['id']) : new ReportTemplate($w);
    $form = array("Add Report Template" => array(array(array("Template", "select", "template_id", $report_template->template_id, $w->Template->findTemplates("report"))), array(array("Type", "select", "type", $report_template->type, $report_template->getReportTypes())), array(array("Report ID", "hidden", "report_id", $p['report_id']))));
    $w->out(Html::multiColForm($form, "/report-templates/edit/{$report_template->id}"));
}
开发者ID:itillawarra,项目名称:cmfive,代码行数:7,代码来源:edit.php

示例4: editsettings_GET

function editsettings_GET(Web $w)
{
    $w->setLayout(null);
    $p = $w->pathMatch("id");
    $id = $p["id"];
    if (!$id) {
        $w->error("Missing parameter in request", "/channels/listprocessors");
    }
    $processor = $w->Channel->getProcessor($id);
    if (empty($processor->id)) {
        $w->error("Invalid processor ID", "/channels/listprocessors");
    }
    // Instantiate processor
    $class = new $processor->class($w);
    if (method_exists($class, "getSettingsForm")) {
        // Call getSettingsForm
        $form = $class->getSettingsForm($processor->settings, $w);
        if (!empty($form)) {
            $w->out(Html::multiColForm($form, "/channels-processor/editsettings/{$processor->id}"));
        } else {
            $w->error("Form implementation is empty", "/channels/listprocessors");
        }
    } else {
        $w->error("Generic form settings function is missing", "/channels/listprocessors");
    }
}
开发者ID:itillawarra,项目名称:cmfive,代码行数:26,代码来源:editsettings.php

示例5: groupedit_GET

/**
* Display edit group dialog
*
* @param <type> $w
*/
function groupedit_GET(Web $w)
{
    $option = $w->pathMatch("group_id");
    $user = $w->Auth->getUser($option['group_id']);
    $template['Edit Group'] = array(array(array("Group Title: ", "text", "title", $user->login)));
    $w->out(Html::multiColForm($template, "/admin/groupedit/" . $option['group_id'], "POST", "Save"));
    $w->setLayout(null);
}
开发者ID:itillawarra,项目名称:cmfive,代码行数:13,代码来源:groupedit.php

示例6: printfile_GET

function printfile_GET(Web $w)
{
    if (empty($_GET["filename"])) {
        $w->out("No filename specified");
    }
    $form = array("Print to" => array(array(array("Printer", "select", "printer_id", null, $w->Printer->getPrinters(), "null")), array(array("Filename", "hidden", "file", $_GET["filename"]))));
    $w->out(Html::multiColForm($form, "/admin/printfile", "POST", "Print", null, null, null, "_self", true, array("printer_id")));
}
开发者ID:itillawarra,项目名称:cmfive,代码行数:8,代码来源:printfile.php

示例7: editprinter_GET

function editprinter_GET(Web $w)
{
    $p = $w->pathMatch("id");
    $printer = new Printer($w);
    if (!empty($p["id"])) {
        $printer = $w->Printer->getPrinter($p["id"]);
    }
    $form = array("Details" => array(array(array("Printer name", "text", "name", $printer->name)), array(array("Server", "text", "server", $printer->server)), array(array("Port", "text", "port", $printer->port))));
    $w->out(Html::multiColForm($form, "/admin/editprinter/{$p['id']}"));
}
开发者ID:itillawarra,项目名称:cmfive,代码行数:10,代码来源:editprinter.php

示例8: editlot_GET

function editlot_GET(Web $w)
{
    list($id) = $w->pathMatch("id");
    $lot = new BendLot($w);
    if (!empty($id)) {
        $lot = $w->Bend->getLotForId($id);
    }
    $form = array("Lot" => array(array(array("Lot Number", "text", "lot_number", $lot->lot_number)), array(array("Occupancy", "select", "occupancy", $lot->occupancy, array("single", "dual")))));
    $w->out(Html::multiColForm($form, "/bend-lot/editlot/{$id}", "POST", "Save"));
}
开发者ID:careck,项目名称:bendms,代码行数:10,代码来源:editlot.php

示例9: editcategory_GET

function editcategory_GET(Web $w)
{
    list($id) = $w->pathMatch("a");
    $cat = $w->Bend->getWorkCategoryForId($id);
    if (empty($cat)) {
        $w->error("no category found", "/bend-workhours/admin");
    }
    $form = array("Category" => array(array(array("Title", "text", "title", $cat->title)), array(array("Description", "text", "description", $cat->description))));
    $w->out(Html::multiColForm($form, "/bend-workhours/editcategory/{$id}", "POST", "Save"));
}
开发者ID:careck,项目名称:bendms,代码行数:10,代码来源:editcategory.php

示例10: editperiod_GET

function editperiod_GET(Web $w)
{
    list($periodid) = $w->pathMatch("a");
    $period = new BendWorkPeriod($w);
    if (!empty($periodid)) {
        $period = $w->Bend->getWorkPeriodForId($periodid);
    }
    $form["Work Period"] = array(array(array("Date From", "date", "d_start", !empty($period->d_start) ? formatDate($period->d_start) : ""), array("Date To", "date", "d_end", !empty($period->d_end) ? formatDate($period->d_end) : "")), array(array("Monthly Person Hours", "text", "monthly_person_hours", $period->monthly_person_hours), array("Is Closed?", "select", "is_closed", $period->is_closed, booleanNoYesForSelect())));
    $w->setLayout(null);
    $w->out(Html::multiColForm($form, "/bend-workhours/editperiod/{$periodid}", "POST", "Save"));
}
开发者ID:careck,项目名称:bendms,代码行数:11,代码来源:editperiod.php

示例11: edit_GET

function edit_GET(Web $w)
{
    $p = $w->pathMatch("id");
    $processor_id = $p["id"];
    $w->Channels->navigation($w, $processor_id ? "Edit" : "Add" . " a Processor");
    // Get channel and form
    $processor = $processor_id ? $w->Channel->getProcessor($processor_id) : new ChannelProcessor($w);
    $processor_list = $w->Channel->getProcessorList();
    $form = array("Processor" => array(array(array("Name", "text", "name", $processor->name)), array(array("Channel", "select", "channel_id", $processor->channel_id, $w->Channel->getChannels())), array(array("Processor Class", "select", "processor_class", $processor->module . '.' . $processor->class, $processor_list))));
    $w->out(Html::multiColForm($form, "/channels-processor/edit/{$processor_id}", "POST", "Save"));
}
开发者ID:itillawarra,项目名称:cmfive,代码行数:11,代码来源:edit.php

示例12: addwidget_GET

function addwidget_GET(Web $w)
{
    $p = $w->pathMatch("module");
    $module = $p["module"];
    $modulelist = $w->modules();
    $modules = array_filter($modulelist, function ($module) use(&$w) {
        $names = $w->Widget->getWidgetNamesForModule($module);
        return !empty($names);
    });
    $form = array("Add a widget" => array(array(array("Source module", "select", "source_module", null, $modules)), array(array("Widget Name", "select", "widget_name", null, array()))));
    $w->ctx("widgetform", Html::multiColForm($form, "/main/addwidget/{$module}", "POST", "Add"));
}
开发者ID:itillawarra,项目名称:cmfive,代码行数:12,代码来源:addwidget.php

示例13: editworkentry_GET

function editworkentry_GET(Web $w)
{
    list($workentry_id) = $w->pathMatch("id");
    if (empty($workentry_id)) {
        $w->error("Missing an ID");
    }
    $workentry = $w->Bend->getWorkEntryForId($workentry_id);
    if (empty($workentry)) {
        $w->error("No work entry found for this id: " . $workentry_id);
    }
    $category = $workentry->getWorkCategory();
    list($category_1, $category_2, $category_3) = $category->getPath();
    $form["Work Hours"] = array(array($w->Auth->hasRole("bend_admin") ? array("Who did the work?", "select", "user_id", $workentry->user_id, $w->Bend->getOccupantUsers()) : array("Who did the work?", "static", "", $w->Auth->getUser($workentry->user_id)->getFullName()), array("Who to credit to", "select", "attributed_user_id", $workentry->attributed_user_id, $w->Bend->getOccupantUsers()), array("Date", "date", "d_date", formatDate($workentry->d_date)), array("Hours", "text", "hours", $workentry->hours)), array(array("Focus Group", "select", "category_1", defaultVal($category_1->id), $w->Bend->getTopLevelWorkCategories()), array("Team or Activity", "select", "category_2", defaultVal($category_2->id), !empty($category_1) ? $category_1->getChildren() : null), array("Activity", "select", "category_3", defaultVal($category_3->id), !empty($category_2) ? $category_2->getChildren() : null)), array(array("Description", "text", "description", $workentry->description)));
    $w->ctx("form", Html::multiColForm($form, "/bend-workhours/editworkentry/{$workentry_id}", "POST", "Save"));
}
开发者ID:careck,项目名称:bendms,代码行数:15,代码来源:editworkentry.php

示例14: edit_GET

function edit_GET(Web $w)
{
    list($lotId, $householdid) = $w->pathMatch("lotId", "householdid");
    if (empty($lotId)) {
        $w->out("no lot id provided");
        return;
    }
    $lot = $w->Bend->getLotForId($lotId);
    $household = new BendHousehold($w);
    if (!empty($householdid)) {
        $household = $w->Bend->getHouseholdForId($householdid);
    }
    $form["Lot"] = array(array(array("Lot Number", "static", "", $lot->lot_number), array("Occupancy", "static", "", $lot->occupancy)));
    $form["Household"] = array(array(array("Streetnumber", "text", "streetnumber", $household->streetnumber), array("Is CHL", "select", "is_chl", $household->is_chl, lookupForSelect($w, "YesNo")), array("Is Occupied", "select", "is_occupied", $household->is_occupied, lookupForSelect($w, "YesNo")), array("Number of Occupants", "text", "num_occupants", $household->num_occupants)));
    $w->setLayout(null);
    $w->out(Html::multiColForm($form, "/bend-household/edit/{$lotId}/{$household->id}", "POST", "Save"));
}
开发者ID:careck,项目名称:bendms,代码行数:17,代码来源:edit.php

示例15: groupmember_GET

/**
* Add new members to a group
*
* @param <type> $w
*/
function groupmember_GET(Web $w)
{
    $option = $w->pathMatch("group_id");
    $users = $w->Auth->getUsersAndGroups();
    foreach ($users as $user) {
        $name = $user->is_group == 1 ? strtoupper($user->login) : $user->getContact()->getFullName();
        $select[$user->is_group][$name] = array($name, $user->id);
    }
    ksort($select[0]);
    ksort($select[1]);
    $template['New Member'] = array(array(array("Select Member: ", "select", "member_id", null, array_merge($select[0], $select[1]))));
    if ($w->Auth->user()->is_admin) {
        $template['New Member'][0][] = array("Owner", "checkbox", "is_owner");
    }
    $w->out(Html::multiColForm($template, "/admin/groupmember/" . $option['group_id'], "POST", "Save"));
    $w->setLayout(null);
}
开发者ID:itillawarra,项目名称:cmfive,代码行数:22,代码来源:groupmember.php


注:本文中的Html::multiColForm方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。