Skip to content
Snippets Groups Projects
Commit b7f4452a authored by Jared Hancock's avatar Jared Hancock
Browse files

dept: Rename 'dept and group' to 'dept and extended members'

parent bc638b17
No related branches found
No related tags found
No related merge requests found
......@@ -34,7 +34,7 @@ class AdminAjaxAPI extends AjaxController {
$errors = array();
$vars = $form->getClean();
$vars += array(
'group_membership' => Dept::ALERTS_DEPT_AND_GROUPS,
'group_membership' => Dept::ALERTS_DEPT_AND_EXTENDED,
);
if ($dept->update($vars, $errors)) {
Http::response(201, $this->encode(array(
......
......@@ -58,7 +58,7 @@ implements TemplateVariable {
var $autorespEmail;
const ALERTS_DISABLED = 2;
const ALERTS_DEPT_AND_GROUPS = 1;
const ALERTS_DEPT_AND_EXTENDED = 1;
const ALERTS_DEPT_ONLY = 0;
const FLAG_ASSIGN_MEMBERS_ONLY = 0x0001;
......@@ -210,9 +210,14 @@ implements TemplateVariable {
$rv = clone $this->getAvailableMembers();
$rv->filter(Q::any(array(
// Ensure "Alerts" is enabled — must be a primary member or
// have alerts enabled on your membership.
// have alerts enabled on your membership and have alerts
// configured to extended to extended access members
'dept_id' => $this->getId(),
'dept_access__flags__hasbit' => StaffDeptAccess::FLAG_ALERTS,
// NOTE: Manager is excluded here if not a member
Q::all(array(
'group_membership' => self::ALERTS_DEPT_AND_EXTENDED,
'dept_access__flags__hasbit' => StaffDeptAccess::FLAG_ALERTS,
)),
)));
}
return $rv;
......
......@@ -268,7 +268,7 @@ $info = Format::htmlchars(($errors && $_POST) ? $_POST : $info);
<?php foreach (array(
Dept::ALERTS_DISABLED => __("No one (disable Alerts and Notices)"),
Dept::ALERTS_DEPT_ONLY => __("Department members only"),
Dept::ALERTS_DEPT_AND_GROUPS => __("Department and Group members"),
Dept::ALERTS_DEPT_AND_EXTENDED => __("Department and extended access members"),
) as $mode=>$desc) { ?>
<option value="<?php echo $mode; ?>" <?php
if ($info['group_membership'] == $mode) echo 'selected="selected"';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment