Ignore:
Timestamp:
May 28, 2008 4:15:25 AM (16 years ago)
Author:
quinn
Message:

Minor bugfixes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/TemplateGlue.inc.php

    r334 r336  
    461461        foreach ($submit_buttons as $i => $b) {
    462462            if (is_array($b)) {
    463                 ?><input type="submit" name="<?php echo oTxt($b['name']) ?>" value="<?php echo oTxt($b['value']); ?>" accesskey="<?php echo oTxt($b['accesskey']); ?>" /><?php
     463                $defaults = array();
     464                $defaults['type'] = isset($b['type']) ? $b['type'] : 'submit';
     465                $defaults['id'] = isset($b['id']) ? $b['id'] : sprintf('sc-%s-button', $b['name']);
     466                $b = array_merge($defaults, $b);
     467                echo '<input';
     468                foreach ($b as $key => $value) {
     469                    printf(' %s="%s"', $key, oTxt($value));
     470                }
     471                echo ' />';
    464472            } else {
    465473                // For backwards compatibility.
Note: See TracChangeset for help on using the changeset viewer.