From 49cc53e31f80084bd5f530f0f37d6f8d219ea3b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emmanuel=20Beno=C3=AEt?= Date: Tue, 7 Feb 2012 09:29:20 +0100 Subject: [PATCH] Item name on "new task" form The item name will now be displayed on the new task form when it is displayed from an item's page. --- arse | 2 +- includes/t-items/package.inc.php | 1 - includes/t-tasks/page_controllers.inc.php | 5 ++++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/arse b/arse index a1d327d..cdb2e95 160000 --- a/arse +++ b/arse @@ -1 +1 @@ -Subproject commit a1d327d4657f8fa9d258ab2a2137134497181c09 +Subproject commit cdb2e952f5eb1314a925afd2dac8c5c9f4ea9823 diff --git a/includes/t-items/package.inc.php b/includes/t-items/package.inc.php index 8cd5f8d..c9edc90 100644 --- a/includes/t-items/package.inc.php +++ b/includes/t-items/package.inc.php @@ -10,7 +10,6 @@ $package[ 'files' ][] = 'page_controllers'; $package[ 'files' ][] = 'pages'; $package[ 'files' ][] = 'views'; -$package[ 'extras' ][] = 'Item_NameField'; $package[ 'extras' ][] = 'Item_LocationField'; $package[ 'ctrls' ][] = 'add_item'; diff --git a/includes/t-tasks/page_controllers.inc.php b/includes/t-tasks/page_controllers.inc.php index ea91e23..00e995c 100644 --- a/includes/t-tasks/page_controllers.inc.php +++ b/includes/t-tasks/page_controllers.inc.php @@ -96,7 +96,10 @@ class Ctrl_AddTaskForm $form->addField( Loader::Create( 'Field' , 'to' , 'hidden' ) ->setDefaultValue( $target ) ) ->addField( Loader::Create( 'Field' , 'item' , 'hidden' ) - ->setDefaultValue( $target ) ); + ->setDefaultValue( $target ) ) + ->addField( Loader::Create( 'Field' , 'item-name' , 'label' ) + ->setDescription( 'Item:' ) + ->setDefaultValue( $item->name ) ); } $page->setTitle( 'New task' );