add.html.php 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php if (empty($anime)): ?>
  2. <h2 class="ribbon full">Find an Anime:</h2>
  3. <div class="triangle-ribbon"></div>
  4. <br class="clear" />
  5. <?php else: ?>
  6. <h2 class="ribbon full"><?= $anime->title ?></h2>
  7. <div class="triangle-ribbon"></div>
  8. <br class="clear" />
  9. <?php endif; ?>
  10. <?php
  11. echo $this->form->create($entry);
  12. //Hidden because the user can't change these.
  13. //These are stored in the anime list for faster lookup times,
  14. //So we can avoid getting this data live for every anime.
  15. if (isset($anime)) {
  16. echo $this->form->hidden('series_animedb_id', array('value' => $anime->special_id));
  17. echo $this->form->hidden('series_title', array('value' => $anime->title));
  18. echo $this->form->hidden('series_type', array('value' => $anime->view_type));
  19. echo $this->form->hidden('series_episodes', array('value' => $anime->episode_count));
  20. }
  21. echo $this->form->field('my_watched_episodes', array('label' => 'Watched Episodes'));
  22. echo $this->form->field('my_start_date', array('label' => 'Start Date'));
  23. echo $this->form->field('my_finish_date', array('label' => 'Finish Date'));
  24. echo $this->form->field('my_score', array('label' => 'Score'));
  25. echo $this->form->label('my_status', 'Status');
  26. echo $this->form->select('my_status', array('Plan to Watch' => 'Plan to Watch',
  27. 'On-Hold' => 'On-Hold',
  28. 'Completed' => 'Completed',
  29. 'Watching' => 'Watching',
  30. 'Dropped' => 'Dropped'));
  31. echo $this->form->field('my_comments', array('label' => 'Comments'));
  32. echo $this->form->field('my_times_watched', array('label' => 'Times Watched'));
  33. echo $this->form->label('rewatch_value', 'Rewatch Value');
  34. echo $this->form->select('rewatch_value', array('High', 'Medium', 'Low', 'None'), array('value' => 0));
  35. echo $this->form->field('tags', array('type' => 'textarea'));
  36. echo $this->form->checkbox('rewatching', array('label' =>'Rewatching?', 'value' => false));
  37. echo $this->form->submit('Save!');
  38. ?>