Skip to content
Snippets Groups Projects
  • Jared Hancock's avatar
    685b6480
    filter: Implement several small things after discussion · 685b6480
    Jared Hancock authored
      * Add trashcan icon for newly-added actions
      * Categorize filter actions
      * Use imperative phrases for action descriptions
      * Drop check boxes from simple actions (like reject ticket)
      * Hide empty forms on new ticket pages
      * Do not store config for nondata fields for actions
      * Implement a multi-use feature for actions, which will allow using a
        action more than once (for instance, multiple email sends)
      * Filter actions are sortable
      * Send email has from address configurable
      * %{user} token is valid as a recipient
    685b6480
    History
    filter: Implement several small things after discussion
    Jared Hancock authored
      * Add trashcan icon for newly-added actions
      * Categorize filter actions
      * Use imperative phrases for action descriptions
      * Drop check boxes from simple actions (like reject ticket)
      * Hide empty forms on new ticket pages
      * Do not store config for nondata fields for actions
      * Implement a multi-use feature for actions, which will allow using a
        action more than once (for instance, multiple email sends)
      * Filter actions are sortable
      * Send email has from address configurable
      * %{user} token is valid as a recipient
ajax.filter.php 874 B
<?php

require_once(INCLUDE_DIR . 'class.filter.php');

class FilterAjaxAPI extends AjaxController {

    function getFilterActionForm($type) {
        if (!($A = FilterAction::lookupByType($type)))
            Http::response(404, 'No such filter action type');

        $form = $A->getConfigurationForm();
        ?>
        <div style="position:relative">
            <div class="pull-right" style="position:absolute;top:2px;right:2px;">
                <a href="#" title="<?php echo __('clear'); ?>" onclick="javascript:
        if (!confirm(__('You sure?')))
            return false;
        $(this).closest('tr').fadeOut(400, function() { $(this).hide(); });
        return false;"><i class="icon-trash"></i></a>
            </div>
        <?php
        include STAFFINC_DIR . 'templates/dynamic-form-simple.tmpl.php';
        ?>
        </div>
        <?php
    }

}