[Vtigercrm-commits] [vtiger-commits] r4916 - in /vtigercrm/trunk/modules/Users: EditNotification.php SaveNotification.php listnotificationschedulers.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Wed Apr 5 10:23:22 EDT 2006
Author: don
Date: Wed Apr 5 08:23:15 2006
New Revision: 4916
Log:
new UI integrated for EmailNotification
Modified:
vtigercrm/trunk/modules/Users/EditNotification.php
vtigercrm/trunk/modules/Users/SaveNotification.php
vtigercrm/trunk/modules/Users/listnotificationschedulers.php
Modified: vtigercrm/trunk/modules/Users/EditNotification.php
==============================================================================
--- vtigercrm/trunk/modules/Users/EditNotification.php (original)
+++ vtigercrm/trunk/modules/Users/EditNotification.php Wed Apr 5 08:23:15 2006
@@ -9,52 +9,40 @@
*
********************************************************************************/
-require_once('XTemplate/xtpl.php');
+require_once('Smarty_setup.php');
global $mod_strings;
global $app_strings;
global $app_list_strings;
-
-echo get_module_title($mod_strings['LBL_MODULE_NAME'], $mod_strings['LBL_MODULE_NAME'].' : '.$mod_strings['LBL_HDR_EMAIL_SCHDS'], true);
-echo '<br><br>';
global $adb;
global $theme;
$theme_path="themes/".$theme."/";
$image_path=$theme_path."images/";
require_once($theme_path.'layout_utils.php');
+$smarty = new vtigerCRM_Smarty;
if(isset($_REQUEST['record']) && $_REQUEST['record']!='')
{
$id = $_REQUEST['record'];
- $mode = 'edit';
- $xtpl=new XTemplate ('modules/Users/EditNotification.html');
- $xtpl->assign("MOD", $mod_strings);
- $xtpl->assign("APP", $app_strings);
-
+
$sql="select * from notificationscheduler where schedulednotificationid = ".$id;
$result = $adb->query($sql);
if($adb->num_rows($result) ==1);
{
- $label = $mod_strings[$adb->query_result($result,0,'label')];
- $notification_subject = $adb->query_result($result,0,'notificationsubject');
- $notification_body = $adb->query_result($result,0,'notificationbody');
+ $notification = Array();
+ $notification['active'] = $adb->query_result($result,0,'active');
+ $notification['subject'] = $adb->query_result($result,0,'notificationsubject');
+ $notification['body'] = $adb->query_result($result,0,'notificationbody');
+ $notification['name'] = $mod_strings[$adb->query_result($result,0,'label')];
+ $notification['id'] = $adb->query_result($result,0,'schedulednotificationid');
+ }
+
+ $smarty->assign("NOTIFY_DETAILS",$notification);
+}
- $xtpl->assign("RETURN_MODULE","Users");
- $xtpl->assign("RETURN_ACTION","listnotificationschedulers");
- $xtpl->assign("RECORD_ID",$id);
-
- if (isset($label))
- $xtpl->assign("LABEL",$label);
- if (isset($notification_subject))
- $xtpl->assign("SUBNOTIFY",$notification_subject);
- if (isset($notification_body))
- $xtpl->assign("BODYNOTIFY",$notification_body);
- }
- $xtpl->parse("main");
- $xtpl->out("main");
-}
-else
-{
- header("Location:index.php?module=Users&action=listnotificationschedulers");
-}
+$smarty->assign("MOD", return_module_language($current_language,'Settings'));
+$smarty->assign("IMAGE_PATH",$image_path);
+$smarty->assign("APP", $app_strings);
+$smarty->assign("CMOD", $mod_strings);
+$smarty->display("Settings/EditEmailNotofication.tpl");
?>
Modified: vtigercrm/trunk/modules/Users/SaveNotification.php
==============================================================================
--- vtigercrm/trunk/modules/Users/SaveNotification.php (original)
+++ vtigercrm/trunk/modules/Users/SaveNotification.php Wed Apr 5 08:23:15 2006
@@ -14,9 +14,9 @@
if(isset($_REQUEST['record']) && $_REQUEST['record']!='')
{
- $query="UPDATE notificationscheduler set notificationsubject='".$_REQUEST['notifysubject']."', notificationbody='".$_REQUEST['notifybody']."' where schedulednotificationid=".$_REQUEST['record'];
+ $query="UPDATE notificationscheduler set notificationsubject='".$_REQUEST['notifysubject']."', notificationbody='".$_REQUEST['notifybody']."', active =".$_REQUEST['active']." where schedulednotificationid=".$_REQUEST['record'];
$adb->query($query);
}
-$loc = "Location: index.php?action=listnotificationschedulers&module=Users";
+$loc = "Location: index.php?action=UsersAjax&file=listnotificationschedulers&module=Users&directmode=ajax";
header($loc);
?>
Modified: vtigercrm/trunk/modules/Users/listnotificationschedulers.php
==============================================================================
Binary files - no diff available.
More information about the vtigercrm-commits
mailing list