diff --git a/ext/resize/main.php b/ext/resize/main.php index 139f3ca89..fce3a422d 100644 --- a/ext/resize/main.php +++ b/ext/resize/main.php @@ -144,9 +144,6 @@ public function onPageRequest(PageRequestEvent $event) { } catch (ImageResizeException $e) { $this->theme->display_resize_error($page, "Error Resizing", $e->error); } - } else { - /* Display options for resizing */ - $this->theme->display_resize_page($page, $image_id); } } } diff --git a/ext/resize/style.css b/ext/resize/style.css deleted file mode 100644 index ccfc01c2d..000000000 --- a/ext/resize/style.css +++ /dev/null @@ -1,5 +0,0 @@ -form#form_resize { - float: left; - margin: 0; - width: 60%; -} diff --git a/ext/resize/theme.php b/ext/resize/theme.php index c331dbbb0..81f645596 100644 --- a/ext/resize/theme.php +++ b/ext/resize/theme.php @@ -8,11 +8,15 @@ public function get_resize_html(/*int*/ $image_id) { global $user, $config; $i_image_id = int_escape($image_id); + $default_width = $config->get_int('resize_default_width'); + $default_height = $config->get_int('resize_default_height'); - $html = " - ".make_form(make_link("resize"),'POST',false,'resize_image')." - - + $html .= " + ".make_form(make_link('resize/'.$i_image_id), 'POST')." + + x + + "; @@ -25,35 +29,5 @@ public function display_resize_error(Page $page, /*string*/ $title, /*string*/ $ $page->add_block(new NavBlock()); $page->add_block(new Block($title, $message)); } - - public function display_resize_page(Page $page, /*int*/ $image_id) { - global $config; - - $default_width = $config->get_int('resize_default_width'); - $default_height = $config->get_int('resize_default_height'); - - $image = Image::by_id($image_id); - $thumbnail = $this->build_thumb_html($image, null); - - $html = "
-

Resize Image ID ".$image_id."
".$thumbnail."

-

Please note: You will have to refresh the image page, or empty your browser cache.

-

Enter the new size for the image, or leave blank to scale the image automatically.


" - .make_form(make_link('resize/'.$image_id), 'POST', $multipart=True,'form_resize')." - - - - - -
New Width
New Height
- - "; - - $page->set_title("Resize Image"); - $page->set_heading("Resize Image"); - $page->add_block(new NavBlock()); - $page->add_block(new Block("Resize Image", $html, "main", 20)); - - } } ?>