rendered paste bodyfunction phptemplate_button($element) {
// following lines are copied directly from form.inc core file:
//Make sure not to overwrite classes
if (isset($element['#attributes']['class'])) {
$element['#attributes']['class'] = 'form-'. $element['#button_type'] .' '.
$element['#attributes']['class'];
}
else {
$element['#attributes']['class'] = 'form-'. $element['#button_type'];
}
return '<input type="' . (($element['#button_type'] == "image") ? 'image' : '
submit' ) . '" '. (empty($element['#name']) ? '' : 'name="'. $element['#name']
.'" ') .'id="'. $element['#id'].'" value="'. check_plain($element['#value']) .
'" '. drupal_attributes($element['#attributes']) ." />\n";
}
function riverwired_helper_form_alter($form_id, &$form) {
// Override the user registration form, to hide a couple of the User
// Profile fields and also just for better display.
switch ($form_id) {
case ('user_login_block'):
unset($form['name']['#title']);
unset($form['pass']['#title']);
unset($form['links']);
$form['submit']['#theme'] = 'button';
$form['submit']['#button_type'] = 'image';
$form['submit']['#attributes'] = array(
'src' => base_path() . path_to_theme() . '/i/login.gif',
'alt' => t('Login')
);
}
}