1
0

template_form.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435
  1. <div class="container mt-3 py-4">
  2. <h2><?=htmlspecialchars($page_title)?></h2>
  3. <form method="post">
  4. <div class="row mb-1">
  5. <label class="col-sm-4 col-form-label" for="name">Name</label>
  6. <div class="col-sm">
  7. <input class="form-control" name="name" id="name" placeholder="Enter name" value="<?=htmlspecialchars($template->name)?>" required />
  8. </div>
  9. </div>
  10. <div class="row mb-1">
  11. <label class="col-sm-4 col-form-label" for="json">
  12. JSON Template Configuration
  13. <small class="form-text text-danger">Do not touch this if you don't know what you're doing.</small>
  14. </label>
  15. <div class="col-sm">
  16. <textarea class="form-control text-monospace" name="json" id="json" placeholder="Enter JSON" rows="24" required><?=htmlspecialchars($template->json)?></textarea>
  17. </div>
  18. </div>
  19. <div class="row mt-3 mb-3">
  20. <div class="col-sm offset-sm-4">
  21. <div class="form-check">
  22. <input class="form-check-input" type="checkbox" name="practice" id="practice" value="1" <?=Form::checked($template->practice)?> />
  23. <label for="practice" class="form-check-label">Enabled for Practice</label>
  24. </div>
  25. </div>
  26. </div>
  27. <div class="row">
  28. <div class="col-sm offset-sm-4">
  29. <button class="btn btn-primary" type="submit" name="submit" value="<?=htmlspecialchars($_SESSION["csrf_token"])?>">Submit</button>
  30. </div>
  31. </div>
  32. </form>
  33. </div>