add.html.php 1.3 KB

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. $this->form->config(array('templates' => array(
  3. 'error' => '<div class="notification error">{:content}</div>')));
  4. $this->styles($this->html->style('jquery.tagsinput.css'));
  5. $this->scripts($this->html->script('jquery.tagsinput.min.js'));
  6. ?>
  7. <h2 class="ribbon"><?= $anime->title ?></h2>
  8. <div class="triangle-ribbon"></div>
  9. <br class="cl" />
  10. <?php ob_start(); ?>
  11. <script>
  12. $(function() {
  13. $('#tags').tagsInput();
  14. });
  15. </script>
  16. <?php $this->scripts(ob_get_clean()); ?>
  17. <?php
  18. echo $this->form->create($entry);
  19. echo $this->form->hidden('series_animedb_id', array('value' => $anime->special_id));
  20. echo $this->form->field('episodes', array('label' => 'Watched Episodes'));
  21. echo $this->form->field('score', array('label' => 'Score'));
  22. echo $this->form->label('status', 'Status');
  23. echo $this->form->select('status', array('Plan to Watch' => 'Plan to Watch',
  24. 'On-Hold' => 'On-Hold',
  25. 'Completed' => 'Completed',
  26. 'Watching' => 'Watching',
  27. 'Dropped' => 'Dropped'));
  28. echo $this->form->field('tags', array('type' => 'textarea', 'id' => 'tags'));
  29. echo $this->form->submit('Save!');
  30. echo $this->form->end();
  31. ?>