No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

admin_edit.html 1.4KB

1234567891011121314151617181920212223242526272829303132
  1. {% extends "base_backend.html" %}
  2. {% import "admin/editable_component.html" as edit %}
  3. {% set uidfield = target.uid_fieldname()[0] %}
  4. {% set objects = target.get(('%s = %s') % (uidfield, lodel_id)) %}
  5. {% set obj = objects.pop() %}
  6. {% block title %}Edit Object{% endblock %}
  7. {% block body %}
  8. <ol class="breadcrumb">
  9. <li><a href="/{{ root_url }}/admin">Home</a></li>
  10. <li><a href="/{{ root_url }}/admin/classes_admin">Edition</a></li>
  11. <li><a href="/{{ root_url }}/admin/class_admin?classname={{ target.__name__ }}">{{ target.__name__ }}</a></li>
  12. <li class="active">Edit</li>
  13. </ol>
  14. {% if msg is not none %}
  15. {% block msg %} <p style="color:red; font-size:20pt; font-weight:bold">{{ msg }}</p> {% endblock %}
  16. {% endif %}
  17. <h1 class="h1_lodel">Lodel 2 - Edit {{ target.__name__ }} with uid {{ lodel_id }} </h1>
  18. <form class="form-horizontal" action="" method ="post">
  19. <input type="hidden" name="uid" value="{{ lodel_id}}" />
  20. <input type="hidden" name="classname" value={{ target.__name__ }} />
  21. {% for fieldname, fieldvalue in obj.fields().items() %}
  22. <div class="form-group">
  23. <div style="padding-bottom:15px;"> {{edit.input(fieldname, fieldvalue, obj.data(fieldname)) }} </div>
  24. </div>
  25. {% endfor %}
  26. <button type="submit" class="btn btn-primary">Save</button>
  27. <a class="btn btn-default" href="classes_admin">Return</a>
  28. </form>
  29. <div>
  30. </div>
  31. {% endblock %}