/modules/mod_admin_category/templates/_action_dialog_category_add.tpl

https://code.google.com/p/zotonic/ · Smarty Template · 40 lines · 31 code · 9 blank · 0 comment · 1 complexity · a208f140dee0ae1d8f8cb27e74bec876 MD5 · raw file

  1. <p>Please specify the title, unique name and optional parent of the new category.</p>
  2. {% wire id=#form type="submit" postback={category_add on_success=on_success} delegate=delegate %}
  3. <form id="{{ #form }}" method="POST" action="postback">
  4. <div class="new-category-wrapper">
  5. <div class="form-item clearfix">
  6. <label for="{{ #title }}">Title</label>
  7. <input id="{{ #title }}" type="text" name="title" value="" />
  8. </div>
  9. {% validate id=#title name="title" type={presence} %}
  10. <div class="form-item clearfix">
  11. <label for="{{ #name }}">Name</label>
  12. <input id="{{ #name }}" type="text" name="name" value="" />
  13. </div>
  14. {% validate id=#name name="name" type={presence} %}
  15. <div class="form-item clearfix">
  16. <label for="{{ #category }}">Below category</label>
  17. <select id="{{ #category }}" name="category_id">
  18. <option value=""></option>
  19. {% for cat_id, level, indent, name in m.category.all_flat %}
  20. <option value="{{cat_id}}">
  21. {{ indent }}{{ m.rsc[cat_id].title|default:name }}
  22. </option>
  23. {% endfor %}
  24. </select>
  25. </div>
  26. <div class="form-item clearfix">
  27. <button type="submit">Make category</button>
  28. {% button text="Cancel" action={dialog_close} %}
  29. </div>
  30. </div>
  31. </form>