Thanks for the quick feedback! You guys are great!
I think I found the catch -- I have CSS buttons enabled. It seems to work great when I disable CSS buttons.
Sooo, when CSS buttons are disabled, I get this code and everything works fine:
<input type="image" src="includes/templates/template_default/buttons/english/small_edit.gif" alt="Edit" title=" Edit " name="edit" value="edit" />
But, when CSS buttons are enabled, I get this code and the EDIT button submits the form instead of editing it:
<input class="cssButton small_edit" onmouseover="this.className='cssButtonHover small_edit small_editHover'" onmouseout="this.className='cssButton small_edit'" type="submit" value="Edit" style="width: 80px;" />
Hmmm. Peering into tpl_gv_send_default we see the following:
<?php echo zen_image_submit(BUTTON_IMAGE_EDIT_SMALL, BUTTON_EDIT_SMALL_ALT, 'name="edit" value="edit"') ?>
And so, it looks like CSS buttons aren't picking up that necessary last parameter in the zen_image_submit, eh? So, running over to html_output.php, I take a look at the zen_image_submit() function. On line 262 (in my file at least) I noticed the $paramters variable is commented out:
if (strtolower(IMAGE_USE_CSS_BUTTONS) == 'yes' && strlen($alt)<30) return zenCssButton($image, $alt, 'submit', $sec_class /*, $parameters = ''*/ );
I don't think I did that. So why is it commented out? Well, looking at the zenCssButton() function on line 320 (in my file at least) we see:
$css_button = '<span class="' . $mouse_out_class . '" ' . $css_button_js . $style . ' > ' . $text . ' </span>'; // add $parameters ???
So the $parameters variable, even if it was passed to the zenCssButton() function, still wouldn't print. I would guess, then, that it's a feature still needing to be worked out?
Anyway, all this to ask, do you think it might be a possibility to use CSS Buttons and still have the Gift Certificate edit button work? Any creative solutions would be really appreciated. This "bug" is really "bugging" me. :smile:
Thanks a lot!