42 $validator->add(
new RequiredValidator(
"folder_value",
"Folder"));
57 if (!file_exists(
$path))
62 $handle = opendir(
$path);
63 while((
$f = readdir($handle)) !== FALSE)
65 if (
$f !=
"." &&
$f !=
"..")
76 die(
"The folder cannot be deleted because it is not empty");
86 $tree =
new DirectoryTreeControl(
"folder");
89 $tree->permissionCallback = array(
$mgr, excludeVersionControl);
94 <script type=
"text/javascript">
97 document.id(
'folder_form').iFrameFormRequest({
'onRequest':
function() {
return validate_folder_form(document.id(
'folder_form')); },
'onComplete': deleteFolderResult,
'onFailure':
function() { alert(
"Failed to communicate with server"); }});
100 <form name=
"folder_form" id=
"folder_form" method=
"POST" action=
"/action/template/delete_folder">
101 <p>Choose the folder you wish
to delete using the tree below.<br/>
102 Please note that
only empty folders can be deleted <br/>
103 (i.e. those which
do not contain files or sub-folders).</p>
106 <td
style=
"vertical-align: top"><label>Folder</label></td>
108 <?
$tree->writeHTML(); ?>
112 <td
colspan=
"2"><input type=
"submit" class=
"button" value=
"Delete Folder"/></td>
static usingFeature()
Uses the specified framework feature(s).
static using()
Import the datamodels, views and manifest for the specified component(s).
static assertRole($role, $redirect="", $message="")
Assert that the user has one of the specified roles.
$method
Pull out a simple reference to the request method.