Changeset 1559
- Timestamp:
- 04/14/06 18:08:06 (7 years ago)
- Files:
-
- modules/branches/2.1/ivr/page.ivr.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
modules/branches/2.1/ivr/page.ivr.php
r1348 r1559 107 107 <?php 108 108 ?> 109 <form name="prompt" action="<?php $_SERVER['PHP_SELF'] ?>" method="post" >109 <form name="prompt" action="<?php $_SERVER['PHP_SELF'] ?>" method="post" onsubmit="return prompt_onsubmit();"> 110 110 <input type="hidden" name="action" value="edited" /> 111 111 <input type="hidden" name="display" value="ivr" /> … … 170 170 171 171 <tr><td colspan=2><hr /></td></tr> 172 <tr><td colspan=2> 173 <input name="increase" type="submit" value="<?php echo _("Increase Options")?>"> </h6>172 <tr><td colspan=2> 173 <input name="increase" type="submit" value="<?php echo _("Increase Options")?>"> 174 174 175 <input name="Submit" type="submit" value="<?php echo _("Save")?>"> </h6>175 <input name="Submit" type="submit" value="<?php echo _("Save")?>"> 176 176 177 <input name="decrease" type="submit" value="<?php echo _("Decrease Options")?>"></h6> 177 <?php if ($nbroptions > 1) { ?> 178 <input name="decrease" type="submit" value="<?php echo _("Decrease Options")?>"> 179 <?php } ?> 178 180 </td></tr> 179 181 <tr><td colspan=2><hr /></td></tr> … … 202 204 } 203 205 ?> 204 <input name="increase" type="submit" value="<?php echo _("Increase Options")?>"> </h6>206 <input name="increase" type="submit" value="<?php echo _("Increase Options")?>"> 205 207 206 <input name="Submit" type="submit" value="<?php echo _("Save")?>"> </h6>208 <input name="Submit" type="submit" value="<?php echo _("Save")?>"> 207 209 208 <input name="decrease" type="submit" value="<?php echo _("Decrease Options")?>"></h6> 210 <?php if ($nbroptions > 1) { ?> 211 <input name="decrease" type="submit" value="<?php echo _("Decrease Options")?>"> 212 <?php } ?> 213 214 <script language="javascript"> 215 <!-- 216 217 var theForm = document.prompt; 218 219 function prompt_onsubmit() { 220 var msgInvalidOption = "<?php echo _("Invalid option"); ?>"; 221 222 defaultEmptyOK = true; 223 224 // go thru the form looking for options 225 // where the option isn't blank (as that will be removed) do the validation 226 var allelems = theForm.elements; 227 if (allelems != null) 228 { 229 var i, elem; 230 for (i = 0; elem = allelems[i]; i++) 231 { 232 if (elem.type == 'text' && elem.name.indexOf('option') == 0) 233 { 234 if (elem.value != '') { 235 if (!isIVROption(elem.value)) 236 return warnInvalid(elem, msgInvalidOption); 237 238 var gotoNum = elem.name.charAt(6); 239 var isok = validateSingleDestination(theForm,gotoNum,true); 240 if (!isok) 241 return false; 242 } 243 } 244 } 245 } 246 247 return true; 248 } 249 250 //--> 251 </script> 209 252 </form> 210 253 </div> … … 229 272 } 230 273 231 274 /* this should be in /admin/functions.inc.php 232 275 function runModuleSQL($moddir,$type){ 233 276 global $db; … … 254 297 } 255 298 256 257 ?> 299 */ 300 301 ?>
