RTLizing html_checkboxes

From: Date: Wed, 28 Mar 2007 11:02:02 +0000
Subject: RTLizing html_checkboxes
Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-2987@lists.php.net to get a copy of this message
Hi there, I just fixed a problem in html_checkboxes for right to left languages. lets explain the problem. I'll try to explain that with an screenshot. I just put {html_checkboxes} in a <div dir="rtl"> and got some screenshots. In (1) you will see html_checkboxes, every thing seems normal but when I clicked *Anonymous* label, it checked wrong checkbox (it was not wrong it just rendered in wrong way), (2) shows this problem. (3) and (4) shows the problem when I used <br /> as a separator. Okey, I wish I explained the problem well, sorry my english is poor. I just attached a patch for this problem. it just add dir attribute to an span (if label attribute was false) or the label tag. I just use direction attribute for html_checkboxes to prevent conflicts with extra variables (because *dir* could be used as extra attribute). (5) and (6) shows fixed html_checkboxes result. html_radios has this problem too, but html_options is okey. I'll patch html_radios later if my current patch approved. Regards, Armen

Attachment: [application/x-php] function.html_checkboxes.php
Attachment: [text/x-patch] function.html_checkboxes.php.patch
« previous php.smarty.dev (#2987) next »