Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 3.2.14

Bug #1836 Element date->getFrozenHtml() freezes the element
Submitted: 2004-07-10 09:06 UTC
From: dick at inf dot ufsc dot br Assigned: avb
Status: Closed Package: HTML_QuickForm
PHP Version: 4.3.3 OS: Linux
Roadmaps: (Not assigned)    

 [2004-07-10 09:06 UTC] dick at inf dot ufsc dot br
Description: ------------ 1. Element method HTML_QuickForm_date::getFrozenHtml() returns the right code, but freezes the element, where it shouldn't! ;-) 2. And the method HTML_QuickForm_Date::setPersistantFreeze does not work when not generating the hidden <input>, it always generates the hidden tags. I have tested exact the same with HTML_QuickForm_input and it works ok. Reproduce code: --------------- $form <- Generate some elements foreach( ... $element's acessed by reference ...) { Set values for elements from db rows $element->setPersistantFreeze(false); $html .= $element->getFrozenHtml(); // a table with element values } $form->display(); echo $html Expected result: ---------------- I wish it to display some input elements in editable state, and bellow a table with values of rows without hidden <input> tags Actual result: -------------- Frozen date element (can occur with other elements, i have not tested all) and editable input text Bellow a table with hidden <input> tags for the html generated from date element on getFronzenHtml() even calling $element->setPersistantFreeze(false);


 [2004-07-27 12:32 UTC] avb
Both problems can be tracked to the group element of which date is a subclass. 1. group::getFrozenHtml() freezes the group, after which group::accept() just freezes all the elements. Group itself is "thawed" after, but the elements are not affected. The solution will be adding a thaw() / unfreeze() method (or a parameter to freeze() maybe), saving the elements' frozen state before calling accept(), freezing them and later reverting their frozen state to the previous value. 2. is easy, group::setPersistantFreeze() should just propagate the passed parameter to the group's elements.
 [2004-09-15 11:45 UTC] martin dot holzhauer at gmail dot com
will an unfreeze() Function added? i think this is an realy good feature For Example Adding Radiobuttons for assking "Are this Data Correct?" when Form ist Freezed
 [2004-10-14 15:02 UTC] avb
Fixed in CVS. Added element::unfreeze() method, calls to group::getFrozenHtml() and group::setPersistantFreeze() now work as expected.