17 include_once (
"FDL/popupdocdetail.php");
18 include_once (
"FDL/popupfamdetail.php");
22 $docid = GetHttpVars(
"id");
23 $zonebodycard = GetHttpVars(
"zone");
24 $rzone = GetHttpVars(
"rzone");
25 $rvid = GetHttpVars(
"rvid");
26 $usefor = GetHttpVars(
"usefor");
27 $rtarget = GetHttpVars(
"rtarget",
"_self");
28 $classid = GetHttpVars(
"classid",
getDefFam($action));
29 $action->lay->
Set(
"SELFTARGET", ($rtarget ==
"_self"));
32 $action->lay->eSet(
"id",
$docid);
34 $action->lay->
Set(
"editaction", _(
"Create"));
35 if ($usefor ==
"D") $action->lay->eSet(
"editaction", _(
"Save default values"));
36 if ($usefor ==
"Q") $action->lay->eSet(
"editaction", _(
"Save parameters"));
40 $action->lay->eSet(
"editaction", _(
"Save"));
41 $action->lay->
Set(
"id",
$doc->id);
44 if ($zonebodycard ==
"") {
45 if ((!
$docid) &&
$doc->defaultcreate !=
"") $zonebodycard =
$doc->defaultcreate;
46 else $zonebodycard =
$doc->defaultedit;
49 if ((!
$docid) && (($usefor ==
"Q") || ($usefor ==
"D"))) $action->lay->eset(
"id", $classid);
50 $action->lay->
Set(
"boverdisplay",
"none");
51 $action->lay->
Set(
"INPUTCONSTRAINT",
false);
52 $action->lay->eSet(
"rzone", $rzone);
53 $action->lay->eSet(
"rvid", $rvid);
54 $action->lay->
Set(
"admin", ($action->user->id == 1));
55 $action->lay->
Set(
"NOSAVE", (preg_match(
"/[A-Z]+:[^:]+:V/", $zonebodycard, $reg)));
56 if (GetHttpVars(
"viewconstraint") ==
"Y") {
57 $action->lay->
Set(
"bconsdisplay",
"");
58 if ($action->user->id == 1) {
59 $action->lay->
Set(
"INPUTCONSTRAINT",
true);
60 $action->lay->
Set(
"boverdisplay",
"");
65 $action->lay->
Set(
"bconsdisplay",
"none");
79 $listattr =
$doc->GetActionAttributes();
80 foreach ($listattr as $k => $v) {
81 if (($v->mvisibility !=
"H") && ($v->mvisibility !=
"R")) {
83 if ($v->precond !=
"") $mvis =
$doc->ApplyMethod($v->precond,
MENU_ACTIVE);
86 "wadesc" => htmlspecialchars($v->getOption(
"llabel") , ENT_QUOTES) ,
87 "walabel" => htmlspecialchars(ucfirst($v->getLabel()) , ENT_QUOTES) ,
88 "waction" => htmlspecialchars($v->waction, ENT_QUOTES) ,
89 "wtarget" => htmlspecialchars($v->id, ENT_QUOTES) ,
90 "wapplication" => htmlspecialchars($v->wapplication, ENT_QUOTES)
96 $action->lay->setBlockData(
"WACTION", $taction);
getDefFam(Action &$action)
createDoc($dbaccess, $fromid, $control=true, $defaultvalues=true, $temporary=false)
new_Doc($dbaccess, $id= '', $latest=false)