Hello,

in your documentation you said that there is a $search['submit'] key. However with a print_r i found that there is a $search['actions'] key.

Thank you.
apanag

Files: 
CommentFileSizeAuthor
#8 1008022-8.patch2.08 KBjhodgdon
PASSED: [[SimpleTest]]: [MySQL] 30,518 pass(es).
[ View ]
#1 search.patch595 bytesdroplet
PASSED: [[SimpleTest]]: [MySQL] 30,396 pass(es).
[ View ]

Comments

droplet’s picture

Status:Active» Needs review
Issue tags:+Quick fix
StatusFileSize
new595 bytes
PASSED: [[SimpleTest]]: [MySQL] 30,396 pass(es).
[ View ]
aspilicious’s picture

D7:

$form['actions']['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Save'),
  );

Patch:

- * - $search['submit']: Form submit button.
+ * - $search['actions']: Form submit button.

Shouldn't this be: "$search['actions']['submit']: Form submit button." ???

droplet’s picture

can you provide a patch ? I have no idea :(. actions return a grouped set value.

aspilicious’s picture

Me neither but the original text tries to access a specific button "Form submit button". If it still tries to access that one button it needs to be $search['actions']['submit'];

If not, the text "Form submit button" is wrong :).
I don't write a patch before I know what to do :)

jhodgdon’s picture

Title:Documentation problem with search-block-form.tpl.php» search-block-form.tpl.php refers to $search['submit'], which no longer exists
Status:Needs review» Needs work

I think it should say something like:

$search['actions']: Buttons for the search form, including $search['actions']['submit'] (the submit button).

droplet’s picture

Issue tags:-Quick fix

It's not exactly "including $search['actions']['submit']" ??
$search['actions'] is not an array and contains rendered array elements.

maybe:
$search['actions']: Buttons for the search form.
or
$search['actions']: Search form buttons ready for print.

if change $search['actions'] into an array requires API change.

jhodgdon’s picture

OK, thanks for the correction. Still needs a patch.

jhodgdon’s picture

Status:Needs work» Needs review
StatusFileSize
new2.08 KB
PASSED: [[SimpleTest]]: [MySQL] 30,518 pass(es).
[ View ]

Here's a patch, which also brings the tpl header up to standards.

droplet’s picture

Status:Needs review» Reviewed & tested by the community

patch seems ok.

** where can I see the docs about "tpl header up to standards", thanks.

jhodgdon’s picture

http://drupal.org/node/1354 has all of our doc header standards

webchick’s picture

Status:Reviewed & tested by the community» Fixed

Committed to HEAD. Thanks!

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.