Download & Extend

confirm_form needs to be polite with $form['#attributes']

Project:Drupal core
Version:7.x-dev
Component:forms system
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)
Issue tags:Novice

Issue Summary

confirm_form() shouldn't assume that it is the only one on the form to set the '#attributes' element. Please merge the array instead of assigning it.

Comments

#1

bump...

#2

Version:6.x-dev» 7.x-dev

Why not suggesting a patch? It will have to be against the 7.x code base (HEAD tag in CVS).

Please read http://drupal.org/patch/create for more information.

#3

Sure thing. After playing I realized we can just concat the string... which leads me to my next issue:

$form['#attributes']['class'] should be an array. What would I file that under, a feature request..?

AttachmentSizeStatusTest resultOperations
system.module.confirm_form.attributes.patch713 bytesIdleFailed: Failed to apply patch.View details

#4

Status:active» needs review

@cha0s, let's open a task, if you are willing to take the lead on this.

#5

Status:needs review» needs work

The last submitted patch failed testing.

#6

Status:needs work» fixed

fixed for D7

http://api.drupal.org/api/function/confirm_form/7

#7

Status:fixed» needs work

Oops to quick of judgement; no its not.

Currently can't provide patches.

<?php
  $form
['#attributes'] = array('class' => array('confirmation'));
?>

Should become

<?php
  $form
['#attributes']['class'][] = 'confirmation';
?>

#8

Hi, I am new here. I am trying to learn on how to apply patches :)

AttachmentSizeStatusTest resultOperations
system.module.patch634 bytesIdleFAILED: [[SimpleTest]]: [MySQL] Invalid patch format in system.module_1_0.patch.View details

#9

I'm sorry for the previous not-working patch. The previous patch is patched from the 'modules/system' folder instead of drupal '.' folder. 2nd try:

AttachmentSizeStatusTest resultOperations
system.module.confirm-form.patch634 bytesIdleFAILED: [[SimpleTest]]: [MySQL] Invalid patch format in system.module.confirm-form.patch.View details

#10

Status:needs work» needs review

#11

Status:needs review» needs work

The last submitted patch, system.module.confirm-form.patch, failed testing.

#12

AttachmentSizeStatusTest resultOperations
system.module.confirm-form.patch664 bytesIdleFAILED: [[SimpleTest]]: [MySQL] Invalid patch format in system.module.confirm-form_0.patch.View details

#13

Status:needs work» needs review

#14

Status:needs review» needs work

The last submitted patch, system.module.confirm-form.patch, failed testing.

#15

Status:needs work» needs review

sorry for the spamming :(

AttachmentSizeStatusTest resultOperations
system.module.confirm-form.patch664 bytesIdleFAILED: [[SimpleTest]]: [MySQL] Invalid patch format in system.module.confirm-form_0_0.patch.View details

#16

Status:needs review» needs work

The last submitted patch, system.module.confirm-form.patch, failed testing.

#17

Status:needs work» needs review
AttachmentSizeStatusTest resultOperations
system.module.confirm-form.patch647 bytesIdlePASSED: [[SimpleTest]]: [MySQL] 19,009 pass(es).View details

#18

Status:needs review» reviewed & tested by the community

Some trouble with windows style newlines I see, but you fixed that.

Patch is good to go.

#19

#18: thanks! still getting a grip of it. so, sorry for the spamming :)

#20

Status:reviewed & tested by the community» fixed

Committed to CVS HEAD. Thanks.

#21

Status:fixed» closed (fixed)

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