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-2011 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: Call Form Base
41 * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
42 * All Rights Reserved.
43 * Contributor(s): ______________________________________..
44 ********************************************************************************/
46 require_once('include/SugarObjects/forms/FormBase.php');
48 class CallFormBase extends FormBase {
50 function getFormBody($prefix, $mod='', $formname='',$cal_date='',$cal_time=''){
51 if(!ACLController::checkAccess('Calls', 'edit', true)){
55 $temp_strings = $mod_strings;
57 global $current_language;
58 $mod_strings = return_module_language($current_language, $mod);
61 global $app_list_strings;
66 $lbl_subject = $mod_strings['LBL_SUBJECT'];
67 // Unimplemented until jscalendar language files are fixed
68 // global $current_language;
69 // global $default_language;
71 // Unimplemented until jscalendar language files are fixed
72 // $cal_lang = (empty($cal_codes[$current_language])) ? $cal_codes[$default_language] : $cal_codes[$current_language];
76 $cal_dateformat = $timedate->get_cal_date_format();
78 $lbl_required_symbol = $app_strings['LBL_REQUIRED_SYMBOL'];
79 $lbl_date = $mod_strings['LBL_DATE'];
80 $lbl_time = $mod_strings['LBL_TIME'];
81 $ntc_date_format = $timedate->get_user_date_format();
82 $ntc_time_format = '('.$timedate->get_user_time_format().')';
84 $user_id = $current_user->id;
85 $default_status = $app_list_strings['call_status_default'];
86 $default_parent_type= $app_list_strings['record_type_default_key'];
87 $date = TimeDate::getInstance()->nowDb();
88 $default_date_start = $timedate->to_display_date($date,false);
89 $default_time_start = $timedate->to_display_time($date);
90 $time_ampm = $timedate->AMPMMenu($prefix,$default_time_start);
91 $lbl_save_button_title = $app_strings['LBL_SAVE_BUTTON_TITLE'];
92 $lbl_save_button_key = $app_strings['LBL_SAVE_BUTTON_KEY'];
93 $lbl_save_button_label = $app_strings['LBL_SAVE_BUTTON_LABEL'];
95 <form name="${formname}" onSubmit="return check_form('${formname}') "method="POST" action="index.php">
96 <input type="hidden" name="${prefix}module" value="Calls">
97 <input type="hidden" name="${prefix}action" value="Save">
98 <input type="hidden" name="${prefix}record" value="">
99 <input type="hidden" name="${prefix}direction" value="Outbound">
100 <input type="hidden" name="${prefix}status" value="${default_status}">
101 <input type="hidden" name="${prefix}parent_type" value="${default_parent_type}">
102 <input type="hidden" name="${prefix}assigned_user_id" value='${user_id}'>
103 <input type="hidden" name="${prefix}duration_hours" value="1">
104 <input type="hidden" name="${prefix}duration_minutes" value="0">
105 <input type="hidden" name="${prefix}user_id" value="${user_id}">
107 <table cellspacing="1" cellpadding="0" border="0">
109 <td colspan="2"><input type='radio' name='appointment' value='Call' class='radio' onchange='document.${formname}.module.value="Calls";' style='vertical-align: middle;' checked> <span scope="row">${mod_strings['LNK_NEW_CALL']}</span>
112 <input type='radio' name='appointment' value='Meeting' class='radio' onchange='document.${formname}.module.value="Meetings";'><span scope="row">${mod_strings['LNK_NEW_MEETING']}</span></td>
115 <td colspan="2"><span scope="row">$lbl_subject</span> <span class="required">$lbl_required_symbol</span></td>
117 <tr><td valign=top><input name='${prefix}name' size='30' maxlength='255' type="text"></td>
118 <td><input name='${prefix}date_start' id='${formname}jscal_field' maxlength='10' type="hidden" value="${cal_date}"></td>
119 <td><input name='${prefix}time_start' type="hidden" maxlength='10' value="{$cal_time}"></td>
121 <script type="text/javascript">
123 // inputField : "${formname}jscal_field", daFormat : "$cal_dateformat" ifFormat : "$cal_dateformat", showsTime : false, button : "${formname}jscal_trigger", singleClick : true, step : 1, weekNumbers:false
133 $javascript = new javascript();
134 $javascript->setFormName($formname);
135 $javascript->setSugarBean(new Call());
136 $javascript->addRequiredFields($prefix);
137 $form .=$javascript->getScript();
138 $form .= "<td align=\"left\" valign=top><input title='$lbl_save_button_title' accessKey='$lbl_save_button_key' class='button' type='submit' name='button' value=' $lbl_save_button_label ' ></td></tr></table></form>";
139 $mod_strings = $temp_strings;
143 function getFormHeader($prefix, $mod='', $title=''){
144 if(!ACLController::checkAccess('Calls', 'edit', true)){
148 global $current_language;
149 $mod_strings = return_module_language($current_language, $mod);
150 }else global $mod_strings;
158 $the_form = get_left_form_header($title);
160 $the_form = get_left_form_header($mod_strings['LBL_NEW_FORM_TITLE']);
163 <form name="${prefix}CallSave" onSubmit="return check_form('${prefix}CallSave') "method="POST" action="index.php">
164 <input type="hidden" name="${prefix}module" value="Calls">
165 <input type="hidden" name="${prefix}action" value="Save">
170 function getFormFooter($prefic, $mod=''){
171 if(!ACLController::checkAccess('Calls', 'edit', true)){
175 global $app_list_strings;
176 $lbl_save_button_title = $app_strings['LBL_SAVE_BUTTON_TITLE'];
177 $lbl_save_button_key = $app_strings['LBL_SAVE_BUTTON_KEY'];
178 $lbl_save_button_label = $app_strings['LBL_SAVE_BUTTON_LABEL'];
179 $the_form = " <p><input title='$lbl_save_button_title' accessKey='$lbl_save_button_key' class='button' type='submit' name='button' value=' $lbl_save_button_label ' ></p></form>";
180 $the_form .= get_left_form_footer();
181 $the_form .= get_validate_record_js();
185 function getForm($prefix, $mod=''){
186 if(!ACLController::checkAccess('Calls', 'edit', true)){
189 $the_form = $this->getFormHeader($prefix, $mod);
190 $the_form .= $this->getFormBody($prefix, $mod, "${prefix}CallSave");
191 $the_form .= $this->getFormFooter($prefix, $mod);
197 function handleSave($prefix,$redirect=true,$useRequired=false) {
200 require_once('include/formbase.php');
202 global $current_user;
206 if (isset($_POST[$prefix.'duration_hours'])){
207 $_POST[$prefix.'duration_hours'] = trim($_POST[$prefix.'duration_hours']);
212 if($useRequired && !checkRequired($prefix, array_keys($focus->required_fields))) {
215 if ( !isset($_POST[$prefix.'reminder_checked']) or ($_POST[$prefix.'reminder_checked'] == 0)) {
216 $GLOBALS['log']->debug(__FILE__.'('.__LINE__.'): No reminder checked, resetting the reminder_time');
217 $_POST[$prefix.'reminder_time'] = -1;
220 if(!isset($_POST[$prefix.'reminder_time'])) {
221 $GLOBALS['log']->debug(__FILE__.'('.__LINE__.'): Getting the users default reminder time');
222 $_POST[$prefix.'reminder_time'] = $current_user->getPreference('reminder_time');
225 $time_format = $timedate->get_user_time_format();
226 $time_separator = ":";
227 if(preg_match('/\d+([^\d])\d+([^\d]*)/s', $time_format, $match)) {
228 $time_separator = $match[1];
231 if(!empty($_POST[$prefix.'time_hour_start']) && empty($_POST[$prefix.'time_start'])) {
232 $_POST[$prefix.'time_start'] = $_POST[$prefix.'time_hour_start']. $time_separator .$_POST[$prefix.'time_minute_start'];
235 if(isset($_POST[$prefix.'meridiem']) && !empty($_POST[$prefix.'meridiem'])) {
236 $_POST[$prefix.'time_start'] = $timedate->merge_time_meridiem($_POST[$prefix.'time_start'],$timedate->get_time_format(), $_POST[$prefix.'meridiem']);
239 if(isset($_POST[$prefix.'time_start']) && strlen($_POST[$prefix.'date_start']) == 10) {
240 $_POST[$prefix.'date_start'] = $_POST[$prefix.'date_start'] . ' ' . $_POST[$prefix.'time_start'];
243 // retrieve happens here
244 $focus = populateFromPost($prefix, $focus);
245 if(!$focus->ACLAccess('Save')) {
246 ACLController::displayNoAccess(true);
250 //add assigned user and current user if this is the first time bean is saved
251 if(empty($focus->id) && !empty($_REQUEST['return_module']) && $_REQUEST['return_module'] =='Calls' && !empty($_REQUEST['return_action']) && $_REQUEST['return_action'] =='DetailView'){
252 //if return action is set to detail view and return module to call, then this is from the long form, do not add the assigned user (only the current user)
253 //The current user is already added to UI and we want to give the current user the option of opting out of meeting.
254 if($current_user->id != $_POST['assigned_user_id']){
255 $_POST['user_invitees'] .= ','.$_POST['assigned_user_id'].', ';
256 $_POST['user_invitees'] = str_replace(',,', ',', $_POST['user_invitees']);
258 }elseif (empty($focus->id) ){
259 //this is not from long form so add assigned and current user automatically as there is no invitee list UI.
260 //This call could be through an ajax call from subpanels or shortcut bar
261 $_POST['user_invitees'] .= ','.$_POST['assigned_user_id'].', ';
263 //add current user if the assigned to user is different than current user.
264 if($current_user->id != $_POST['assigned_user_id']){
265 $_POST['user_invitees'] .= ','.$current_user->id.', ';
268 //remove any double comma's introduced during appending
269 $_POST['user_invitees'] = str_replace(',,', ',', $_POST['user_invitees']);
272 if( (isset($_POST['isSaveFromDetailView']) && $_POST['isSaveFromDetailView'] == 'true') ||
273 (isset($_POST['is_ajax_call']) && !empty($_POST['is_ajax_call']) && !empty($focus->id))
276 $return_id = $focus->id;
279 if($focus->status == 'Held' && $this->isEmptyReturnModuleAndAction() && !$this->isSaveFromDCMenu()){
280 //if we are closing the meeting, and the request does not have a return module AND return action set and it is not a save
281 //being triggered by the DCMenu (shortcut bar) then the request is coming from a dashlet or subpanel close icon and there is no
282 //need to process user invitees, just save the current values.
285 ///////////////////////////////////////////////////////////////////////////
286 //// REMOVE INVITEE RELATIONSHIPS
287 if(!empty($_POST['user_invitees'])) {
288 $userInvitees = explode(',', trim($_POST['user_invitees'], ','));
290 $userInvitees = array();
293 // Calculate which users to flag as deleted and which to add
294 $deleteUsers = array();
295 $focus->load_relationship('users');
296 // Get all users for the call
297 $q = 'SELECT mu.user_id, mu.accept_status FROM calls_users mu WHERE mu.call_id = \''.$focus->id.'\'';
298 $r = $focus->db->query($q);
299 $acceptStatusUsers = array();
300 while($a = $focus->db->fetchByAssoc($r)) {
301 if(!in_array($a['user_id'], $userInvitees)) {
302 $deleteUsers[$a['user_id']] = $a['user_id'];
304 $acceptStatusUsers[$a['user_id']] = $a['accept_status'];
308 if(count($deleteUsers) > 0) {
310 foreach($deleteUsers as $u) {
311 $sql .= ",'" . $u . "'";
314 $sql = substr($sql, 1);
315 // We could run a delete SQL statement here, but will just mark as deleted instead
316 $sql = "UPDATE calls_users set deleted = 1 where user_id in ($sql) AND call_id = '". $focus->id . "'";
317 $focus->db->query($sql);
320 // Get all contacts for the call
321 if(!empty($_POST['contact_invitees'])) {
322 $contactInvitees = explode(',', trim($_POST['contact_invitees'], ','));
324 $contactInvitees = array();
327 $deleteContacts = array();
328 $focus->load_relationship('contacts');
329 $q = 'SELECT mu.contact_id, mu.accept_status FROM calls_contacts mu WHERE mu.call_id = \''.$focus->id.'\'';
330 $r = $focus->db->query($q);
331 $acceptStatusContacts = array();
332 while($a = $focus->db->fetchByAssoc($r)) {
333 if(!in_array($a['contact_id'], $contactInvitees)) {
334 $deleteContacts[$a['contact_id']] = $a['contact_id'];
336 $acceptStatusContacts[$a['contact_id']] = $a['accept_status'];
340 if(count($deleteContacts) > 0) {
342 foreach($deleteContacts as $u) {
343 $sql .= ",'" . $u . "'";
345 $sql = substr($sql, 1);
346 // We could run a delete SQL statement here, but will just mark as deleted instead
347 $sql = "UPDATE calls_contacts set deleted = 1 where contact_id in ($sql) AND call_id = '". $focus->id . "'";
348 $focus->db->query($sql);
350 if(!empty($_POST['lead_invitees'])) {
351 $leadInvitees = explode(',', trim($_POST['lead_invitees'], ','));
353 $leadInvitees = array();
356 // Calculate which leads to flag as deleted and which to add
357 $deleteLeads = array();
358 $focus->load_relationship('leads');
359 // Get all leads for the call
360 $q = 'SELECT mu.lead_id, mu.accept_status FROM calls_leads mu WHERE mu.call_id = \''.$focus->id.'\'';
361 $r = $focus->db->query($q);
362 $acceptStatusLeads = array();
363 while($a = $focus->db->fetchByAssoc($r)) {
364 if(!in_array($a['lead_id'], $leadInvitees)) {
365 $deleteLeads[$a['lead_id']] = $a['lead_id'];
367 $acceptStatusLeads[$a['user_id']] = $a['accept_status'];
371 if(count($deleteLeads) > 0) {
373 foreach($deleteLeads as $u) {
374 // make sure we don't delete the assigned user
375 if ( $u != $focus->assigned_user_id )
376 $sql .= ",'" . $u . "'";
378 $sql = substr($sql, 1);
379 // We could run a delete SQL statement here, but will just mark as deleted instead
380 $sql = "UPDATE calls_leads set deleted = 1 where lead_id in ($sql) AND call_id = '". $focus->id . "'";
381 $focus->db->query($sql);
384 ///////////////////////////////////////////////////////////////////////////
387 ///////////////////////////////////////////////////////////////////////////
388 //// REBUILD INVITEE RELATIONSHIPS
389 $focus->users_arr = array();
390 $focus->users_arr = $userInvitees;
391 $focus->contacts_arr = array();
392 $focus->contacts_arr = $contactInvitees;
393 $focus->leads_arr = array();
394 $focus->leads_arr = $leadInvitees;
395 if(!empty($_POST['parent_id']) && $_POST['parent_type'] == 'Contacts') {
396 $focus->contacts_arr[] = $_POST['parent_id'];
398 if(!empty($_POST['parent_id']) && $_POST['parent_type'] == 'Leads') {
399 $focus->leads_arr[] = $_POST['parent_id'];
401 // Call the Call module's save function to handle saving other fields besides
402 // the users and contacts relationships
404 $return_id = $focus->id;
407 $existing_users = array();
408 if(!empty($_POST['existing_invitees'])) {
409 $existing_users = explode(",", trim($_POST['existing_invitees'], ','));
412 foreach($focus->users_arr as $user_id) {
413 if(empty($user_id) || isset($existing_users[$user_id]) || isset($deleteUsers[$user_id])) {
417 if(!isset($acceptStatusUsers[$user_id])) {
418 $focus->load_relationship('users');
419 $focus->users->add($user_id);
421 // update query to preserve accept_status
422 $qU = 'UPDATE calls_users SET deleted = 0, accept_status = \''.$acceptStatusUsers[$user_id].'\' ';
423 $qU .= 'WHERE call_id = \''.$focus->id.'\' ';
424 $qU .= 'AND user_id = \''.$user_id.'\'';
425 $focus->db->query($qU);
430 $existing_contacts = array();
431 if(!empty($_POST['existing_contact_invitees'])) {
432 $existing_contacts = explode(",", trim($_POST['existing_contact_invitees'], ','));
435 foreach($focus->contacts_arr as $contact_id) {
436 if(empty($contact_id) || isset($existing_contacts[$contact_id]) || (isset($deleteContacts[$contact_id]) && $contact_id != $_POST['parent_id'])) {
440 if(!isset($acceptStatusContacts[$contact_id])) {
441 $focus->load_relationship('contacts');
442 $focus->contacts->add($contact_id);
444 // update query to preserve accept_status
445 $qU = 'UPDATE calls_contacts SET deleted = 0, accept_status = \''.$acceptStatusContacts[$contact_id].'\' ';
446 $qU .= 'WHERE call_id = \''.$focus->id.'\' ';
447 $qU .= 'AND contact_id = \''.$contact_id.'\'';
448 $focus->db->query($qU);
452 $existing_leads = array();
453 if(!empty($_POST['existing_lead_invitees'])) {
454 $existing_leads = explode(",", trim($_POST['existing_lead_invitees'], ','));
457 foreach($focus->leads_arr as $lead_id) {
458 if(empty($lead_id) || isset($existing_leads[$lead_id]) || (isset($deleteLeads[$lead_id]) && $lead_id != $_POST['parent_id'])) {
462 if(!isset($acceptStatusLeads[$lead_id])) {
463 $focus->load_relationship('leads');
464 $focus->leads->add($lead_id);
466 // update query to preserve accept_status
467 $qU = 'UPDATE calls_leads SET deleted = 0, accept_status = \''.$acceptStatusLeads[$lead_id].'\' ';
468 $qU .= 'WHERE call_id = \''.$focus->id.'\' ';
469 $qU .= 'AND lead_id = \''.$lead_id.'\'';
470 $focus->db->query($qU);
474 // CCL - Comment out call to set $current_user as invitee
475 //set organizer to auto-accept
476 //$focus->set_accept_status($current_user, 'accept');
478 //// END REBUILD INVITEE RELATIONSHIPS
479 ///////////////////////////////////////////////////////////////////////////
482 if (isset($_REQUEST['return_module']) && $_REQUEST['return_module'] == 'Home'){
483 $_REQUEST['return_action'] = 'index';
484 handleRedirect('', 'Home');
487 handleRedirect($return_id, 'Calls');
492 } // end handleSave();
494 function getWideFormBody ($prefix, $mod='', $formname='', $wide =true){
495 if(!ACLController::checkAccess('Calls', 'edit', true)){
499 $temp_strings = $mod_strings;
501 global $current_language;
502 $mod_strings = return_module_language($current_language, $mod);
505 global $app_list_strings;
506 global $current_user;
509 $lbl_subject = $mod_strings['LBL_SUBJECT'];
510 // Unimplemented until jscalendar language files are fixed
511 // global $current_language;
512 // global $default_language;
513 // global $cal_codes;
514 // Unimplemented until jscalendar language files are fixed
515 // $cal_lang = (empty($cal_codes[$current_language])) ? $cal_codes[$default_language] : $cal_codes[$current_language];
519 $lbl_required_symbol = $app_strings['LBL_REQUIRED_SYMBOL'];
520 $lbl_date = $mod_strings['LBL_DATE'];
521 $lbl_time = $mod_strings['LBL_TIME'];
523 $ntc_date_format = '('.$timedate->get_user_date_format(). ')';
524 $ntc_time_format = '('.$timedate->get_user_time_format(). ')';
525 $cal_dateformat = $timedate->get_cal_date_format();
527 $user_id = $current_user->id;
528 $default_status = $app_list_strings['call_status_default'];
529 $default_parent_type= $app_list_strings['record_type_default_key'];
530 $date = TimeDate::getInstance()->nowDb();
531 $default_date_start = $timedate->to_display_date($date);
532 $default_time_start = $timedate->to_display_time($date,true);
533 $time_ampm = $timedate->AMPMMenu($prefix,$default_time_start);
535 <input type="hidden" name="${prefix}direction" value="Outbound">
536 <input type="hidden" name="${prefix}record" value="">
537 <input type="hidden" name="${prefix}status" value="${default_status}">
538 <input type="hidden" name="${prefix}parent_type" value="${default_parent_type}">
539 <input type="hidden" name="${prefix}assigned_user_id" value='${user_id}'>
540 <input type="hidden" name="${prefix}duration_hours" value="1">
541 <input type="hidden" name="${prefix}duration_minutes" value="0">
542 <input type="hidden" name="${prefix}user_id" value="${user_id}">
544 <table cellspacing='0' cellpadding='0' border='0' width="100%">
550 <td scope='row' width="20%"><input type='radio' name='appointment' value='Call' class='radio' checked> ${mod_strings['LNK_NEW_CALL']}</td>
551 <td scope='row' width="80%">${mod_strings['LBL_DESCRIPTION']}</td>
555 <td scope='row'><input type='radio' name='appointment' value='Meeting' class='radio'> ${mod_strings['LNK_NEW_MEETING']}</td>
557 <td rowspan='8' ><textarea name='Appointmentsdescription' cols='50' rows='5'></textarea></td>
562 <td scope='row' width="20%"><input type='radio' name='appointment' value='Call' class='radio' onchange='document.$formname.module.value="Calls";' checked> ${mod_strings['LNK_NEW_CALL']}</td>
566 <td scope='row'><input type='radio' name='appointment' value='Meeting' class='radio' onchange='document.$formname.module.value="Meetings";'> ${mod_strings['LNK_NEW_MEETING']}</td>
570 $jscalenderImage = SugarThemeRegistry::current()->getImageURL('jscalendar.gif');
575 <td scope='row'>$lbl_subject <span class="required">$lbl_required_symbol</span></td>
579 <td ><input name='${prefix}name' maxlength='255' type="text"></td>
583 <td scope='row'>$lbl_date <span class="required">$lbl_required_symbol</span> <span class="dateFormat">$ntc_date_format</span></td>
586 <td ><input onblur="parseDate(this, '$cal_dateformat');" name='${prefix}date_start' size="12" id='${prefix}jscal_field' maxlength='10' type="text" value="${default_date_start}"> <!--not_in_theme!--><img src="{$jscalenderImage}" alt="{$app_strings['LBL_ENTER_DATE']}" id="${prefix}jscal_trigger" align="absmiddle"></td>
590 <td scope='row'>$lbl_time <span class="required">$lbl_required_symbol</span> <span class="dateFormat">$ntc_time_format</span></td>
593 <td ><input name='${prefix}time_start' size="12" type="text" maxlength='5' value="{$default_time_start}">$time_ampm</td>
598 <script type="text/javascript">
600 inputField : "${prefix}jscal_field", daFormat : "$cal_dateformat", ifFormat : "$cal_dateformat", showsTime : false, button : "${prefix}jscal_trigger", singleClick : true, step : 1, weekNumbers:false
606 $javascript = new javascript();
607 $javascript->setFormName($formname);
608 $javascript->setSugarBean(new Call());
609 $javascript->addRequiredFields($prefix);
610 $form .=$javascript->getScript();
611 $mod_strings = $temp_strings;