Index: branches/salvatoreingala/Gadgets/ui/resources/jquery.formBuilder.js |
— | — | @@ -534,11 +534,15 @@ |
535 | 535 | } |
536 | 536 | |
537 | 537 | var $form = $( '<form/>' ).addClass( 'formbuilder' ); |
| 538 | + var prefix = options.gadget === undefined ? '' : ( 'Gadget-' + options.gadget + '-' ); |
| 539 | + $form.data( 'formBuilder', { |
| 540 | + prefix: prefix, //prefix for messages |
| 541 | + } ); |
538 | 542 | |
539 | 543 | //If there is an "intro", adds it to the form as a label |
540 | 544 | if ( typeof description.intro == 'string' ) { |
541 | 545 | $( '<p/>' ) |
542 | | - .text( preproc( this.$form, description.intro ) ) |
| 546 | + .text( preproc( $form, description.intro ) ) |
543 | 547 | .addClass( 'formBuilder-intro' ) |
544 | 548 | .appendTo( $form ); |
545 | 549 | } |
— | — | @@ -548,11 +552,6 @@ |
549 | 553 | return null; |
550 | 554 | } |
551 | 555 | |
552 | | - var prefix = options.gadget === undefined ? '' : ( 'Gadget-' + options.gadget + '-' ); |
553 | | - $form.data( 'formBuilder', { |
554 | | - prefix: prefix, //prefix for messages |
555 | | - } ); |
556 | | - |
557 | 556 | var fields = []; |
558 | 557 | |
559 | 558 | var settings = {}; //validator settings |