subscribe_users.tpl 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. {% extends "jquery_mobile/layout/layout_1_col.tpl" %}
  2. {% block content %}
  3. {#
  4. <h2>{{ 'SubscribeUsersToLp' | get_lang }}</h2>
  5. <script>
  6. $().ready(function() {
  7. $('#add').click(function() {
  8. return !$('#{{ form.origin.vars.id }} option:selected').remove().appendTo('#{{ form.destination.vars.id }}');
  9. });
  10. $('#remove').click(function() {
  11. return !$('#{{ form.destination.vars.id }} option:selected').remove().appendTo('#{{ form.origin.vars.id }}');
  12. });
  13. $('#send').click(function() {
  14. $("#{{ form.destination.vars.id }}").each(function(){
  15. $("#{{ form.destination.vars.id }} option").attr("selected","selected");
  16. });
  17. });
  18. });
  19. </script>
  20. <form method="POST" {{ form_enctype(form) }}>
  21. {{ form_errors(form) }}
  22. <div class="row">
  23. <div class="span4">
  24. {{ form_label(form.origin) }}
  25. {{ form_widget(form.origin) }}
  26. </div>
  27. <div class="span1">
  28. <br />
  29. <button id="add" class="btn btn-block"><i class="icon-arrow-right icon-large"></i></button>
  30. <button id="remove" class="btn btn-block"><i class="icon-arrow-left icon-large"></i></button>
  31. </div>
  32. <div class="span4">
  33. {{ form_label(form.destination) }}
  34. {{ form_widget(form.destination) }}
  35. </div>
  36. </div>
  37. <div class="row">
  38. <div class="span12">
  39. <button id="send" type="submit" class="btn btn-primary"><i class="icon-arrow-lef icon-large"></i>{{ 'Save' | get_lang }}</button>
  40. </div>
  41. </div>
  42. {{ form_rest(form) }}
  43. </form>
  44. #}
  45. {{ formUsers }}
  46. {{ formGroups }}
  47. {% endblock %}