Esempio n. 1
0
}
?>
    </table>
</div>

<div class="tab_content" id="contact-settings" style="display:none;margin:5px;">
    <table style="width:100%">
        <tbody>
            <tr>
                <td width="180">
                    Account Manager:
                </td>
                <td>
                    <select name="manager">
                        <option value="0" selected="selected">&mdash; None &mdash;</option><?php 
if ($users = Staff::getAvailableStaffMembers()) {
    ?>
                            <optgroup label="Staff Members (<?php 
    echo count($users);
    ?>
)">
<?php 
    foreach ($users as $id => $name) {
        $k = "s{$id}";
        echo sprintf('<option value="%s" %s>%s</option>', $k, $info['manager'] == $k ? 'selected="selected"' : '', $name);
    }
    echo '</optgroup>';
}
if ($teams = Team::getActiveTeams()) {
    ?>
                            <optgroup label="Teams (<?php 
 public function listStaffJsonAction()
 {
     $staff = array();
     $items = \Staff::getAvailableStaffMembers();
     foreach ($items as $id => $name) {
         if (isset($id) && isset($name)) {
             $entry = array();
             $entry['name'] = $name;
             $entry['staff_id'] = $id;
             $staff[] = $entry;
         }
     }
     return json_encode($staff);
 }