
Jason
Staff
/ Moderator

May 11, 2012, 9:14 AM
Post #5 of 6
(110 views)
Shortcut
|
|
Re: [gversion] Change the text on the "Save" button
[In reply to]
|
Can't Post
|
|
Hi Greg, You can use the plugin filter "edit_buttonsRight" to accomplish this. If you open up cmsAdmin/lib/menus/default/edit.php you'll see this block of code:
<?php $buttonsRight = ''; $buttonsRight .= "<input class='button' type='submit' name='_action=save' value='" .t('Save'). "' />\n"; if ($previewUrl) { $buttonsRight .= "<input class='button' type='button' name='preview' value='" .t('Preview'). "' onclick=\"editPreview();\" />\n"; } $buttonsRight .= "<input class='button' type='button' name='cancel' value='" .t('Cancel'). "' onclick=\"editCancel();\" />\n"; $buttonsRight = applyFilters('edit_buttonsRight', $buttonsRight, $tableName, $GLOBALS['RECORD']); echo $buttonsRight; ?> This is the code that creates the buttons seen on the edit page. Just before the html string is echoed to the screen, it passes it's value to the any plugin that uses the edit_buttonsRight filter. So you can create a plugin using this filter that edits this HTML string and returns a new value. Hope this helps get you started. --------------------------------------------------- Jason Sauchuk - Programmer interactivetools.com Hire me! Save time by getting our experts to help with your project. http://www.interactivetools.com/consulting/
|