Re: Congratulations!! FormBuilder 0.10.0
| From: | Justin Patrin | Date: | Wed, 13 Oct 2004 17:50:28 +0000 |
| Subject: | Re: Congratulations!! FormBuilder 0.10.0 | ||
| References: | 1 2 3 4 5 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-14897@lists.php.net to get a copy of this message | ||
On Tue, 14 Sep 2004 22:02:54 -0300, Alejandro Vartabedian
<avartabedian@webservices.com.uy> wrote:
> Justin Patrin escribió:
> > Attachments are not included by the list server unless they are
> > explicitly sent as Text. Try adding a txt extension next time.
>
> trying again.
>
> >
> > I've create a Feature Request in the bug system since you still haven't done it.
> > http://pear.php.net/bugs/bug.php?id=2333
>
> i added the coments, can i post the patch text without reformat after
> the post?
>
> >
> > Please leave comments to clarify what version of FormBuilder that diff
> > is against and what exactly you want the features to do.
>
> done.
>
> regards.
>
> >
> >
>
> !DSPAM:4147957b235511459169275!
>
>
> --- FormBuilder.php 2004-05-15 15:31:16.000000000 -0300
> +++ /usr/share/php/DB/DataObject/FormBuilder.php 2004-06-19 01:43:57.000000000 -0300
> @@ -524,7 +524,10 @@
> if ($elValidator !== false) {
> $rules[$key][] = array('validator' => $elValidator,
> 'rule' => $elValidRule);
> } // End if
> -
> +
> + // to freeze non editable fields by Alejandro Vartabedian
> + if (in_array($key, $elements_to_freeze)) { $element->freeze(); }
> +
> } // End else
> } // End else
>
> @@ -538,11 +541,17 @@
>
> //VALIDATION RULES
> if (isset($rules[$key])) {
> + // validate the form data in the client by javascript
> + // by Alejandro Vartabedian
> + if
> (isset($_DB_DATAOBJECT_FORMBUILDER['CONFIG']['clientRules']) &&
> +
> $_DB_DATAOBJECT_FORMBUILDER['CONFIG']['clientRules'] == '1') {
> + $rule_side = 'client';
> + }
> while(list($n, $rule) = each($rules[$key])) {
> if ($rule['rule'] === false) {
> - $form->addRule($key, $this->rule_violation_message,
> $rule['validator']);
> + $form->addRule($key,
> '('.$this->getFieldLabel($key).')'.$this->rule_violation_message,
> $rule['validator'], '', $rule_side);
> } else {
> - $form->addRule($key, $this->rule_violation_message,
> $rule['validator'], $rule['rule']);
> + $form->addRule($key,
> '('.$this->getFieldLabel($key).')'.$this->rule_violation_message,
> $rule['validator'], $rule['rule'], $rule_side);
> } // End if
> } // End while
> } // End if
> @@ -1325,4 +1334,4 @@
> }
> }
>
> -?>
> \ No newline at end of file
> +?>
>
Hey, remember this old thing? Sorry for the delay, but it should be
all done now. Check the bug report for my full explanation. Please add
a comment to the bug if everything looks ok to you.
http://pear.php.net/bugs/bug.php?id=2333
--
paperCrane --Justin Patrin--