17 include_once (
"FDL/Class.Doc.php");
18 include_once (
"FDL/Class.DocAttr.php");
20 include_once (
"FDL/freedom_util.php");
21 include_once (
"FDL/editutil.php");
30 $frameid = strtolower($action->
getArgument(
"frameid"));
40 if (($vid !=
"") && (
$doc->cvid > 0)) {
46 $tview = $cvdoc->getView($vid);
47 if ($tview)
$doc->setMask($tview[
"CV_MSKID"]);
50 $listattr =
$doc->GetNormalAttributes();
52 if ($action->
getArgument(
"viewconstraint") ==
"Y") {
53 include_once (
"FDL/modcard.php");
58 $help =
$doc->getHelpPage();
63 $foa =
$doc->getAttribute($frameid);
64 if (!$foa) $action->
exitError(sprintf(
"attribute %s not found", $frameid));
65 if ($foa->getOption(
"vlabel") ==
"none") $action->lay->set(
"flabel",
'');
66 else $action->lay->set(
"flabel",
mb_ucfirst($foa->getLabel()));
67 $action->lay->set(
"frameid", $foa->id);
69 foreach ($listattr as $k => $v) {
73 if (($v->fieldSet->id != $frameid))
continue;
74 if ($v->inArray())
continue;
75 if ($v->mvisibility ==
"I")
continue;
76 $action->lay->set(
"ehelp", ($help->isAlive()) ? $help->getAttributeHelpUrl($v->fieldSet->id) :
false);
77 $action->lay->set(
"ehelpid", ($help->isAlive()) ? $help->id :
false);
85 if (($v->mvisibility ==
"H") || ($v->mvisibility ==
"R")) {
91 $tval[$k][
"alabel"] = $v->getLabel();
92 if ($v->needed) $tval[$k][
"labelclass"] =
"FREEDOMLabelNeeded";
93 else $tval[$k][
"labelclass"] =
"FREEDOMLabel";
96 $vlabel = $v->getOption(
"vlabel");
97 $tval[$k][
"winput"] = ($v->type ==
"array") ?
"1%" :
"30%";
98 $tval[$k][
"TESTARRAY"] = (($v->type ==
"array") || (($v->type ==
"htmltext") && ($vlabel !=
'left')) || ($vlabel ==
'up') || ($vlabel ==
'none'));
99 $tval[$k][
"viewlabel"] = (($v->type !=
"array") && ($vlabel !=
'none'));
100 $tval[$k][
"aehelp"] = ($help->isAlive()) ? $help->getAttributeHelpUrl($v->id) :
false;
101 $tval[$k][
"aehelpid"] = ($help->isAlive()) ? $help->id :
false;
104 $action->lay->setBlockData(
"FVALUES", $tval);
105 $action->lay->setBlockData(
"FHIDDENS", $thval);
106 if ((count($tval) + count($thval)) > 0) {
108 $action->lay->setBlockData(
"FRAME", array(
setPostVars(Doc &$doc, &$info=array())
exitError($texterr, $exit=true, $code="")
getHtmlInput(&$doc, &$oattr, $value, $index="", $jsevent="", $notd=false)
createDoc($dbaccess, $fromid, $control=true, $defaultvalues=true, $temporary=false)
new_Doc($dbaccess, $id= '', $latest=false)
static getArgument($k, $def= '')