Added Spain and Latin American locales of Spanish
[openemr.git] / interface / super / show_groups_popup.php
blob290830d5e98023eac4d0010d11c70673e039dc55
1 <?php
2 /*
3 * This popup is called when choosing a group into which to move fields
4 */
6 include_once("../globals.php");
8 ?>
10 <html>
11 <head>
12 <?php html_header_show();?>
13 <title><?php xl('List groups','e'); ?></title>
14 <link rel="stylesheet" href='<?php echo $css_header ?>' type='text/css'>
16 <script type="text/javascript" src="<?php echo $GLOBALS['webroot'] ?>/library/js/jquery-1.2.2.min.js"></script>
18 <style>
19 h1 {
20 font-size: 120%;
21 padding: 3px;
22 margin: 3px;
24 ul {
25 list-style: none;
26 padding: 3px;
27 margin: 3px;
29 li {
30 cursor: pointer;
31 border-bottom: 1px solid #ccc;
32 background-color: white;
34 .highlight {
35 background-color: #336699;
36 color: white;
38 .translation {
39 color: green;
40 font-size:10pt;
42 </style>
44 </head>
46 <body class="body_top text">
47 <div id="groups">
48 <h1><?php xl('Layout groups','e'); ?></h1>
49 <ul>
50 <?php
51 $res = sqlStatement("SELECT distinct(group_name) FROM layout_options WHERE " .
52 "form_id = '".$_GET['layout_id']."' ORDER BY group_name");
53 while ($row = sqlFetchArray($res)) {
54 $gname = preg_replace("/^\d+/", "", $row['group_name']);
55 $xlgname = "";
56 if ($GLOBALS['translate_layout'] && $_SESSION['language_choice'] > 1) {
57 $xlgname = "<span class='translation'>>>&nbsp; " . xl($gname) . "</span>";
59 echo "<li id='".$row['group_name']."' class='oneresult'> $gname $xlgname </li>";
62 </ul>
63 </div>
64 </body>
66 <script language="javascript">
68 // jQuery stuff to make the page a little easier to use
70 $(document).ready(function(){
71 $(".oneresult").mouseover(function() { $(this).toggleClass("highlight"); });
72 $(".oneresult").mouseout(function() { $(this).toggleClass("highlight"); });
73 $(".oneresult").click(function() { SelectItem(this); });
75 var SelectItem = function(obj) {
76 var groupname = $(obj).attr("id");
77 if (opener.closed)
78 alert('The destination form was closed; I cannot act on your selection.');
79 else
80 opener.MoveFields(groupname);
81 window.close();
82 return false;
85 });
87 </script>
89 </html>