Hey

Im my site, the Fusion Core based theme, Acquia Prosper, adds a border with background and -moz-border-radius to every form items, like buttons and images.

this of course clashes with Custom Search image, as it is an input field.
so i faced the problem of having to remove those borders, background and border-radius from it.

i though no biggie... until i came to the conclusion that Custom Search module does not sets a class attribute for the image, although it does for the search box and search form.

so i wrote a patch for 6.x-1.4, 6.x-1.x, 7.x-1.4 and 7.x-1.x.
it is quite simple - it only adds a single line in all 4 versions for .module file:
for 6.x:$form['submit']['#attributes'] = array('class' => 'custom-search-button');
for 7.x: $form['actions']['submit']['#attributes'] = array('class' => 'custom-search-button');

basically it adds a CLASS attribute to the image input item. nothing else.
the class (custom-search-button) can be loaded in the theme .css files and is entirely optional.

i've tested 6.x-1.4 and it works fine.
the other versions i did not test, but they should work well as well.

patches for all versions supplied bellow.
i've also included the .module file with the patch applied for all versions.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

lpalgarvio’s picture

for those wishing to style the button in Acquia Prosper theme, try this CSS code in local.css:

/* custom search box */
input.custom-search-box {
  max-width:70%;
  vertical-align: middle;
}

/* custom search button */
input.custom-search-button {
  border: none;
  background: none;
  margin: 0px;
  padding: 0px;
  vertical-align: middle;
}
lpalgarvio’s picture

forgot to mention... i patched against the versions dated of:

Recommended releases
7.x-1.4 	2010-Jun-07
6.x-1.4 	2010-Jun-07

Development releases
7.x-1.x-dev 	2010-Sep-23
6.x-1.x-dev 	2010-Sep-23

also, packed up tar.gz archives bellow.

jdanthinne’s picture

Status: Needs review » Closed (fixed)

Thanks.
Committed to DEV.