2 //// Copyright (C) 2009 Aron Racho <aron@mi-squared.com>
4 // This program is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU General Public License
6 // as published by the Free Software Foundation; either version 2
8 include_once("../interface/globals.php");
9 require_once("../library/sql.inc");
14 <link rel
="stylesheet" href
="<?php echo $css_header;?>" type
="text/css">
15 <style type
="text/css">
19 padding
: 5px
3px
5px
3px
;
23 <script language
="javascript">
24 function doSelectorButton() {
25 var selector
= document
.getElementById('selectorButton');
27 if ( selector
.value
== "<?php xl('Select All','e'); ?>" ) {
28 selector
.value
= "<?php xl('Unselect All','e'); ?>";
31 selector
.value
= "<?php xl('Select All','e'); ?>";
34 var checkBoxes
= document
.getElementsByName( "searchFields" );
35 setAll( checkBoxes
, value
);
38 function setAll(field
, value
) {
39 for (i
= 0; i
< field
.length
; i++
) {
40 field
[i
].checked
= value
;
45 // buildup fieldstring
46 var checkBoxes
= document
.getElementsByName( "searchFields" );
48 for (i
= 0; i
< checkBoxes
.length
; i++
) {
49 if ( checkBoxes
[i
].checked
) {
50 if ( fieldString
!= '' ) {
53 fieldString +
= checkBoxes
[i
].value
;
56 if ( opener
!= null ) {
57 if ( fieldString
== '' || fieldString
== undefined
) {
58 alert("<?php xl('You must select some fields to continue.','e'); ?>");
61 opener
.processFilter( fieldString
);
72 <b
><?php
xl('Select Fields', 'e'); ?
>:</b
>
75 <input type
="button" value
="<?php xl('Submit','e'); ?>" id
="submit" onclick
="javascript:doSubmit();"></input
>
78 <input type
="button" value
="<?php xl('Select All','e'); ?>" id
="selectorButton" onclick
="javascript:doSelectorButton();"></input
>
84 $layoutCols = sqlStatement( "SELECT field_id, description, group_name "
85 . "FROM layout_options "
86 . "WHERE form_id='DEM' "
87 . "AND group_name not like ('%Employer%' ) AND uor !=0 "
88 . "ORDER BY group_name,seq"
95 for($iter=0; $row=sqlFetchArray($layoutCols); $iter++
) {
96 if ( $iter == 0 ||
($iter %
3 == 0) ) {
103 $fieldId = $row['field_id'];
104 $fieldTitle = $row['description'] ?
$row['description'] : $fieldId;
105 echo "<input type='checkbox' value='${fieldId}' name='searchFields'/> <b>" . xl_layout_label($fieldTitle) . "</b>";