| 1 |
<?php |
<?php |
| 2 |
// $Id$ |
// $Id: folder.forms.inc,v 1.2 2008/11/06 13:00:30 rhys Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* View form for folders |
* View form for folders |
| 158 |
foreach ($lines as $line => $parent) { |
foreach ($lines as $line => $parent) { |
| 159 |
// ignore all of those which are either this folder or sub-folders |
// ignore all of those which are either this folder or sub-folders |
| 160 |
if (strpos($line, $base) === 0) { |
if (strpos($line, $base) === 0) { |
| 161 |
continue; |
continue; |
| 162 |
} |
} |
| 163 |
|
|
| 164 |
$depth = (count(explode('/', $line)) - 2); |
$depth = (count(explode('/', $line)) - 2); |
| 175 |
|
|
| 176 |
// |
// |
| 177 |
$form['radios'][$line] = array( |
$form['radios'][$line] = array( |
| 178 |
'#prefix' => $prefix . '<div class="folder-level-'. $depth .'">', |
'#prefix' => $prefix .'<div class="folder-level-'. $depth .'">', |
| 179 |
'#type' => 'radio', |
'#type' => 'radio', |
| 180 |
'#title' => $folders[$parent]['name'], |
'#title' => $folders[$parent]['name'], |
| 181 |
'#return_value' => $parent, |
'#return_value' => $parent, |
| 182 |
'#default_value' => ($parent == $folder->parent ? $parent : false), |
'#default_value' => ($parent == $folder->parent ? $parent : FALSE), |
| 183 |
'#parents' => array('folder'), |
'#parents' => array('folder'), |
| 184 |
'#suffix' => '</div>' |
'#suffix' => '</div>' |
| 185 |
); |
); |