$oAssocGroups = new RecipientGroupMemberCollection(); $oAssocGroups->link("RecipientGroupCollection"); $oAssocGroups->setWhere("recipientgroupmembercollection.idnewsrcp", $recipient->get("idnewsrcp")); $oAssocGroups->setOrder("recipientgroupcollection.groupname"); $oAssocGroups->query(); if ($oAssocGroups->count() == 0) { $oGroupList->setCell(0, 1, i18n("Recipient is not member of any group", $plugin_name)); } else { // Headline $oGroupList->setCell(0, 1, "<strong>" . i18n("Groupname", $plugin_name) . "</strong>"); $oImgDel = new cHTMLImage("images/delete.gif"); $oGroupList->setCell(0, 2, $oImgDel->render()); $oGroupList->setCellAlignment(0, 2, "right"); // Data while ($oAssocGroup = $oAssocGroups->next()) { $oGroup = $oAssocGroups->fetchObject("RecipientGroupCollection"); $oCkbRemove = new cHTMLCheckbox("ckbRemove[]", $oAssocGroup->get("idnewsgroupmember")); echo $oGroup->get("idnewsgroupmember"); $oGroupList->setCell($oAssocGroup->get("idnewsgroupmember"), 1, $oGroup->get("groupname")); $oGroupList->setCell($oAssocGroup->get("idnewsgroupmember"), 2, $oCkbRemove->toHTML(false)); $oGroupList->setCellAlignment($oAssocGroup->get("idnewsgroupmember"), 2, "right"); } } $oForm->add(i18n("Associated Groups", $plugin_name), $oGroupList->render()); $oForm->add(i18n("Author", $plugin_name), $classuser->getUserName($recipient->get("author")) . " (" . $recipient->get("created") . ")"); $oForm->add(i18n("Last modified by", $plugin_name), $classuser->getUserName($recipient->get("modifiedby")) . " (" . $recipient->get("lastmodified") . ")"); $oPage->setContent($sNotis . $oForm->render(true)); } else { $oPage->setContent($sNotis . ""); } $oPage->render();
$sSendToInfo .= "<br />" . $sGroup; } break; case "single": $sSendToInfo = i18n("Send newsletter to single recipient:", $plugin_name); $sSendToInfo .= "<br />" . $aSendTo[1] . " (" . $aSendTo[2] . ")"; break; default: } unset($aSendTo); $oForm->add(i18n("Recipients", $plugin_name), $sSendToInfo); if ($oJob->get("use_cronjob") == 1) { $sOptionsInfo = i18n("Use cronjob: Enabled", $plugin_name); } else { $sOptionsInfo = i18n("Use cronjob: Not enabled", $plugin_name); } if ($oJob->get("dispatch")) { $sOptionsInfo .= "<br />" . sprintf(i18n("Dispatch: Enabled (block size: %s, delay: %s sec.)", $plugin_name), $oJob->get("dispatch_count"), $oJob->get("dispatch_delay")); } else { $sOptionsInfo .= "<br />" . i18n("Dispatch: Disabled", $plugin_name); } $oForm->add(i18n("Options", $plugin_name), $sOptionsInfo); $oForm->add(i18n("Author", $plugin_name), $oJob->get("authorname")); $oForm->add(i18n("Created", $plugin_name), $oJob->get("created")); // Just remove the "save changes" message (as it is not possible to remove the image completely in ui_table_form) $oForm->setActionButton("submit", $cfg['path']['contenido_fullhtml'] . "images/but_ok.gif", "", "s"); $oPage->setContent($oForm->render(true)); } } } $oPage->render();
$idworkflow = $_GET['idworkflow']; } if ($idworkflow) { $sReloadScript = "<script type=\"text/javascript\">\n var left_bottom = top.content.frames['left'].frames['left_bottom'];\n var right_top = top.content.frames['right'].frames['right_top'];\n if (left_bottom) {\n var href = left_bottom.location.href;\n href = href.replace(/&action=workflow_delete/, '');\n left_bottom.location.href = href+'&idworkflow='+" . $idworkflow . ";\n }\n \n if (right_top) {\n right_top.location.href = right_top.location.href+'&idworkflow='+" . $idworkflow . ";\n }\n </script>"; } else { $sReloadScript = ''; } //function formGenerateField ($type, $name, $initvalue, $width, $maxlen) $form->setVar("area", $area); $form->setVar("action", "workflow_save"); $form->setVar("idworkflow", $idworkflow); $form->setVar("frame", $frame); if ($workflow->virgin) { $name = i18n("New Workflow", "workflow"); $header = i18n("Create new workflow", "workflow"); } else { $header = i18n("Edit workflow", "workflow"); $description = $workflow->get("description"); $name = $workflow->get("name"); $created = $workflow->get("created"); $author = $userclass->getRealname($workflow->get("idauthor")); } $form->addHeader($header); $form->add(i18n("Workflow name", "workflow"), formGenerateField("text", "wfname", $name, 40, 255)); $form->add(i18n("Description", "workflow"), formGenerateField("textbox", "wfdescription", $description, 50, 10)); $form->add(i18n("Author", "workflow"), $author); $form->add(i18n("Created", "workflow"), $created); $page = new UI_Page(); $page->setContent($form->render(true)); $page->addScript('reload', $sReloadScript); $page->render();
function editWorkflowStep($idworkflowitem) { global $area, $idworkflow, $idworkflowitem, $frame, $availableWorkflowActions; global $notification; $workflowitem = new WorkflowItem(); if ($workflowitem->loadByPrimaryKey($idworkflowitem) == false) { return " "; } $workflowactions = new WorkflowActions(); $stepname = $workflowitem->get("name"); $stepdescription = $workflowitem->get("description"); $id = $workflowitem->get("idworkflowitem"); $task = $workflowitem->get("idtask"); $form = new UI_Table_Form("workflow_edit"); $form->setVar("area", $area); $form->setVar("action", "workflow_save_step"); $form->setVar("idworkflow", $idworkflow); $form->setVar("idworkflowitem", $idworkflowitem); $form->setVar("frame", $frame); $form->addHeader(i18n("Edit workflow step", "workflow")); $form->add(i18n("Step name", "workflow"), formGenerateField("text", "wfstepname", $stepname, 40, 255)); $form->add(i18n("Step description", "workflow"), formGenerateField("textbox", "wfstepdescription", $stepdescription, 60, 10)); foreach ($availableWorkflowActions as $key => $value) { $actions .= formGenerateCheckbox("wfactions[" . $key . "]", "1", $workflowactions->get($id, $key)) . '<label for="wfactions[' . $key . ']1">' . $value . '</label>' . "<br>"; } $form->add(i18n("Actions", "workflow"), $actions); $form->add(i18n("Assigned users", "workflow"), getWorkflowUsers($idworkflowitem)); return $form->render(true); }
$oForm->setVar("frame", $frame); $oForm->setVar("area", $area); $oForm->setVar("action", "recipients_import_exec"); $oForm->addHeader(i18n("Import recipients", $plugin_name)); $oSelDelimiter = new cHTMLSelectElement("selDelimiter"); $aItems = array(); $aItems[] = array("semicolon", i18n("Semicolon", $plugin_name)); $aItems[] = array("tab", i18n("Tab", $plugin_name)); $oSelDelimiter->autoFill($aItems); $oSelDelimiter->setDefault($_REQUEST["selDelimiter"]); $oForm->add(i18n("Delimiter", $plugin_name), $oSelDelimiter->render()); $oAreaData = new cHTMLTextarea("txtData", $_REQUEST["txtData"], 80, 20); $sInfo = '<a href="javascript:fncShowHide(\'idInfoText\');"><strong>' . i18n("Import information", $plugin_name) . '</strong></a>' . '<div id="idInfoText" style="display: none">' . '<br /><br /><strong>' . i18n("Specify colum types:", $plugin_name) . '</strong>' . i18n("<br />The first line must contain the column names; this specifies the column order.<br /><column name>[delimiter]<column name>...", $plugin_name) . '<br /><br /><strong>' . i18n("Data structure:", $plugin_name) . '</strong><br />' . i18n("The recipients have to be entered using the following format:<br /><data>[Delimiter]<data>... - each recipient in a new line.", $plugin_name) . '<br /><br /><strong>' . i18n("Example:", $plugin_name) . '</strong>' . i18n("<br />name;mail;confirmed<br />Smith;jon.smith@example.org;1", $plugin_name) . '<br /><br /><strong>' . i18n("The following column names will be recognized:", $plugin_name) . '</strong><br />' . implode("<br />\n", $aFields) . '</div>'; $oForm->add(i18n("Recipients", $plugin_name), $oAreaData->render() . "<br />" . $sInfo); unset($sInfo); $sExecScript = ' <script type="text/javascript"> /* Enabled/Disable group box */ function fncShowHide(strItemID) { objItem = document.getElementById(strItemID); if (objItem.style.display == "none") { objItem.style.display = "inline"; } else { objItem.style.display = "none"; } } </script>'; $oPage->addScript('execscript', $sExecScript); $oPage->setContent($sMessage . $oForm->render(true)); $oPage->render();