From 11c94065088bf270dd6b82573e1266d154b5c410 Mon Sep 17 00:00:00 2001 From: dogmatic Date: Mon, 18 Jan 2010 23:34:14 +0200 Subject: [PATCH] getting the habtm to work --- .../controllers/modules_controller.php | 3 +- .../management/views/modules/admin_add.ctp | 38 ++++++++++++------- 2 files changed, 27 insertions(+), 14 deletions(-) diff --git a/infinitas/management/controllers/modules_controller.php b/infinitas/management/controllers/modules_controller.php index 48795f54f..7a574d296 100644 --- a/infinitas/management/controllers/modules_controller.php +++ b/infinitas/management/controllers/modules_controller.php @@ -26,7 +26,8 @@ function admin_add() { $positions = $this->Module->Position->find('list'); $groups = $this->Module->Group->find('list'); - $this->set(compact('positions', 'groups')); + $modulesRoute = $this->Module->ModulesRoute->find('all'); + $this->set(compact('positions', 'groups', 'modulesRoute')); } function admin_edit($id = null) { diff --git a/infinitas/management/views/modules/admin_add.ctp b/infinitas/management/views/modules/admin_add.ctp index bb2a557c0..105f0e36a 100644 --- a/infinitas/management/views/modules/admin_add.ctp +++ b/infinitas/management/views/modules/admin_add.ctp @@ -19,19 +19,31 @@ echo $this->Core->adminOtherHead( $this ); echo $this->Form->create( 'Module' ); - echo $this->Form->input( 'name' ); - echo $this->Form->input( 'module' ); - echo $this->Form->input( 'position_id' ); - echo $this->Form->input( 'group_id' ); - echo $this->Form->input( 'active' ); - echo $this->Form->input( 'show_heading' ); - echo $this->Form->input( 'core' ); - echo $this->Form->input( 'author' ); - echo $this->Form->input( 'url' ); - echo $this->Form->input( 'update_url' ); - echo $this->Form->input( 'licence' ); + ?> +
+ Form->input( 'name' ); + echo $this->Form->input( 'module' ); + echo $this->Form->input( 'position_id' ); + echo $this->Form->input( 'group_id' ); + echo $this->Form->input( 'active' ); + echo $this->Form->input( 'show_heading' ); + echo $this->Form->input( 'core' ); + echo $this->Form->input( 'author' ); + echo $this->Form->input( 'url' ); + echo $this->Form->input( 'update_url' ); + echo $this->Form->input( 'licence' ); - echo $this->Form->input( 'content', array('class' => 'title') ); - echo $this->Form->input( 'config', array('class' => 'title') ); + echo $this->Form->input( 'content', array('class' => 'title') ); + echo $this->Form->input( 'config', array('class' => 'title') ); + ?> +
+
+ Form->input( 'ModulesRoute' ); + ?> +
+ Form->end( 'Save Module' ); ?> \ No newline at end of file