Skip to content

Commit

Permalink
Initial refactor to make edit page extensible
Browse files Browse the repository at this point in the history
  • Loading branch information
adunsulag committed Jun 18, 2024
1 parent b0f573e commit 7649f36
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions controllers/C_Prescription.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,21 @@ function __construct($template_mod = "general")
function default_action()
{
$this->assign("prescription", $this->prescriptions[0]);
$vars = $this->getTemplateVars();
// $vars['rx_send_email'] = $GLOBALS['rx_send_email'] ?? false;
// $vars['rx_show_drug_drug'] = $GLOBALS['rx_show_drug_drug'] ?? false;
// $vars['rx_zend_pdf_template'] = $GLOBALS['rx_zend_pdf_template'] ?? false;
// $vars['baseModDir'] = $GLOBALS['baseModDir'] ?? '';
// $vars['zendModDir'] = $GLOBALS['zendModDir'] ?? '';
// $vars['printm'] = null; // TODO: figure out where printm is used or defined
// $vars['rx_zend_pdf_action'] = $GLOBALS['rx_zend_pdf_action'] ?? '';
// $vars['rx_zend_html_template'] = $GLOBALS['rx_zend_html_template'] ?? '';
// $vars['rx_zend_html_action'] = $GLOBALS['rx_zend_pdf_action'] ?? '';
// $vars['rx_use_fax_template'] = $GLOBALS['rx_use_fax_template'] ?? '';
// $vars['rx_send_email'] = $GLOBALS['rx_send_email'] ?? false;
$twig = (new TwigContainer(null, $GLOBALS['kernel']))->getTwig();
echo $twig->render("prescription/" . $this->template_mod . "_edit.html.twig", $vars);

$this->display($GLOBALS['template_dir'] . "prescription/" . $this->template_mod . "_edit.html");
}

Expand Down
File renamed without changes.

0 comments on commit 7649f36

Please sign in to comment.