2 if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3 /*********************************************************************************
4 * SugarCRM Community Edition is a customer relationship management program developed by
5 * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
7 * This program is free software; you can redistribute it and/or modify it under
8 * the terms of the GNU Affero General Public License version 3 as published by the
9 * Free Software Foundation with the addition of the following permission added
10 * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
11 * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
12 * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
14 * This program is distributed in the hope that it will be useful, but WITHOUT
15 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16 * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
19 * You should have received a copy of the GNU Affero General Public License along with
20 * this program; if not, see http://www.gnu.org/licenses or write to the Free
21 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
24 * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
25 * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
27 * The interactive user interfaces in modified source and object code versions
28 * of this program must display Appropriate Legal Notices, as required under
29 * Section 5 of the GNU Affero General Public License version 3.
31 * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
32 * these Appropriate Legal Notices must retain the display of the "Powered by
33 * SugarCRM" logo. If the display of the logo is not reasonably feasible for
34 * technical reasons, the Appropriate Legal Notices must display the words
35 * "Powered by SugarCRM".
36 ********************************************************************************/
38 /*********************************************************************************
40 * Description: TODO: To be written.
41 * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
42 * All Rights Reserved.
43 * Contributor(s): ______________________________________..
44 ********************************************************************************/
49 global $currentModule;
61 // focus_list is the means of passing data to a SubPanelView.
64 $button = "<table cellspacing='0' cellpadding='1' border='0'><form border='0' action='index.php' method='post' name='form' id='form'>\n";
65 $button .= "<input type='hidden' name='module' value='Contacts'>\n";
66 if ($currentModule == 'Accounts') $button .= "<input type='hidden' name='account_id' value='$focus->id'>\n<input type='hidden' name='account_name' value='$focus->name'>\n";
67 $button .= "<input type='hidden' name='return_module' value='".$currentModule."'>\n";
68 $button .= "<input type='hidden' name='return_action' value='".$action."'>\n";
69 $button .= "<input type='hidden' name='return_id' value='".$focus->id."'>\n";
70 $button .= "<input type='hidden' name='action'>\n";
71 $button .= "<tr><td> </td>";
72 if ($focus->parent_type == "Accounts") $button .= "<td><input title='".$app_strings['LBL_SELECT_CONTACT_BUTTON_TITLE']."' type='button' class='button' value='".$app_strings['LBL_SELECT_CONTACT_BUTTON_LABEL']."' name='button' LANGUAGE=javascript onclick='window.open(\"index.php?module=Contacts&action=Popup&html=Popup_picker&form=DetailView&form_submit=true&query=true&account_id=$focus->parent_id&account_name=".urlencode($focus->parent_name)."\",\"new\",\"width=600,height=400,resizable=1,scrollbars=1\");'></td>\n";
73 else $button .= "<td><input title='".$app_strings['LBL_SELECT_CONTACT_BUTTON_TITLE']."' type='button' class='button' value='".$app_strings['LBL_SELECT_CONTACT_BUTTON_LABEL']."' name='button' LANGUAGE=javascript onclick='window.open(\"index.php?module=Contacts&action=Popup&html=Popup_picker&form=DetailView&form_submit=true\",\"new\",\"width=600,height=400,resizable=1,scrollbars=1\");'></td>\n";
74 $button .= "<td><input title='".$app_strings['LBL_SELECT_USER_BUTTON_TITLE']."' type='button' class='button' value='".$app_strings['LBL_SELECT_USER_BUTTON_LABEL']."' name='button' LANGUAGE=javascript onclick='window.open(\"index.php?module=Users&action=Popup&html=Popup_picker&form=DetailView&form_submit=true\",\"new\",\"width=600,height=400,resizable=1,scrollbars=1\");'></td>\n";
75 $button .= "</tr></form></table>\n";
77 // Stick the form header out there.
78 echo get_form_header($mod_strings['LBL_INVITEE'], $button, false);
79 $xtpl=new XTemplate ('modules/Meetings/SubPanelViewInvitees.html');
80 $xtpl->assign("MOD", $mod_strings);
81 $xtpl->assign("APP", $app_strings);
82 $xtpl->assign("RETURN_URL", "&return_module=$currentModule&return_action=DetailView&return_id=$focus->id");
83 $xtpl->assign("MEETING_ID", $focus->id);
86 foreach($focus_users_list as $user)
89 'USER_NAME' => $user->user_name,
90 'FULL_NAME' => $locale->getLocaleFormattedName($user->first_name, $user->last_name),
92 'EMAIL' => $user->email1,
93 'PHONE_WORK' => $user->phone_work
96 $xtpl->assign("USER", $user_fields);
100 //todo move to themes
101 $xtpl->assign("ROW_COLOR", 'oddListRow');
105 //todo move to themes
106 $xtpl->assign("ROW_COLOR", 'evenListRow');
110 $xtpl->parse("users.row");
114 $xtpl->parse("users");
118 foreach($focus_contacts_list as $contact)
120 $contact_fields = array(
121 'FIRST_NAME' => $contact->first_name,
122 'LAST_NAME' => $contact->last_name,
123 'ACCOUNT_NAME' => $contact->account_name,
124 'ID' => $contact->id,
125 'EMAIL' => $contact->email1,
126 'PHONE_WORK' => $contact->phone_work
129 $xtpl->assign("CONTACT", $contact_fields);
133 //todo move to themes
134 $xtpl->assign("ROW_COLOR", 'oddListRow');
138 //todo move to themes
139 $xtpl->assign("ROW_COLOR", 'evenListRow');
143 $xtpl->parse("contacts.row");
147 $xtpl->parse("contacts");
148 $xtpl->out("contacts");