<?php
/**
* Custom snippet for controlling which grid to display in the Notification Send screen
*
* LICENSE NOTE:
*
* Copyright 2003-2007 Active Agenda Inc., All Rights Reserved.
*
* Unless explicitly acquired and licensed from Licensor under a "commercial license",
* the contents of this file are subject to the Reciprocal Public License ("RPL")
* Version 1.4, or subsequent versions as allowed by the RPL,and You may not copy
* or use this file in either source code or executable form, except in compliance
* with the terms and conditions of the RPL. You may obtain a copy of the RPL from
* Active Agenda Inc. at http://www.activeagenda.net/license.
*
* All software distributed under the Licenses is provided strictly on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, AND ACTIVE AGENDA
* INC. HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY
* WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT,
* OR NON-INFRINGEMENT. See the Licenses for specific language governing rights and
* limitations under the Licenses.
*
* author Mattias Thorslund <hide@address.com>
* copyright 2003-2007 Active Agenda Inc.
* license http://www.activeagenda.net/license
**/
if ($ntf_sent){
//display ViewGrid only
$hideGridClass = 'searchselectgrid';
} else {
//display SearchSelectGrid only
$hideGridClass = 'viewgrid';
}
foreach($grids as $gridID => $grid){
if(get_class($grid) == $hideGridClass){
unset($grids[$gridID]);
}
}
?>