summaryrefslogtreecommitdiff
path: root/app/Template/project_edit/show.php
blob: 46cdb8fabdc266f74b6760551f2fbc0a73e2d369 (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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<div class="page-header">
    <h2><?= $this->text->e($project['name']) ?> &gt; <?= t('Edit project') ?></h2>
</div>
<form method="post" action="<?= $this->url->href('ProjectEditController', 'update', array('project_id' => $project['id'], 'redirect' => 'edit')) ?>" autocomplete="off">
    <?= $this->form->csrf() ?>
    <?= $this->form->hidden('id', $values) ?>

    <fieldset>
        <legend><?= t('General') ?></legend>

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

        <?= $this->form->label(t('Identifier'), 'identifier') ?>
        <?= $this->form->text('identifier', $values, $errors, array('maxlength="50"', 'tabindex="2"')) ?>
        <p class="form-help"><?= t('The project identifier is optional and must be alphanumeric, example: MYPROJECT.') ?></p>

        <?= $this->form->label(t('Description'), 'description') ?>
        <?= $this->form->textEditor('description', $values, $errors, array('tabindex' => 3)) ?>
    </fieldset>

    <fieldset>
        <legend><?= t('Permissions and ownership') ?></legend>

        <?php if ($this->user->hasProjectAccess('ProjectCreationController', 'create', $project['id'])): ?>
            <?= $this->form->checkbox('is_private', t('Private project'), 1, $project['is_private'] == 1) ?>
            <p class="form-help"><?= t('Private projects do not have users and groups management.') ?></p>
        <?php endif ?>

        <div class="form-inline">
            <?= $this->form->label(t('Project owner'), 'owner_id') ?>
            <?= $this->form->select('owner_id', $owners, $values, $errors, array('tabindex="5"')) ?>
        </div>
    </fieldset>

    <fieldset>
        <legend><?= t('Dates') ?></legend>

        <?= $this->form->date(t('Start date'), 'start_date', $values, $errors, array('tabindex="6"')) ?>
        <?= $this->form->date(t('End date'), 'end_date', $values, $errors, array('tabindex="7"')) ?>
    </fieldset>

    <fieldset>
        <legend><?= t('Priorities') ?></legend>

        <?= $this->form->label(t('Default priority'), 'priority_default') ?>
        <?= $this->form->number('priority_default', $values, $errors, array('tabindex="8"')) ?>

        <?= $this->form->label(t('Lowest priority'), 'priority_start') ?>
        <?= $this->form->number('priority_start', $values, $errors, array('tabindex="9"')) ?>

        <?= $this->form->label(t('Highest priority'), 'priority_end') ?>
        <?= $this->form->number('priority_end', $values, $errors, array('tabindex="10"')) ?>
        <p class="form-help"><?= t('If you put zero to the low and high priority, this feature will be disabled.') ?></p>
    </fieldset>

    <?= $this->modal->submitButtons(array('tabindex' => 11)) ?>
</form>