diff --git a/application/controllers/trials.php b/application/controllers/trials.php index 1086c79..26e20cb 100644 --- a/application/controllers/trials.php +++ b/application/controllers/trials.php @@ -13,6 +13,7 @@ class Trials extends CI_Controller { public function __construct() { parent::__construct(); $this->load->model('trial'); + $this->load->model('program'); $this->load->model('project'); // load language file @@ -26,6 +27,9 @@ class Trials extends CI_Controller { $this->load->library('form_validation'); $this->form_validation->set_error_delimiters('', ''); + // Get the parameters for a specific program + $parameters = $this->program->getParameters('28dc3aeef315080ee26524cf515f763187f52601'); + $config = array( array( 'field' => 'name', @@ -44,7 +48,8 @@ class Trials extends CI_Controller { if ($this->form_validation->run() == FALSE) { - $this->load->view('trial/new'); + $tpl['parameters'] = $parameters; + $this->load->view('trial/new', $tpl); } else { diff --git a/application/views/trial/new.php b/application/views/trial/new.php index c0486fa..792137c 100644 --- a/application/views/trial/new.php +++ b/application/views/trial/new.php @@ -31,6 +31,7 @@