silverstripe-cms/templates/CMSMain_dialog.ss
Hayden Smith abb9a61d0d Moved CMS module to open source path
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@39000 467b73ca-7a2a-4603-9d3b-597d59a354a9
2007-07-19 10:40:05 +00:00

36 lines
622 B
Scheme
Executable File

<html>
<head>
<script>
function buttonClick(el) {
<% if Modal %>
window.returnValue = el.name;
window.close();
<% else %>
if(window.linkedObject) {
if(el.name) {
window.linkedObject.result = el.name;
} else {
throw("Couldn't find the button name");
}
} else {
throw("Can't find window.linkedObject to send the button click back to the main window");
}
window.close();
<% end_if %>
}
</script>
</head>
<body>
<p>$Message</p>
<p style="align: center">
<% control Buttons %>
<input type="button" value="$Title" name="$Name" onclick="buttonClick(this);" />
<% end_control %>
</p>
</body>
</html>