Re: [Dave] Duplicating records?
Here's an (unsupported) hack I wrote up to add a "Save as Copy" button to the bottom left of the edit page.
It doesn't support uploads or all the field types but worked for this case. I'm posting in here in case it turns out to be useful for someone else as well.
- Create a backup copy of /lib/menus/default/edit.php
- Open /lib/menus/default/edit.php
- Search for showWysiwygGeneratorCode
- Add the code in red (about 15 lines above showWysiwygGeneratorCode)
<table border="0" cellspacing="0" cellpadding="0" width="690">
<tr>
<td>
<input type="submit" name="action=save" value="<?php _e('Save as Copy') ?>"
onclick="document.getElementById('num').value=''; document.getElementById('preSaveTempId').value='1234567890abc'"
class="inputButton" />
</td>
<td align="right">
<input type="submit" name="action=save" value="<?php _e('Save') ?>" class="inputButton" />
<input type="button" name="cancel" value="<?php _e('Cancel') ?>" class="inputButton"
onclick="window.location='?menu=<?php print urlencode($menu) ?>'" />
</td>
</tr>
</table>
</form>
<?php showWysiwygGeneratorCode() ?>
Update: This version works for 2.00+ - search for _action=save <div style="float:right">
<input type="submit"
name="action=save"
value="<?php et('Save As Copy') ?>"
onclick="document.getElementById('num').value=''; document.getElementById('preSaveTempId').value='1234567890abc'"
class="button" />
<input class="button" type="submit" name="_action=save" value="<?php et('Save') ?>" />
<input class="button" type="button" name="cancel" value="<?php et('Cancel') ?>" onclick="window.location='?menu=<?php print urlencode($menu) ?>'" />
</div>
Dave Edis - Senior Developer
interactivetools.com