Erase button in single record
I don't know if it will work, but possibly you could wrap Hans' whole code block in an if statement that references a 'Hide The Erase Button' checkbox in one of your admin single record sections, so that you can turn the erase button on and off.
<?php if ( $your_admin_sectionRecord['hide_the_erase_button'] == 1):?> (Hans' code) <?php endif ?>
or just add another criteria into the beginning of Han's if statement IE:
<?php if($your_admin_sectionRecord['hide_the_erase_button'] == 1 && isset($_GET['menu']) && $_GET['menu'] === "section_name"): ?>
Please post if this works and I'll add it to the CMSB Cookbook
Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php