summaryrefslogtreecommitdiff
path: root/app/Template/task_file/new.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-02-14 15:49:59 -0500
committerFrederic Guillot <fred@kanboard.net>2016-02-14 15:49:59 -0500
commit8477da26437cd927b47fbac8874e2a7e02b580ca (patch)
tree2e1b256eba73a3b719f57ff5df8b4497faa2c3f9 /app/Template/task_file/new.php
parent8e25c875f26b05e3138fb4d09d9f720456c09f76 (diff)
Rename File controller to TaskFile
Diffstat (limited to 'app/Template/task_file/new.php')
-rw-r--r--app/Template/task_file/new.php33
1 files changed, 33 insertions, 0 deletions
diff --git a/app/Template/task_file/new.php b/app/Template/task_file/new.php
new file mode 100644
index 00000000..f03ce8dc
--- /dev/null
+++ b/app/Template/task_file/new.php
@@ -0,0 +1,33 @@
+<div class="page-header">
+ <h2><?= t('Attach a document') ?></h2>
+</div>
+<div id="file-done" style="display:none">
+ <p class="alert alert-success">
+ <?= t('All files have been uploaded successfully.') ?>
+ <?= $this->url->link(t('View uploaded files'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
+ </p>
+</div>
+
+<div id="file-error-max-size" style="display:none">
+ <p class="alert alert-error">
+ <?= t('The maximum allowed file size is %sB.', $this->text->bytes($max_size)) ?>
+ <a href="#" id="file-browser"><?= t('Choose files again') ?></a>
+ </p>
+</div>
+
+<div
+ id="file-dropzone"
+ data-max-size="<?= $max_size ?>"
+ data-url="<?= $this->url->href('TaskFile', 'save', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>">
+ <div id="file-dropzone-inner">
+ <?= t('Drag and drop your files here') ?> <?= t('or') ?> <a href="#" id="file-browser"><?= t('choose files') ?></a>
+ </div>
+</div>
+
+<input type="file" name="files[]" multiple style="display:none" id="file-form-element">
+
+<div class="form-actions">
+ <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue" id="file-upload-button" disabled>
+ <?= t('or') ?>
+ <?= $this->url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?>
+</div>