A project management app derived from Mind-Vision-Code
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

89 řádky
4.5KB

  1. <section class="stack">
  2. <div class="section-title">
  3. <span class="eyebrow">New project</span>
  4. <h1>Create a project</h1>
  5. <p>Set up a new workstream with budget, team members, and delivery milestones in one pass.</p>
  6. </div>
  7. <?php if (!empty($errors['_token'])): ?>
  8. <div class="alert alert-error"><?= e($errors['_token'][0]) ?></div>
  9. <?php endif; ?>
  10. <form class="project-form panel" method="post" action="/projects">
  11. <?= csrf_field() ?>
  12. <div class="form-grid">
  13. <label class="field">
  14. <span>Project name</span>
  15. <input class="input" type="text" name="name" maxlength="120" value="<?= e($old['name']) ?>" required>
  16. <?php if (!empty($errors['name'])): ?><small class="field-error"><?= e($errors['name'][0]) ?></small><?php endif; ?>
  17. </label>
  18. <label class="field">
  19. <span>Code</span>
  20. <input class="input" type="text" name="code" maxlength="32" value="<?= e($old['code']) ?>" placeholder="Leave blank for auto-generation">
  21. </label>
  22. <label class="field">
  23. <span>Client</span>
  24. <input class="input" type="text" name="client_name" maxlength="120" value="<?= e($old['client_name']) ?>" required>
  25. <?php if (!empty($errors['client_name'])): ?><small class="field-error"><?= e($errors['client_name'][0]) ?></small><?php endif; ?>
  26. </label>
  27. <label class="field">
  28. <span>Owner</span>
  29. <input class="input" type="text" name="owner_name" maxlength="120" value="<?= e($old['owner_name']) ?>" required>
  30. <?php if (!empty($errors['owner_name'])): ?><small class="field-error"><?= e($errors['owner_name'][0]) ?></small><?php endif; ?>
  31. </label>
  32. <label class="field">
  33. <span>Status</span>
  34. <select class="select" name="status" required>
  35. <?php foreach ($statusOptions as $option): ?>
  36. <option value="<?= e($option) ?>" <?= $old['status'] === $option ? 'selected' : '' ?>><?= e(project_status_label($option)) ?></option>
  37. <?php endforeach; ?>
  38. </select>
  39. <?php if (!empty($errors['status'])): ?><small class="field-error"><?= e($errors['status'][0]) ?></small><?php endif; ?>
  40. </label>
  41. <label class="field">
  42. <span>Color token</span>
  43. <input class="input" type="text" name="color_token" maxlength="32" value="<?= e($old['color_token']) ?>" placeholder="teal, amber, violet...">
  44. </label>
  45. <label class="field">
  46. <span>Start date</span>
  47. <input class="input" type="date" name="start_date" value="<?= e($old['start_date']) ?>" required>
  48. <?php if (!empty($errors['start_date'])): ?><small class="field-error"><?= e($errors['start_date'][0]) ?></small><?php endif; ?>
  49. </label>
  50. <label class="field">
  51. <span>Due date</span>
  52. <input class="input" type="date" name="due_date" value="<?= e($old['due_date']) ?>">
  53. <?php if (!empty($errors['due_date'])): ?><small class="field-error"><?= e($errors['due_date'][0]) ?></small><?php endif; ?>
  54. </label>
  55. <label class="field">
  56. <span>Budget (cents)</span>
  57. <input class="input" type="number" min="0" name="budget_cents" value="<?= e($old['budget_cents']) ?>">
  58. </label>
  59. </div>
  60. <label class="field">
  61. <span>Project summary</span>
  62. <textarea class="textarea" name="description" maxlength="800" required><?= e($old['description']) ?></textarea>
  63. <?php if (!empty($errors['description'])): ?><small class="field-error"><?= e($errors['description'][0]) ?></small><?php endif; ?>
  64. </label>
  65. <label class="field">
  66. <span>Team members</span>
  67. <textarea class="textarea" name="members_text" placeholder="One person per line. The first person becomes the lead."><?= e($old['members_text']) ?></textarea>
  68. <small class="helper">Write each team member on a new line. The first person becomes the project lead.</small>
  69. </label>
  70. <div class="row-actions">
  71. <button class="button button-primary" type="submit">Create project</button>
  72. <a class="button button-ghost" href="/projects">Cancel</a>
  73. </div>
  74. </form>
  75. </section>

Powered by TurnKey Linux.