Rev 15186 | Rev 15342 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 15186 | Rev 15341 | ||
---|---|---|---|
Line 482... | Line 482... | ||
482 | !distribute item 1,1 into cntr,cntc |
482 | !distribute item 1,1 into cntr,cntc |
483 | form_=document.forms['replyform'] |
483 | form_=document.forms['replyform'] |
484 | !for t in $ansorder |
484 | !for t in $ansorder |
485 | !if $oefsteps=$empty or $t$(cnt$t) isitemof $thisstep |
485 | !if $oefsteps=$empty or $t$(cnt$t) isitemof $thisstep |
486 | !if $t=r |
486 | !if $t=r |
487 | !if $(replytype$(cnt$t)) notwordof |
487 | !if $(replytype$(cnt$t)) notwordof checkbox |
488 | defaultest=!getopt default in $(replyoption$(cnt$t)) |
488 | defaultest=!getopt default in $(replyoption$(cnt$t)) |
489 | !if $defaultest=$empty |
489 | !if $defaultest=$empty |
490 | wims_form_lock=!append line if($form_.reply$(cnt$t).value.length==0) return emptyfield(); to $wims_form_lock |
490 | wims_form_lock=!append line if($form_.reply$(cnt$t).value.length==0) return emptyfield(); to $wims_form_lock |
491 | !else |
491 | !else |
492 | !if nocheck notwordof $(replyoption$(cnt$t)) |
492 | !if nocheck notwordof $(replyoption$(cnt$t)) |
493 | wims_form_lock=!append line if($form_.reply$(cnt$t).value.length==0) nb_default+=1; to $wims_form_lock |
493 | wims_form_lock=!append line if($form_.reply$(cnt$t).value.length==0) nb_default+=1; to $wims_form_lock |
494 | !endif |
494 | !endif |
495 | !endif |
495 | !endif |
- | 496 | !else |
|
- | 497 | !! test for checkboxes |
|
- | 498 | wims_form_lock=!append line if(verify_checkboxes('reply$(cnt$t)')==null) return emptyfield(); to $wims_form_lock |
|
496 | !endif |
499 | !endif |
497 | !else |
- | |
498 | !! wims_form_lock=!append line if($form_.choice$(cnt$t).value=="0") return emptyfield(); to $wims_form_lock |
- | |
499 | !endif |
500 | !endif |
500 | !endif |
501 | !endif |
501 | !advance cnt$t |
502 | !advance cnt$t |
502 | !next t |
503 | !next t |
503 | header_js=<script>\ |
504 | header_js=<script>\ |
Line 506... | Line 507... | ||
506 | }\ |
507 | }\ |
507 | function formcheck() {\ |
508 | function formcheck() {\ |
508 | var nb_default=0;\ |
509 | var nb_default=0;\ |
509 | $wims_form_lock\ |
510 | $wims_form_lock\ |
510 | if(nb_default>0){\ |
511 | if(nb_default>0){\ |
511 | if("jQuery" in window){jQuery("#exo_formCheck"). |
512 | if("jQuery" in window){jQuery("#exo_formCheck").foundation('open');return false;}\ |
- | 513 | {return window.confirm("$name_exo_form_check");}\ |
|
512 | }\ |
514 | }\ |
513 | return true;\ |
515 | return true;\ |
- | 516 | }\ |
|
- | 517 | function verify_checkboxes(box_name) {\ |
|
- | 518 | var checkedValue = null;\ |
|
- | 519 | var inputElements = document.getElementsByName(box_name);\ |
|
- | 520 | for(var i=0; inputElements[i]; ++i){\ |
|
- | 521 | if(inputElements[i].checked){\ |
|
- | 522 | checkedValue = inputElements[i].value;\ |
|
- | 523 | break;\ |
|
- | 524 | }\ |
|
- | 525 | }\ |
|
- | 526 | return checkedValue;\ |
|
514 | }\ |
527 | }\ |
515 | </script> |
528 | </script> |
516 | !endif |
529 | !endif |
517 | 530 | ||
518 | savedrawcnt=0 |
531 | savedrawcnt=0 |