From c2fa42cf6cf6a2742b2a40ef7fc46f95f7a734f3 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Sat, 21 Feb 2009 02:28:19 +0000 Subject: Implementation of local import module. Still need work on better status messages. --- modules/local_import/helpers/local_import.php | 42 +++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 modules/local_import/helpers/local_import.php (limited to 'modules/local_import/helpers/local_import.php') diff --git a/modules/local_import/helpers/local_import.php b/modules/local_import/helpers/local_import.php new file mode 100644 index 00000000..ca7d01e4 --- /dev/null +++ b/modules/local_import/helpers/local_import.php @@ -0,0 +1,42 @@ +paths = array_keys($paths); + $template->path_list = $path_list->render(); + $template->add_form = self::get_admin_form()->render(); + + return $template; + } + + public static function get_admin_form() { + $form = new Forge("admin/local_import/add_path", "", "post", array("id" => "gLocalImportAdminForm")); + $add_path = $form->group("add_path"); + $add_path->input("path")->label(t("Path"))->rules("required") + ->error_messages("not_readable", t("The directory is not readable by the webserver")); + $add_path->submit("add")->value(t("Add Path")); + + return $form; + } +} -- cgit v1.2.3