From 21180f52bd2e43760f8a567b2122c1f7265e5513 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Wed, 30 Jan 2008 20:12:19 +0000 Subject: [PATCH] compressed ImageField layout to fit in CTF-popup (removed "click here to remove" label) removed iframe-borders for IE git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@48848 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- core/model/Image.php | 14 +------------- forms/ImageField.php | 2 +- lang/en_US.php | 6 ------ templates/Image_iframe.ss | 16 +++++++--------- 4 files changed, 9 insertions(+), 29 deletions(-) diff --git a/core/model/Image.php b/core/model/Image.php index cf3d3ebaa..d8a48b412 100755 --- a/core/model/Image.php +++ b/core/model/Image.php @@ -611,19 +611,7 @@ class Image_Uploader extends Controller { new FieldSet( new HiddenField("Class", null, $this->urlParams['Class']), new HiddenField("ID", null, $this->urlParams['ID']), - new HiddenField("Field", null, $this->urlParams['Field']), - new HeaderField($title), - new LabelField( - sprintf( - _t( - 'ImageUploader.CLICKREMOVE', - "Click the button below to remove this %s.", - PR_MEDIUM, - '... this image/file' - ), - $type - ) - ) + new HiddenField("Field", null, $this->urlParams['Field']) ), new FieldSet( new ConfirmedFormAction( diff --git a/forms/ImageField.php b/forms/ImageField.php index 2faf33895..c8df0a556 100755 --- a/forms/ImageField.php +++ b/forms/ImageField.php @@ -31,7 +31,7 @@ class ImageField extends FileField { $parentClass = $data->class; $parentField = $this->name; - $iframe = ""; + $iframe = ""; return $iframe . $hiddenField; } else { diff --git a/lang/en_US.php b/lang/en_US.php index 0bae9d28e..01095233e 100644 --- a/lang/en_US.php +++ b/lang/en_US.php @@ -25,12 +25,6 @@ $lang['en_US']['ImageUploader']['DELETE'] = array( PR_MEDIUM, 'Delete file/image' ); -$lang['en_US']['ImageUploader']['CLICKREMOVE'] = array( - 'Click the button below to remove this %s.', - - PR_MEDIUM, - '... this image/file' -); $lang['en_US']['ImageUploader']['REALLYDELETE'] = 'Do you really want to remove this %s?'; $lang['en_US']['RedirectorPage']['HEADER'] = 'This page will redirect users to another page'; $lang['en_US']['RedirectorPage']['REDIRECTTO'] = 'Redirect to'; diff --git a/templates/Image_iframe.ss b/templates/Image_iframe.ss index 7166ae195..50b2d2a6b 100755 --- a/templates/Image_iframe.ss +++ b/templates/Image_iframe.ss @@ -6,12 +6,6 @@ - <% if Image.ID %> -
- $Image.CMSThumbnail -
- <% end_if %> -
<% if UseSimpleForm %> $EditImageSimpleForm @@ -19,9 +13,13 @@ $EditImageForm <% end_if %>
- <% if DeleteImageForm %> -
- $DeleteImageForm + + <% if Image.ID %> +
+ $Image.CMSThumbnail + <% if DeleteImageForm %> + $DeleteImageForm + <% end_if %>
<% end_if %>