Hi, I have been successfully using this module for a few days now in an edit capacity and I am very pleased with the results, it appears to be a very thorough and useful module. Unfortunately I just went to "add block" to create a new textual based block and the Block CSS textbox wasn't there for me to enter a class.
I presume this will be an easy fix to simply edit a different template file somewhere, unfortunately I'm having trouble locating it. If you could please point me in the right direction it would be much appreciated.
Keep up the good work, this is a stunning module for customizing a business website based upon easily interpretable classes, design for the dumbest user philosophy ;-)

Thanks
Dan

CommentFileSizeAuthor
#6 block_class-410554.patch860 bytesrocketeerbkw

Comments

todd nienkerk’s picture

Assigned: Unassigned »

DanMac: Thanks for the kind words. Can you test the following steps for me to see if you can make the text field appear?

(1) Click "Add Block"
(2) Add your new block as usual. When you save the block, you'll be returned to the main Blocks page.
(3) Click "Configure" next to the new block.

Do you see the Block Class text field here? If so, we neglected to add the field to the block creation form.

todd nienkerk’s picture

Version: 6.x-1.1 » 6.x-1.x-dev

This may be fixed in the patch supplied here: #478496: Legacy Drupal 5.x code and techniques in 6.x branch. The results of that patch have been committed to 6.x-1.x-dev.

todd nienkerk’s picture

Status: Active » Fixed

Pretty sure this was fixed as part of #478496: Legacy Drupal 5.x code and techniques in 6.x branch. Please reopen if this isn't the case.

todd nienkerk’s picture

Status: Fixed » Active

Whoops! Not yet fixed. Adding CSS classes to a new block during block creation doesn't stick. Only modifying exists blocks works properly.

rocketeerbkw’s picture

There is also a side effect where the class is already filled in on the add block form. The value is whatever was entered in during the last add block save.

This is because when block_class_form_submit() is called $form_state['values']['delta'] is null which is saved as "" in the table.

rocketeerbkw’s picture

Status: Active » Needs review
StatusFileSize
new860 bytes

Here's a patch against 6.x-1.x-dev HEAD

Any rows in block_class with an empty delta should be deleted to make sure the classes form field is emtpy on the add block form.

dboulet’s picture

Patch in #6 works, thanks.

rjmackay’s picture

Status: Needs review » Reviewed & tested by the community

Patch in #6 works for me too. Thanks.

todd nienkerk’s picture

Assigned: » Unassigned
Status: Reviewed & tested by the community » Needs review

This has been committed to 6.x-1.x-dev. Please help test!

todd nienkerk’s picture

This will also need to be ported to the 7.x-1.x branch. I've created an issue here:

#1020794: Port "Add Block" CSS class definition patch to 7.x-1.x branch

sokru’s picture

Tested and worked nicely. Thanks.

berenddeboer’s picture

Not for me. I created a new block, css class doesn't stick.

berenddeboer’s picture

Component: User interface » Code
Category: support » bug
berenddeboer’s picture

Status: Needs review » Closed (fixed)

I think delta is not the delta as found in the blocks table, but simply bid. That works for me. Fix committed.