modal.category.php 1.1 KB

12345678910111213141516171819202122232425262728
  1. <?php
  2. require_once __DIR__.SLASH.'WikiCategory.class.php';
  3. $category = new WikiCategory() ;
  4. $category->icon = 'far fa-bookmark';
  5. $category->color = WikiCategory::color();
  6. if(isset($_['id'])) $category = WikiCategory::getById($_['id']);
  7. ?>
  8. <div onclick="wiki_category_save();" class="btn btn-success float-right"><i class="fas fa-check"></i> Enregistrer</div>
  9. <h1>Édition d'une catégorie</h1>
  10. <div class="clear"></div>
  11. <div id="category-form" class="row category-form" data-action="wiki_category_save" data-id="<?php echo $category->id; ?>">
  12. <div class="col-md-12">
  13. <label for="label">Titre :</label>
  14. <div class="input-group">
  15. <div class="input-group-prepend icon-chooser">
  16. <input id="icon" class="form-control" data-type="icon" value="<?php echo $category->icon; ?>" type="text">
  17. </div>
  18. <input id="label" class="form-control" placeholder="eg. New Category" value="<?php echo $category->label; ?>" type="text">
  19. <div class="input-group-append">
  20. <input id="color" name="color" class="form-control" value="<?php echo $category->color; ?>" type="color">
  21. </div>
  22. </div>
  23. <br>
  24. </div>
  25. </div>