651e982a by Jeff Balicki

sss

1 parent fb1e0de2
...@@ -690,6 +690,7 @@ function getGroups($grpID = 0) ...@@ -690,6 +690,7 @@ function getGroups($grpID = 0)
690 return $groups; 690 return $groups;
691 } 691 }
692 692
693
693 /** 694 /**
694 * @param $var 695 * @param $var
695 * 696 *
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
3 use Tz\WordPress\Tools; 3 use Tz\WordPress\Tools;
4 use Tz\WordPress\Tools\Notifications; 4 use Tz\WordPress\Tools\Notifications;
5 use Tz\WordPress\Tools\Notifications\Settings; 5 use Tz\WordPress\Tools\Notifications\Settings;
6 6 use Tz\WordPress\UAM;
7 function getInputFormValues($validation, $name) 7 function getInputFormValues($validation, $name)
8 { 8 {
9 9
...@@ -93,11 +93,11 @@ $newsletterFr = get_post($newsletterFrId); ...@@ -93,11 +93,11 @@ $newsletterFr = get_post($newsletterFrId);
93 ? 'selected="selected"' : ""; ?>>All Users 93 ? 'selected="selected"' : ""; ?>>All Users
94 </option> 94 </option>
95 <optgroup label="By Group:"> 95 <optgroup label="By Group:">
96 <?php foreach (Notifications\getGroups() as $group_id => $group_name): ?> 96 <?php foreach (UAM\getGroups() as $group): ?>
97 <option value="<?php echo $group_id ?>" <?php echo ($validation->set_value( 97 <option value="<?php echo $group->getID(); ?>" <?php echo ($validation->set_value(
98 'sendto' 98 'sendto'
99 ) == $group_id) ? 'selected="selected"' 99 ) == $group->getID()) ? 'selected="selected"'
100 : ""; ?>><?php echo $group_name; ?></option> 100 : ""; ?>><?php echo $group->getName(); ?></option>
101 <?php endforeach;?> 101 <?php endforeach;?>
102 </optgroup> 102 </optgroup>
103 </select> 103 </select>
...@@ -360,7 +360,7 @@ endforeach; ...@@ -360,7 +360,7 @@ endforeach;
360 360
361 updateNotificationType(); 361 updateNotificationType();
362 362
363 $('.attachment').live('click', function(e) { 363 $('.attachment').on('click', function(e) {
364 e.preventDefault(); 364 e.preventDefault();
365 var $link = $(this); 365 var $link = $(this);
366 var options = { 366 var options = {
......
...@@ -107,12 +107,12 @@ use Tz\WordPress\Tools\Notifications\Settings; ...@@ -107,12 +107,12 @@ use Tz\WordPress\Tools\Notifications\Settings;
107 All Users 107 All Users
108 </option> 108 </option>
109 <optgroup label="By Group:"> 109 <optgroup label="By Group:">
110 <?php foreach (Notifications\getGroups() as $group_id => $group_name): ?> 110 <?php foreach (UAM\getGroups() as $group ): ?>
111 <option value="<?php echo $group_id ?>" <?php echo ($validation->set_value( 111 <option value="<?php echo $group->getID();?>" <?php echo ($validation->set_value(
112 'sendto', 112 'sendto',
113 $entry->details['sendto'] 113 $entry->details['sendto']
114 ) == $group_id) ? 'selected="selected"' 114 ) == $group->getID()) ? 'selected="selected"'
115 : ''; ?>><?php echo $group_name; ?></option> 115 : ''; ?>><?php echo $group->getName();?></option>
116 <?php endforeach; ?> 116 <?php endforeach; ?>
117 </optgroup> 117 </optgroup>
118 </select> 118 </select>
......