Author: Jonathan.Wage
Date: 2010-01-26 18:46:41 +0100 (Tue, 26 Jan 2010)
New Revision: 27200

Modified:
   
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalAssetsPlugin/lib/form/sfSympalAssetEditForm.class.php
   
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalAssetsPlugin/modules/sympal_assets/templates/edit_assetSuccess.php
Log:
[1.4][sfSympalPlugin][1.0] Fixing issue with width height fields showing for 
non image asset types


Modified: 
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalAssetsPlugin/lib/form/sfSympalAssetEditForm.class.php
===================================================================
--- 
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalAssetsPlugin/lib/form/sfSympalAssetEditForm.class.php
      2010-01-26 17:35:15 UTC (rev 27199)
+++ 
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalAssetsPlugin/lib/form/sfSympalAssetEditForm.class.php
      2010-01-26 17:46:41 UTC (rev 27200)
@@ -34,10 +34,6 @@
     {
       $this->widgetSchema['width'] = new sfWidgetFormInput();
       $this->widgetSchema['height'] = new sfWidgetFormInput();
-    }
-
-    if ($this->_asset->isImage())
-    {
       $this->validatorSchema['width'] = new sfValidatorString(array('trim' => 
true));
       $this->validatorSchema['height'] = new sfValidatorString(array('trim' => 
true));
     }

Modified: 
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalAssetsPlugin/modules/sympal_assets/templates/edit_assetSuccess.php
===================================================================
--- 
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalAssetsPlugin/modules/sympal_assets/templates/edit_assetSuccess.php
 2010-01-26 17:35:15 UTC (rev 27199)
+++ 
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalAssetsPlugin/modules/sympal_assets/templates/edit_assetSuccess.php
 2010-01-26 17:46:41 UTC (rev 27200)
@@ -41,10 +41,12 @@
         <?php echo $form['new_name'] ?>
         <input type="submit" value="<?php echo __('Save') ?>" />
 
-        <h2><?php echo __('Resize') ?></h2>
-        <?php echo $form['width'] ?> x 
-        <?php echo $form['height'] ?>
-        <input type="submit" value="<?php echo __('Save') ?>" />
+        <?php if ($asset->isImage()): ?>
+          <h2><?php echo __('Resize') ?></h2>
+          <?php echo $form['width'] ?> x 
+          <?php echo $form['height'] ?>
+          <input type="submit" value="<?php echo __('Save') ?>" />
+        <?php endif; ?>
       </form>
       
       <?php if ($asset->isImage()): ?>

-- 
You received this message because you are subscribed to the Google Groups 
"symfony SVN" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/symfony-svn?hl=en.

Reply via email to