static function getServiceSelect($selected = -1) { $services = CustomerManagementDao::findAllServices(); $output = '<select id="cm_plugin_service_id" name="cm_plugin_service_id"><option value=""></option>'; foreach ($services as $service) { $selected_attr = $selected == $service['id'] ? ' selected="selected" ' : ''; $output .= "<option value=\"{$service['id']}\" {$selected_attr}>{$service['name']}</option>"; } $output .= '</select>'; return $output; }
function options() { plugin_push_current('CustomerManagement'); if (access_has_global_level(plugin_config_get('view_customer_fields_threshold'))) { $options = array(); foreach (CustomerManagementDao::findAllServices() as $service) { $options[$service['id']] = $service['name']; } } plugin_pop_current(); return $options; }
echo $group['id']; ?> "><?php echo $group['name']; ?> </option> <?php } ?> </select> <br /> <label for="service_id[]"><?php echo plugin_lang_get('services'); ?> </label> <select name="service_id[]" multiple="multiple"> <?php foreach (CustomerManagementDao::findAllServices() as $service) { ?> <option value="<?php echo $service['id']; ?> "><?php echo $service['name']; ?> </option> <?php } ?> </select> </form> <script>