Changeset 2647
- Timestamp:
- 10/04/06 12:48:15 (7 years ago)
- Files:
-
- modules/branches/2.2/paging/page.paging.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
modules/branches/2.2/paging/page.paging.php
r2631 r2647 84 84 <td><input size='5' type='text' name='pagenbr' value='<?php echo $xtn ?>'></td> 85 85 </tr><tr> 86 <tr><td valign='top'><a href='#' class='info'><?php echo _(" device list:")."<span><br>"._("List devices to page, one per line. This will page the specified extension in freepbx extensions mode. In deviceanduser mode it refers to the device which may or may not be the same as the extension") ?>86 <tr><td valign='top'><a href='#' class='info'><?php echo _("extension list:")."<span><br>"._("List extensions to page, one per line.") ?> 87 87 <br><br></span></a></td> 88 <td valign="top"> <textarea id="xtnlist" cols="15" rows="<?php echo $rows ?>" name="pagelist"><?php 89 echo ($xtn)?implode("\n",paging_get_devs($xtn)):''; ?></textarea><br> 88 <td valign="top"> 89 90 <select multiple="multiple" name="pagelist[]" id="xtnlist" > 91 <?php 92 $selected = paging_get_devs($xtn); 93 if (is_null($selected)) $selected = array(); 94 foreach (core_devices_list() as $device) { 95 echo '<option value="'.$device[0].'" '; 96 if (array_search($device[0], $selected) !== false) echo ' selected="selected" '; 97 echo '>'.$device[0].' - '.$device[1].'</option>'; 98 } 99 ?> 100 </select> 101 102 <br> 90 103 <input type="submit" style="font-size:10px;" value="<?php echo _("Clean & Remove duplicates")?>" /> 91 104 </td></tr> … … 101 114 function page_edit_onsubmit() { 102 115 var msgInvalidPageExt = "<?php echo _('Please enter a valid Paging Extension'); ?>"; 103 var msgInvalidExtList = "<?php echo _('Please enter the Extension List details'); ?>";116 var msgInvalidExtList = "<?php echo _('Please select at least one extension'); ?>"; 104 117 105 118 defaultEmptyOK = false; … … 107 120 return warnInvalid(theForm.pagenbr, msgInvalidPageExt); 108 121 109 if (isEmpty(theForm.xtnlist.value) || isWhitespace(theForm.xtnlist.value)) 122 var selected = 0; 123 for (var i=0; i < theForm.xtnlist.options.length; i++) { 124 if (theForm.xtnlist.options[i].checked) selected += 1; 125 } 126 if (selected < 1) { 110 127 return warnInvalid(theForm.xtnlist, msgInvalidExtList); 128 } 111 129 112 130 return true;
