From 51191eec4f163bd38beefdd005e9e628e057efa2 Mon Sep 17 00:00:00 2001 From: james Date: Thu, 8 Oct 2009 19:13:14 +0000 Subject: [PATCH] Add donor name above tabs on editor Add fundraising module setup tab Add select's for campaign type and for salutation Other misc fixes --- admin/donors.php | 36 +++++++++++++------ admin/fundraising_campaigns.php | 16 +++++++-- admin/fundraising_common.inc.php | 5 +++ admin/fundraising_setup.php | 62 ++++++++++++++++++++++++++++++++ 4 files changed, 106 insertions(+), 13 deletions(-) create mode 100644 admin/fundraising_common.inc.php diff --git a/admin/donors.php b/admin/donors.php index 1742523..fe68070 100644 --- a/admin/donors.php +++ b/admin/donors.php @@ -25,6 +25,8 @@ require("../common.inc.php"); require_once("../user.inc.php"); user_auth_required('committee', 'admin'); +require_once("fundraising_common.inc.php"); + switch($_GET['action']) { case 'organizationinfo_load': @@ -47,6 +49,7 @@ switch($_GET['action']) { $exec="UPDATE sponsors SET ". "organization='".mysql_escape_string(stripslashes($_POST['organization']))."', ". "address='".mysql_escape_string(stripslashes($_POST['address']))."', ". + "address2='".mysql_escape_string(stripslashes($_POST['address2']))."', ". "city='".mysql_escape_string(stripslashes($_POST['city']))."', ". "province_code='".mysql_escape_string(stripslashes($_POST['province_code']))."', ". "postalcode='".mysql_escape_string(stripslashes($_POST['postalcode']))."', ". @@ -66,7 +69,8 @@ switch($_GET['action']) { //FIXME accept the logo //"logo='".mysql_escape_string(stripslashes($_POST['logo']))."', ". //($comment , $donorId, $userId, $type, $campaign_id=null){ - save_activityinfo("Updated organization info for {$_POST['organization']}", $id, $_SESSION['user_uid'],"System"); + save_activityinfo("Updated donor/sponsor details", $id, $_SESSION['users_uid'],"System"); + happy_("Donor/Sponsor Details saved"); } exit; break; @@ -270,6 +274,7 @@ function draw_contactsinfo_form($contact = null){ // draw a form in which to enter information about the various contacts function draw_contact_form($sponsor_id, $contact = null){ + global $salutations; if($contact != null){ $id = $contact["id"]; }else{ @@ -287,7 +292,17 @@ function draw_contact_form($sponsor_id, $contact = null){ - + @@ -410,10 +425,8 @@ function draw_activityinfo_form(){ @@ -522,12 +534,14 @@ function update_organizationinfo() $.getJSON("?action=organizationinfo_load&id="+id, function(json){ + $("#donor_name").html("

"+json.organization+"

"); $("#sponsor_id").val(json.id); $("#organizationinfo_organization").val(json.organization); $("#organizationinfo_address").val(json.address); + $("#organizationinfo_address2").val(json.address2); $("#organizationinfo_city").val(json.city); $("#organizationinfo_province_code").val(json.province_code); - $("#organizationinfo_postalcodd").val(json.postalcode); + $("#organizationinfo_postalcode").val(json.postalcode); $("#organizationinfo_phone").val(json.phone); $("#organizationinfo_tollfree").val(json.tollfree); $("#organizationinfo_fax").val(json.fax); @@ -653,8 +667,8 @@ echo ""; echo "
+ +
"; echo "
"; ?> -