hide the list of donors after finding one

starting a form for adding contacts
This commit is contained in:
jacob 2009-10-02 13:32:21 +00:00
parent 1df3acd13d
commit 55751e5da8

View File

@ -78,6 +78,87 @@
break;
case 'contactsinfo_load':
draw_contactsinfo_form();
exit;
break;
case 'contactsinfo_save':
$u = user_create('sponsor', $_POST['email']);
$u['salutation']=$_POST['salutation'];
$u['firstname']=$_POST['firstname'];
$u['lastname']=$_POST['lastname'];
$u['position']=$_POST['position'];
$u['phonework']=$_POST['phonework'];
$u['phonecell']=$_POST['phonecell'];
$u['phonehome']=$_POST['phonehome'];
$u['fax']=$_POST['fax'];
$u['email']=$_POST['email'];
// $u['notes']=$_POST['notes'];
// $u['sponsors_id']=$sponsors_id;
user_save($u);
// happy_("happy!");
exit;
break;
}
send_header("Donor Management",
array('Committee Main' => 'committee_main.php',
'Administration' => 'admin/index.php',
'Fundraising' => 'admin/fundraising.php')
);
function draw_contactsinfo_form(){
// use a basic form for now and beautify later
?>
<form id="createcontact" method="post" action="donors.php">
<table class="editor"><tr>
<td><?=i18n("First Name") ?></td>
<td><input type="text" name="firstname" /></td>
<td><?=i18n("Last Name") ?></td>
<td><input type="text" name="lastname" /></td>
<td><?=i18n("Email") ?></td>
<td><input type="text" name="email" /></td>
</tr><tr>
<td><?=i18n("Home Phone") ?></td>
<td><input type="text" name="phonehome" /></td>
<td><?=i18n("Work Phone") ?></td>
<td><input type="text" name="phonework" /></td>
<td><?=i18n("Cell Phone") ?></td>
<td><input type="text" name="phonecell" /></td>
</tr><tr>
<td><?=i18n("Fax") ?></td>
<td><input type="text" name="fax" /></td>
<td><?=i18n("Position") ?></td>
<td><input type="text" name="position" /></td>
<td><?=i18n("Salutation") ?></td>
<td><input type="text" name="salutation" /></td>
<?php /*
</tr><tr>
<td><?=i18n("Username") ?></td>
<td><input type="text" name="username" /></td>
<td><?=i18n("Organization") ?></td>
<td><input type="text" name="organization" /></td>
<td><?=i18n("") ?></td>
<td><input type="text" name="" /></td>
</tr><tr>
<td><?=i18n("") ?></td>
<td><input type="text" name="" /></td>
<td><?=i18n("") ?></td>
<td><input type="text" name="" /></td>
<td><?=i18n("") ?></td>
<td><input type="text" name="" /></td>
*/ ?>
</tr><tr>
<td colspan="6">
<input type="submit" value="<?=i18n("Save") ?>" onClick="return contactsinfo_save()" />
</tr></table>
</form>
<?php
/*
$sponsors_id=intval($_GET['id']);
$q=mysql_query("SELECT id,
uid,
@ -140,17 +221,9 @@
echo "</tr>\n";
}
echo "</table>\n";
exit;
break;
*/
}
send_header("Donor Management",
array('Committee Main' => 'committee_main.php',
'Administration' => 'admin/index.php',
'Fundraising' => 'admin/fundraising.php')
);
?>
<script type="text/javascript">
/* Setup the popup window */
@ -189,11 +262,11 @@ $(document).ready(function() {
var sponsor_id=0;
function open_editor(id) {
sponsor_id=id;
$("#donor_editor").show();
$("#searchbrowse").hide();
$("#searchresults").hide();
if(id==-1) {
$('#editor_tabs').tabs('option', 'selected', 0);