@Jabier
Updated:
This produces a double slash "//"
$theme = ($theme <> '') ? '/' . $theme : '';
So I removed the slash
$theme = ($theme <> '') ? '' . $theme : '';
This adds the buttons inside the table, but in a position which is techy not allowed and one of the $theme tags is missing - also added the alt tags to the images and put the "$_lang" in them.
$form.=' <div id="actions">
<ul class="actionButtons">
<li id="Button0">
<a onclick="documentDirty=false; document.sitestatus.submit();" href="#">
<img src="media/style/MODxRE/images/icons/save.png"> '.$_lang["save"].'
</a>
</li>
<li id="Button1">
<a onclick="document.location.href=\'index.php?a=106\';" href="#">
<img src="media/style/'.$theme.'/images/icons/stop.png"> '.$_lang["cancel"].'
</a>
</li>
</ul>
</div>';
$form.='</tbody></table></div></div></form>';
So changed to:
$form.='</tbody></table></div></div></form>';
$form.='<div id="actions">
<ul class="actionButtons">
<li id="Button0"><a onclick="documentDirty=false; document.sitestatus.submit();" href="#"><img src="media/style/'.$theme.'/images/icons/save.png" alt="'.$_lang["save"].'"> '.$_lang["save"].'</a></li>
<li id="Button1"><a onclick="document.location.href=\'index.php?a=106\';" href="#"><img src="media/style/'.$theme.'/images/icons/stop.png" alt="'.$_lang["cancel"].'"> '.$_lang["cancel"].'</a></li>
</ul>
</div>';
A problem:
For me, when I click the "Save" button nothing happens - I get a JavaScript Error: "TypeError: document.sitestatus is undefined"
This happens with and without my changes, the cancel button works.
A question / request:
Is it possible to add an option to add the ID to the new documents dynamicaly using lets say a "-" e.g. 209-aliasname