summaryrefslogtreecommitdiff
path: root/app/Template/project_creation/create.php
blob: 1df15d7d4947c3fccb9951000efe28f7e58ad0ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<section id="main">
    <div class="page-header">
        <h2><?= $title ?></h2>
    </div>
    <form class="popover-form" id="project-creation-form" method="post" action="<?= $this->url->href('ProjectCreationController', 'save') ?>" autocomplete="off">

        <?= $this->form->csrf() ?>
        <?= $this->form->hidden('is_private', $values) ?>

        <?= $this->form->label(t('Name'), 'name') ?>
        <?= $this->form->text('name', $values, $errors, array('autofocus', 'required', 'maxlength="50"')) ?>

        <?php if (count($projects_list) > 1): ?>
            <?= $this->form->label(t('Create from another project'), 'src_project_id') ?>
            <?= $this->form->select('src_project_id', $projects_list, $values, array(), array(), 'js-project-creation-select-options') ?>
        <?php endif ?>

        <div class="js-project-creation-options" <?= isset($values['src_project_id']) && $values['src_project_id'] > 0 ? '' : 'style="display: none"' ?>>
            <p class="alert"><?= t('Which parts of the project do you want to duplicate?') ?></p>

            <?php if (! $is_private): ?>
                <?= $this->form->checkbox('projectPermissionModel', t('Permissions'), 1, true) ?>
            <?php endif ?>

            <?= $this->form->checkbox('categoryModel', t('Categories'), 1, true) ?>
            <?= $this->form->checkbox('tagDuplicationModel', t('Tags'), 1, true) ?>
            <?= $this->form->checkbox('actionModel', t('Actions'), 1, true) ?>
            <?= $this->form->checkbox('swimlaneModel', t('Swimlanes'), 1, true) ?>
            <?= $this->form->checkbox('projectTaskDuplicationModel', t('Tasks'), 1, false) ?>
        </div>

        <div class="form-actions">
            <button type="submit" class="btn btn-blue"><?= t('Save') ?></button>
            <?= t('or') ?>
            <?= $this->url->link(t('cancel'), 'ProjectListController', 'show', array(), false, 'close-popover') ?>
        </div>
    </form>
    <?php if ($is_private): ?>
    <div class="alert alert-info">
        <p><?= t('There is no user management for private projects.') ?></p>
    </div>
    <?php endif ?>
</section>