add.html.php 2.2 KB

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