<form method="post" name="import_form" enctype="multipart/form-data" action="<?php echo Horde::applicationUrl('data.php') ?>">
<input type="hidden" name="actionID" value="<?php echo $next_step ?>" />
<input type="hidden" name="import_step" value="<?php echo $import_step ?>" />
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
    <td>
        <table cellpadding="3" cellspacing="0" border="0" width="100%">
        <tr><td class="header" align="center"><?php echo sprintf(_("Import Notes, Step %d"), $import_step) ?></td>
        </tr></table>
    </td>
</tr>
<tr>
    <td class="item">
    <table border="0"><tr><td>
        <?php echo _("Select the source to import from:") ?><br />
        <select name="import_format">
            <option value="csv">CSV</option>
        </select><br />

<?php if (!$prefs->isLocked('default_notepad') && count($notepads = Mnemo::listNotepads())): ?>
        <br /><?php echo _("Which Notepad should the notes be added to?") ?><br />
        <select id="notepad_target" name="notepad_target">
        <?php
        foreach ($notepads as $id => $notepad) {
          if ($notepad->hasPermission(Auth::getAuth(), _PERMS_EDIT)) {
              $sel = ($id == $prefs->getValue('default_notepad')) ? ' selected="selected"' : '';
              echo sprintf('<option value="%s"%s>%s</option>',
                    $id, $sel, $notepad->getShareName()) . "\n";
          }
        } ?>
        </select><br/>
<?php else: ?>
        <input type="hidden" name="notepad_target" value="<?php echo Auth::getAuth() ?>" />
<?php endif; ?>
        <br />

        <?php echo _("Select the file to import:") ?><br />
        <input type="file" name="import_file" class="fixed" size="40" />
        <input type="submit" value="<?php echo _("Next") ?>" class="button" />
    </td></tr></table>
    </td>
</tr>
</table>
</form>
