Changeset 804197
- Timestamp:
- 11/14/2013 05:47:00 AM (12 years ago)
- Location:
- udssl-time-tracker/trunk
- Files:
-
- 3 edited
-
admin/class-udssl-tt-admin.php (modified) (5 diffs)
-
admin/tabs/tab-presets.php (modified) (5 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
udssl-time-tracker/trunk/admin/class-udssl-tt-admin.php
r797968 r804197 211 211 'task' => sanitize_text_field($input['presets']['task']) 212 212 ); 213 $message = 'Preset Saved';213 $message = __('Preset Saved', 'udssl'); 214 214 $type = 'updated'; 215 215 } … … 218 218 * Delete Preset 219 219 */ 220 if(isset($input['delete_preset'])){ 221 $name = sanitize_text_field($input['presets']['name']); 222 if(isset($output['presets'][$name])){ 223 unset($output['presets'][$name]); 224 $message = 'Preset Saved'; 225 } else { 226 $message = 'No Preset Fount (' . $name . ')'; 220 foreach($options['presets'] as $preset){ 221 $delete_name = 'delete_preset' . $preset['name']; 222 if(isset($input[$delete_name])){ 223 $name = $preset['name']; 224 if(isset($output['presets'][$name])){ 225 unset($output['presets'][$name]); 226 $message = __('Preset Deleted', 'udssl'); 227 } else { 228 $message = __('No Preset Found', 'udssl'); 229 } 230 $type = 'updated'; 227 231 } 228 $type = 'updated';229 232 } 230 233 … … 234 237 if(isset($input['reset_presets'])){ 235 238 $output['presets'] = $defaults['presets']; 236 $message = 'Presets Reset';239 $message = __('Presets Reset', 'udssl'); 237 240 $type = 'updated'; 238 241 } … … 243 246 if(isset($input['save_settings'])){ 244 247 $output['settings']['block_visitors'] = (bool) $input['settings']['block_visitors']; 245 $message = 'Settings Saved';248 $message = __('Settings Saved', 'udssl'); 246 249 $type = 'updated'; 247 250 } … … 252 255 if(isset($input['reset_settings'])){ 253 256 $output['settings'] = $defaults['settings']; 254 $message = 'Settings Reset';257 $message = __('Settings Reset', 'udssl'); 255 258 $type = 'updated'; 256 259 } -
udssl-time-tracker/trunk/admin/tabs/tab-presets.php
r797968 r804197 67 67 echo '<input name="udssl_tt_options[save_preset]" 68 68 type="submit" class="button-primary" value="' . esc_attr__('Save Preset', 'udssl') .'" />'; 69 echo ' <input name="udssl_tt_options[delete_preset]"70 type="submit" class="button-secondary" value="' . esc_attr__('Delete', 'udssl') .'" />';71 69 echo ' <input name="udssl_tt_options[reset_presets]" 72 type="submit" class="button-secondary" value="' . esc_attr__(' Reset', 'udssl') .'" />';70 type="submit" class="button-secondary" value="' . esc_attr__('Load Default Presets', 'udssl') .'" />'; 73 71 } 74 72 … … 91 89 <th>Project</th> 92 90 <th>Task</th> 91 <th>Action</th> 93 92 </tr> 94 93 </thead> … … 96 95 97 96 foreach($options['presets'] as $preset){ 97 $delete_name = 'delete_preset' . $preset['name']; 98 $delete_button = ' <input name="udssl_tt_options[' . $delete_name . ']" 99 type="submit" class="button-secondary" value="' . esc_attr__('Delete', 'udssl') .'" />'; 100 98 101 echo '<tr> 99 102 <td class="row-title"><label for="tablecell">' . $preset['name'] . '</label></td> … … 101 104 <td>' . $preset['project'] . '</td> 102 105 <td>' . $preset['task'] . '</td> 106 <td>' . $delete_button . '</td> 103 107 </tr>'; 104 108 } … … 111 115 <th>Project</th> 112 116 <th>Task</th> 117 <th>Action</th> 113 118 </tr> 114 119 </tfoot> -
udssl-time-tracker/trunk/readme.txt
r799866 r804197 5 5 Requires at least: 3.0 6 6 Tested up to: 3.7.1 7 Stable tag: trunk7 Stable tag: 0.2 8 8 License: GPLv3 9 9 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 74 74 == Changelog == 75 75 76 = 0.2 = 77 78 * Fixed plugin action links application to all plugin entries. 79 * Time slot preset administration interface was improved for usability. 80 76 81 = 0.1 = 77 82
Note: See TracChangeset
for help on using the changeset viewer.