Rename Text for addNew button
Posted: 2018-08-01 14:51
Hello,
I would like to rename the texts for the addNew button, but not for all tables (this can be done in language.php) but only for one given table.
I tried to modify if in the table hook file in function xxx_footer , but I don't have a clue about the syntax :
<script>$j(function(){
$j('#addNew')??????????? = my new text to display on the button
})</script>
I also tried in different files using a new variable ($Translation['Add New Msg M'] = 'Create new Message'; ) and modifying the tablename_dml.php file using
$templateCode = str_replace("<%%ADDNEW({$ptfc[0]})%%>", '<button type="button" class="btn btn-success add_new_parent hspacer-md" id="' . $ptfc[0] . '_add_new" title="' . html_attr($Translation['Add New Msg M'] . ' ' . $ptfc[1]) . '"><i class="glyphicon glyphicon-plus-sign"></i></button>', $templateCode);
but it won't work either ...
Any idea ?
Thanls a lot,
Best
I would like to rename the texts for the addNew button, but not for all tables (this can be done in language.php) but only for one given table.
I tried to modify if in the table hook file in function xxx_footer , but I don't have a clue about the syntax :
<script>$j(function(){
$j('#addNew')??????????? = my new text to display on the button
})</script>
I also tried in different files using a new variable ($Translation['Add New Msg M'] = 'Create new Message'; ) and modifying the tablename_dml.php file using
$templateCode = str_replace("<%%ADDNEW({$ptfc[0]})%%>", '<button type="button" class="btn btn-success add_new_parent hspacer-md" id="' . $ptfc[0] . '_add_new" title="' . html_attr($Translation['Add New Msg M'] . ' ' . $ptfc[1]) . '"><i class="glyphicon glyphicon-plus-sign"></i></button>', $templateCode);
but it won't work either ...
Any idea ?
Thanls a lot,
Best