Plugin Directory

Changeset 804197


Ignore:
Timestamp:
11/14/2013 05:47:00 AM (12 years ago)
Author:
UDSSL
Message:

Time slot preset administration interface was improved for usability.

Location:
udssl-time-tracker/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • udssl-time-tracker/trunk/admin/class-udssl-tt-admin.php

    r797968 r804197  
    211211                'task' => sanitize_text_field($input['presets']['task'])
    212212            );
    213             $message = 'Preset Saved';
     213            $message = __('Preset Saved', 'udssl');
    214214            $type = 'updated';
    215215        }
     
    218218         * Delete Preset
    219219         */
    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';
    227231            }
    228             $type = 'updated';
    229232        }
    230233
     
    234237        if(isset($input['reset_presets'])){
    235238            $output['presets'] = $defaults['presets'];
    236             $message = 'Presets Reset';
     239            $message = __('Presets Reset', 'udssl');
    237240            $type = 'updated';
    238241        }
     
    243246        if(isset($input['save_settings'])){
    244247            $output['settings']['block_visitors'] = (bool) $input['settings']['block_visitors'];
    245             $message = 'Settings Saved';
     248            $message = __('Settings Saved', 'udssl');
    246249            $type = 'updated';
    247250        }
     
    252255        if(isset($input['reset_settings'])){
    253256            $output['settings'] = $defaults['settings'];
    254             $message = 'Settings Reset';
     257            $message = __('Settings Reset', 'udssl');
    255258            $type = 'updated';
    256259        }
  • udssl-time-tracker/trunk/admin/tabs/tab-presets.php

    r797968 r804197  
    6767    echo '<input name="udssl_tt_options[save_preset]"
    6868        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') .'" />';
    7169    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') .'" />';
    7371}
    7472
     
    9189                <th>Project</th>
    9290                <th>Task</th>
     91                <th>Action</th>
    9392            </tr>
    9493        </thead>
     
    9695
    9796    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
    98101        echo '<tr>
    99102            <td class="row-title"><label for="tablecell">' . $preset['name'] . '</label></td>
     
    101104            <td>' . $preset['project'] . '</td>
    102105            <td>' . $preset['task'] . '</td>
     106            <td>' . $delete_button . '</td>
    103107        </tr>';
    104108    }
     
    111115                <th>Project</th>
    112116                <th>Task</th>
     117                <th>Action</th>
    113118            </tr>
    114119        </tfoot>
  • udssl-time-tracker/trunk/readme.txt

    r799866 r804197  
    55Requires at least: 3.0
    66Tested up to: 3.7.1
    7 Stable tag: trunk
     7Stable tag: 0.2
    88License: GPLv3
    99License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    7474== Changelog ==
    7575
     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
    7681= 0.1 =
    7782
Note: See TracChangeset for help on using the changeset viewer.