- Timestamp:
- Feb 18, 2011, 5:34:50 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/PHP_Optimisateur/plugins/convert_pan/setup.php
r9201 r9276 4 4 case 'read_config': 5 5 load_plugin_lang('convert_pan'); 6 $PAGE_CONTENT[0] .= '<table> 6 $PAGE_CONTENT[0] .= ' 7 <table> 7 8 <tr> 8 <td>'.l10n('convert_pan.NAMEpanorama').' :</td> 9 <td>'.$plugin_config['NAMEpanorama'].'</td> 10 </tr> 9 <td>'.l10n('convert_pan.DetectMode').' :</td> 10 <td>'.$plugin_config['DetectMode'].'</td> 11 </tr>'; 12 13 if ($plugin_config['DetectMode'] == 'name') { 14 $PAGE_CONTENT[0] .= ' 15 <tr> 16 <td>'.l10n('convert_pan.NAMEpanorama').' :</td> 17 <td>'.$plugin_config['NAMEpanorama'].'</td> 18 </tr>'; 19 } else if ($plugin_config['DetectMode'] == 'ratio') { 20 $PAGE_CONTENT[0] .= ' 21 <tr> 22 <td>'.l10n('convert_pan.RatioPan').' :</td> 23 <td>'.$plugin_config['RatioPan'].'</td> 24 </tr>'; 25 } 26 27 $PAGE_CONTENT[0] .= ' 11 28 <tr> 12 29 <td>'.l10n('convert_pan.DIMpanorama').' :</td> … … 32 49 $$Errors['ErrorConfig'] = 'notice'; 33 50 } 51 if (!is_decimal($_POST['Plugins']['convert_pan']['RatioPan'])) { 52 $_POST['Plugins']['convert_pan']['RatioPan'] = 2.85; 53 $$Errors['ErrorConfig'] = 'notice'; 54 } 34 55 35 56 break; … … 38 59 case 'edit_config': 39 60 load_plugin_lang('convert_pan'); 40 $PAGE_CONTENT[0] .= '<table> 61 $PAGE_CONTENT[0] .= ' 62 <script type="text/javascript"> 63 function ToggleConfig(sel, section){ 64 var obj = $("#convert_pan-tr-"+section); 65 if(sel.checked){ 66 obj.show(); 67 }else{ 68 obj.hide(); 69 } 70 } 71 </script> 72 73 <table> 41 74 <tr> 75 <td>'.l10n('convert_pan.DetectMode').' :</td> 76 <td> 77 <input type="radio" id="convert_pan-radio-name" name="Plugins[convert_pan][DetectMode]" value="name" onchange="ToggleConfig(this,\'name\');" '.(($plugin_config['DetectMode']=='name')?'checked="checked"':'').'/> 78 <label for="convert_pan-radio-name">'.l10n('convert_pan.DetectMode.name').'</label> 79 <input type="radio" id="convert_pan.radio.ratio" name="Plugins[convert_pan][DetectMode]" value="ratio" onchange="ToggleConfig(this,\'ratio\');" '.(($plugin_config['DetectMode']=='ratio')?'checked="checked"':'').'/> 80 <label for="convert_pan-radio-ratio">'.l10n('convert_pan.DetectMode.ratio').'</label> 81 </td> 82 </tr> 83 <tr id="convert_pan-tr-name"> 42 84 <td>'.l10n('convert_pan.NAMEpanorama').' :</td> 43 85 <td><input type="text" name="Plugins[convert_pan][NAMEpanorama]" value="'.$plugin_config['NAMEpanorama'].'" size="6"/></td> 44 86 </tr> 87 <tr id="convert_pan-tr-ratio"> 88 <td>'.l10n('convert_pan.RatioPan').' :</td> 89 <td><input type="text" name="Plugins[convert_pan][RatioPan]" value="'.$plugin_config['RatioPan'].'" size="3"/>px</td> 90 </tr> 91 45 92 <tr> 46 93 <td>'.l10n('convert_pan.DIMpanorama').' :</td> … … 57 104 </td> 58 105 </tr> 59 </table>'; 106 </table> 107 108 <script type="text/javascript"> 109 ToggleConfig(document.forms[0].elements["Plugins[convert_pan][DetectMode]"][0], "name"); 110 ToggleConfig(document.forms[0].elements["Plugins[convert_pan][DetectMode]"][1], "ratio"); 111 </script>'; 60 112 break; 61 113 }
Note: See TracChangeset
for help on using the changeset viewer.