Skip to content

Commit

Permalink
added calendar checkbox and changed Authorized to Provider
Browse files Browse the repository at this point in the history
  • Loading branch information
sunsetsystems committed Jul 20, 2009
1 parent 14799ca commit 083ae77
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 4 deletions.
24 changes: 21 additions & 3 deletions interface/usergroup/user_admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,10 @@

$tqvar = $_GET["authorized"] ? 1 : 0;
$actvar = $_GET["active"] ? 1 : 0;
$calvar = $_GET["calendar"] ? 1 : 0;

sqlStatement("UPDATE users SET authorized = $tqvar, active = $actvar, " .
"see_auth = '" . $_GET['see_auth'] . "' WHERE " .
"calendar = $calvar, see_auth = '" . $_GET['see_auth'] . "' WHERE " .
"id = {$_GET["id"]}");

if ($_GET["comments"]) {
Expand Down Expand Up @@ -134,6 +135,16 @@

<link rel="stylesheet" href="<?php echo $css_header; ?>" type="text/css">

<script language="JavaScript">

function authorized_clicked() {
var f = document.forms[0];
f.calendar.disabled = !f.authorized.checked;
f.calendar.checked = f.authorized.checked;
}

</script>

</head>
<body class="body_top">

Expand All @@ -149,9 +160,16 @@

<TR>
<td><span class="text">&nbsp;</span></td><td>&nbsp;</td>
<TD><span class=text><?php xl('Authorized','e'); ?>: </TD>
<TD><span class=text><?php xl('Provider','e'); ?>: </TD>
<TD>
<input type="checkbox" name="authorized"<?php if ($iter["authorized"]) echo " checked"; ?> />
<input type="checkbox" name="authorized" onclick="authorized_clicked()"<?php
if ($iter["authorized"]) echo " checked"; ?> />

&nbsp;&nbsp;<span class='text'><?php xl('Calendar','e'); ?>:
<input type="checkbox" name="calendar"<?php
if ($iter["calendar"]) echo " checked";
if (!$iter["authorized"]) echo " disabled"; ?> />

&nbsp;&nbsp;<span class='text'><?php xl('Active','e'); ?>:
<input type="checkbox" name="active"<?php if ($iter["active"]) echo " checked"; ?> />
</TD>
Expand Down
19 changes: 18 additions & 1 deletion interface/usergroup/usergroup_admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
}
// $_POST["info"] = addslashes($_POST["info"]);

$calvar = $_POST["calendar"] ? 1 : 0;

$res = sqlStatement("select distinct username from users where username != ''");
$doit = true;
while ($row = mysql_fetch_array($res)) {
Expand All @@ -40,6 +42,7 @@
"', facility = '" . trim(formData('facility' )) .
"', specialty = '" . trim(formData('specialty' )) .
"', see_auth = '" . trim(formData('see_auth' )) .
"', calendar = '" . $calvar .
"'");
sqlStatement("insert into groups set name = '" . trim(formData('groupname')) .
"', user = '" . trim(formData('rumple')) . "'");
Expand Down Expand Up @@ -126,6 +129,16 @@

<link rel="stylesheet" href="<?php echo $css_header;?>" type="text/css">

<script language="JavaScript">

function authorized_clicked() {
var f = document.forms[0];
f.calendar.disabled = !f.authorized.checked;
f.calendar.checked = f.authorized.checked;
}

</script>

</head>
<body class="body_top">

Expand Down Expand Up @@ -159,7 +172,11 @@
}
?>
</select></td>
<td><span class="text"><?php xl('Authorized','e'); ?>: </span></td><td><input type=checkbox name='authorized' value="1"></td>
<td><span class="text"><?php xl('Provider','e'); ?>: </span></td><td>
<input type='checkbox' name='authorized' value='1' onclick='authorized_clicked()' />
&nbsp;&nbsp;<span class='text'><?php xl('Calendar','e'); ?>:
<input type='checkbox' name='calendar' disabled />
</td>
</tr>
<tr>
<td><span class="text"><?php xl('First Name','e'); ?>: </span></td><td><input type=entry name='fname' size=20></td>
Expand Down

0 comments on commit 083ae77

Please sign in to comment.