public function save()
 {
     access::verify_csrf();
     $form = $this->_get_admin_form();
     if ($form->validate()) {
         $formats = movie_tools::get_formats();
         foreach ($formats as $id => $data) {
             module::set_var("movie_tools", "allow_{$id}", $form->formats->{$id}->value == 1);
         }
         module::set_var("movie_tools", "custom_formats", movie_tools::formats_string_to_json($form->formats->custom_formats->value));
         module::set_var("gallery", "movie_extract_frame_time", $form->thumbs->extract_frame_time->value);
         // All done - redirect with message.
         message::success(t("Movie tools settings updated successfully"));
         url::redirect("admin/movie_tools");
     }
     // Something went wrong - print view from existing form.
     $this->_print_view($form);
 }