From 6f0a4bbff6aa4bda74d71e7bdd424903cb25bf70 Mon Sep 17 00:00:00 2001 From: rWatcher Date: Thu, 1 Oct 2009 04:29:11 +0800 Subject: [PATCH] Bugfix for Beta 3. --- modules/editcreation/css/editcreation.css | 3 ++ .../helpers/editcreation_event.php | 5 +-- .../helpers/editcreation_theme.php | 31 +++++++++++++++++++ 3 files changed, 35 insertions(+), 4 deletions(-) create mode 100644 modules/editcreation/css/editcreation.css create mode 100644 modules/editcreation/helpers/editcreation_theme.php diff --git a/modules/editcreation/css/editcreation.css b/modules/editcreation/css/editcreation.css new file mode 100644 index 00000000..6894018c --- /dev/null +++ b/modules/editcreation/css/editcreation.css @@ -0,0 +1,3 @@ +select { + display: inline; +} diff --git a/modules/editcreation/helpers/editcreation_event.php b/modules/editcreation/helpers/editcreation_event.php index 6cadc8f9..e7eeb455 100644 --- a/modules/editcreation/helpers/editcreation_event.php +++ b/modules/editcreation/helpers/editcreation_event.php @@ -21,10 +21,7 @@ class editcreation_event_Core { static function item_edit_form($item, $form) { // Add a couple of drop-down boxes to allow the user to edit the date // that $item was created on. - - // Inject some css to make everything look right. - print ("\n"); - + // Add the datecreated element to the form. $form->edit_item->dateselect("datecreated") ->label(t("Created")) diff --git a/modules/editcreation/helpers/editcreation_theme.php b/modules/editcreation/helpers/editcreation_theme.php new file mode 100644 index 00000000..c50cd739 --- /dev/null +++ b/modules/editcreation/helpers/editcreation_theme.php @@ -0,0 +1,31 @@ +item()) { + return; + } + $item = $theme->item(); + if ( $item && access::can("edit", $item) ) { + $theme->css("editcreation.css"); + } + } +}