5 * Template for folder management (create, rename, delete, (un)subscribe)
7 * The following variables are available in this template:
8 * + $mbx_option_list - string containing all mailboxes as <option>'s for
9 * use in <select>'s on this page.
10 * + $rendel_folder_list - string containing all mailboxes available for
11 * delete/rename as <option>'s for use in <select>'s
13 * + $show_subfolders_option - boolean TRUE if the a folder can contain
14 * subfolders in conf.pl > Folder Options
15 * + $show_only_subscribed_folders - boolean TRUE if the user only wants
16 * to see subscribed folders.
17 * + $no_list_for_subscribe = boolean TRUE if the subscribe list should NOT
18 * be displayed in conf.pl
19 * + $subbox_option_list - array containing a list of folders that can be
20 * subscribed to. Each array element contains an
21 * array with the following elements:
22 * $el['Value'] - encoded string for the VALUE
23 * field of an input element
24 * $el['Display'] - string containing the display
25 * name for the element
27 * @copyright 1999-2019 The SquirrelMail Project Team
28 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
30 * @package squirrelmail
31 * @subpackage templates
34 /* retrieve the template vars */
37 <div class="dialogbox">
38 <table cellspacing="0" class="wrapper">
41 <?php echo _("Folders"); ?>
46 <table cellspacing="0">
49 <?php echo _("Create Folder") ?>
54 <form method="post" action="folders.php" name="cf" id="cf">
55 <input type="hidden" name="smtoken" value="<?php echo sm_generate_security_token(); ?>" />
56 <input type="hidden" name="smaction" value="create" />
57 <input type="text" name="folder_name" size="25" value="" />
59 <?php echo _("as a subfolder of") ?>
61 <select name="subfolder">
62 <?php echo $mbx_option_list; ?>
65 if ($show_subfolders_option) {
68 <input type="checkbox" name="contain_subs" id="contain_subs" value="1" />
70 <label for="contain_subs"><?php echo _("Let this folder contain subfolders") ?></label>
75 <input type="submit" value="<?php echo _("Create") ?>" />
84 <table cellspacing="0">
87 <?php echo _("Rename a Folder") ?>
93 if ( !empty($rendel_folder_list) ) {
95 <form method="post" action="folders.php" name="rf" id="rf">
96 <input type="hidden" name="smaction" value="rename" />
97 <select name="old_name">
98 <option value="">[ <?php echo _("Select a folder") ?> ]</option>
99 <?php echo $rendel_folder_list ?>
101 <input type="submit" value="<?php echo _("Rename") ?>" />
105 echo _("No folders found");
115 <table cellspacing="0">
118 <?php echo _("Delete Folder") ?>
124 if ( !empty($rendel_folder_list) ) {
126 <form method="post" action="folders.php" name="df" id="df">
127 <input type="hidden" name="smaction" value="delete" />
128 <select name="folder_name">
129 <option value="">[ <?php echo _("Select a folder") ?> ]</option>
130 <?php echo $rendel_folder_list ?>
132 <input type="submit" value="<?php echo _("Delete") ?>" />
136 echo _("No folders found");
147 if ($show_only_subscribed_folders) {
149 <table cellspacing="0">
151 <td class="header2" colspan="2">
152 <?php echo _("Unsubscribe") .'/'. _("Subscribe"); ?>
158 if (!empty($rendel_folder_list)) {
160 <form method="post" action="folders.php" name="uf" id="uf">
161 <input type="hidden" name="smtoken" value="<?php echo sm_generate_security_token(); ?>" />
162 <input type="hidden" name="smaction" value="unsubscribe" />
163 <select name="folder_names[]" multiple="multiple" size="8">
164 <?php echo $rendel_folder_list ?>
167 <input type="submit" value="<?php echo _("Unsubscribe") ?>" />
171 echo _("No folders were found to unsubscribe from.");
177 if ($no_list_for_subscribe) {
179 <form method="post" action="folders.php" name="sf" id="sf">
180 <input type="hidden" name="smtoken" value="<?php echo sm_generate_security_token(); ?>" />
181 <input type="hidden" name="smaction" value="subscribe" />
182 <input type="text" name="folder_names[]" size="25" />
183 <input type="submit" value="<?php echo _("Subscribe") ?>" />
186 } elseif (!empty($subbox_option_list)) {
188 <form method="post" action="folders.php" name="sf" id="sf">
189 <input type="hidden" name="smtoken" value="<?php echo sm_generate_security_token(); ?>" />
190 <input type="hidden" name="smaction" value="subscribe" />
194 <select name="folder_names[]" multiple="multiple" size="8">
195 <?php echo $subbox_option_list ?>
198 foreach ($subbox_option_list as $folder) {
199 echo '<input type="checkbox" name="folder_names[]" id="sub_'.$folder['Value'].'" value="'.$folder['Value'].'" /> '.
200 '<label for="sub_'.$folder['Value'].'">'.$folder['Display'].'</label><br />';
205 <input type="submit" value="<?php echo _("Subscribe") ?>" />
209 echo _("No folders were found to subscribe to.");
218 <?php /* Known plugins using this output point: empty_folders */ if (!empty($plugin_output['folders_bottom'])) echo $plugin_output['folders_bottom']; ?>