Hello Javier,

I have committed this patch without a test case to valid it.

Thank you for your feedbacks!

-Alain

Le 03/09/2012 13:34, Javier Díaz a écrit :
> Hello,
>
> We are trying to set a checkbox readonly but it only gets shadowed, but
> it can still be checked.
>
> We have done this change in javascript:
>
>   XsltForms_input.prototype.changeReadonly = function() {
> +       var node = this.element.node;
> +       var type = node ?
> XsltForms_schema.getType(XsltForms_browser.getType(node) ||
> "xsd_:string") : XsltForms_schema.getType("xsd_:string");
> +
>          if (this.input) {
> +               if (type["class"] === "boolean") {
> +                   this.input.disabled = this.readonly;
> +               }
> +
>                  this.input.readOnly = this.readonly;
>                  if (this.calendarButton) {
>                          this.calendarButton.style.display =
> this.readonly ? "none" : "";
>
>
> So the checkbox is readonly, althought it isn't sent when submit (it
> isn't a problem for me).
>
> ¿Do you know a better way of forcing it?
>
>


------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
Xsltforms-support mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xsltforms-support

Reply via email to