diff options
author | alecpl <alec@alec.pl> | 2011-07-20 09:51:31 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2011-07-20 09:51:31 +0000 |
commit | c9cfd6d4bfbd8f676542ed9fbd9bdbcaede001ba (patch) | |
tree | ffa0da84bec41007afa63e18c4269803923f46bb /program | |
parent | 8a3b1c846209d2909e4ba9c9699912301bd76882 (diff) |
- Improved parent folder selector
Diffstat (limited to 'program')
-rw-r--r-- | program/steps/settings/edit_folder.inc | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/program/steps/settings/edit_folder.inc b/program/steps/settings/edit_folder.inc index 440a11999..70d8c56dd 100644 --- a/program/steps/settings/edit_folder.inc +++ b/program/steps/settings/edit_folder.inc @@ -106,25 +106,24 @@ function rcmail_folder_form($attrib) ), ); - if (strlen($path)) { + if (strlen($path) || !strlen($mbox)) { if (!empty($options) && ($options['norename'] || $options['namespace'] != 'personal')) { // prevent user from moving folder $hidden_path = new html_hiddenfield(array('name' => '_parent', 'value' => $path)); $form['props']['fieldsets']['location']['content']['name']['value'] .= $hidden_path->show(); } else { - $radio1 = new html_radiobutton(array('name' => '_parent', 'value' => '')); - $radio2 = new html_radiobutton(array('name' => '_parent', 'value' => $path_id)); - $selected = isset($_POST['_parent']) ? $_POST['_parent'] : $path_id; - - $html_path = str_replace($delimiter, ' » ', rcmail_localize_folderpath($path)); - - $folderpath = $radio1->show($selected) . Q(rcube_label('none')) . ' ' - .$radio2->show($selected) . Q($html_path); + $selected = isset($_POST['_parent']) ? $_POST['_parent'] : $path_id; + $select = rcmail_mailbox_select(array( + 'name' => '_parent', + 'noselection' => '---', + 'realnames' => false, + 'maxlength' => 150 + )); $form['props']['fieldsets']['location']['content']['path'] = array( 'label' => rcube_label('parentfolder'), - 'value' => $folderpath, + 'value' => $select->show($selected), ); } } |