1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
   | //--------------------------
// Recherche
//--------------------------
$form1->add
(
    array
    (
        "id"         => "tabContent1",
        "type"       => "Container",
        "active"     => false,
    )
);
$form1->add
(
    array
    (
        "id"         => "search",
        "type"       => "InputText",
        "label"      => "Critère de recherche",
        "value"      => (isset($order["search"])) ? $order["search"] : "",
        "help"       => helpEvent("gestcarteSearch"),
        "parent"     => "tabContent1",
    )
);
$form1->add
(
    array
    (
        "id"         => "enter",
        "type"       => "text",
        "label"      => "Touche entree",
        "value"      => "enter",
        "parent"     => "search",
		"config"     => array
        (
            "enter" => array("onkeypress" => "if (event.keyCode == 13)formAjax('search','gestcarteSearch','".urlRouteAjax("/gestcarte/1")."','".(isset($_MY->user->key) ? $_MY->user->key : 0)."')", "help" => helpData("iSearch")),
        ),
    )
);
$form1->add
(
    array
    (
        "type"       => "Icon",
        "value"      => "detail/erase",
        "params"     => array("div" => array("style" => "float:left;")),
        "parent"     => "search",
        "config"     => array
        (
            "detail" => array("onClick" => "formAjax('search','gestcarteSearch','".urlRouteAjax("/gestcarte/1")."','".(isset($_MY->user->key) ? $_MY->user->key : 0)."')", "help" => helpData("iSearch")),
			"erase"  => array("onClick" => "objValue('search','');formAjax('search','gestcarteSearch','".urlRouteAjax("/gestcarte/1")."','".(isset($_MY->user->key) ? $_MY->user->key : 0)."')", "help" => helpData("iErase")),
        ),
    )
);
$form1->add
(
    array
    (
        "id"         => "gestcarteSearch",
        "type"       => "Container",
        "value"      => formView("/gestcarte/1"),
        "format"     => false,
        "parent"     => "tabContent1",
    )
); | 
Partager