private function _get_admin_form() { $form = new Forge("admin/movie_tools/save", "", "post", array("id" => "g-movie-tools-admin-form")); $formats = movie_tools::get_formats(); $settings_formats = $form->group("formats")->label(t("Movie format supported")); foreach ($formats as $id => $data) { $settings_formats->checkbox($id)->label($data["name"])->checked(module::get_var("movie_tools", "allow_{$id}", false)); } $settings_formats->input("custom_formats")->label(t("Additional movie formats (enter using the same formatting as the table above)"))->callback(array($this, "_validate_custom_formats"))->error_messages("valid_custom_formats", t("You must enter valid formats like the examples in the table"))->value(movie_tools::formats_json_to_string(module::get_var("movie_tools", "custom_formats", ""))); $settings_thumbs = $form->group("thumbs")->label(t("Movie thumbnails")); $settings_thumbs->input("extract_frame_time")->label(t("Seconds from start of movie at which thumbnails are extracted (default: 3)"))->rules("required|valid_numeric")->callback(array($this, "_validate_extract_frame_time"))->error_messages("required", t("You must enter a number"))->error_messages("valid_numeric", t("You must enter a number"))->error_messages("valid_min", t("The value cannot be negative"))->value(module::get_var("gallery", "movie_extract_frame_time", 3)); $form->submit("save")->value(t("Save")); return $form; }