zoom_result_form.twig 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <form method="post" action="tbl_zoom_select.php" name="displayResultForm" id="zoom_display_form" class="ajax">
  2. {{ Url_getHiddenInputs(db, table) }}
  3. <input type="hidden" name="goto" value="{{ goto }}" />
  4. <input type="hidden" name="back" value="tbl_zoom_select.php" />
  5. <fieldset id="displaySection">
  6. <legend>{% trans 'Browse/Edit the points' %}</legend>
  7. {# JSON encode the data(query result) #}
  8. <center>
  9. {% if zoom_submit and data is not empty %}
  10. <div id="resizer">
  11. <center>
  12. <a id="help_dialog" href="#">
  13. {% trans 'How to use' %}
  14. </a>
  15. </center>
  16. <div id="querydata" class="hide">
  17. {{ data_json }}
  18. </div>
  19. <div id="querychart"></div>
  20. <button class="button-reset">
  21. {% trans 'Reset zoom' %}
  22. </button>
  23. </div>
  24. {% endif %}
  25. </center>
  26. {# Displays rows in point edit form #}
  27. <div id="dataDisplay" class="hide">
  28. <table>
  29. <thead>
  30. <tr>
  31. <th>{% trans 'Column' %}</th>
  32. <th>{% trans 'Null' %}</th>
  33. <th>{% trans 'Value' %}</th>
  34. </tr>
  35. </thead>
  36. <tbody>
  37. {% for column_index in 0..column_names|length - 1 %}
  38. {% set field_popup = column_names[column_index] %}
  39. {% set foreign_data = Relation_getForeignData(
  40. foreigners,
  41. field_popup,
  42. false,
  43. '',
  44. ''
  45. ) %}
  46. <tr class="noclick">
  47. <th>{{ column_names[column_index] }}</th>
  48. {# Null checkbox if column can be null #}
  49. <th>
  50. {% if column_null_flags[column_index] == 'YES' %}
  51. <input type="checkbox" class="checkbox_null"
  52. name="criteriaColumnNullFlags[{{ column_index }}]"
  53. id="edit_fields_null_id_{{ column_index }}" />
  54. {% endif %}
  55. </th>
  56. {# Column's Input box #}
  57. <th>
  58. {% include 'table/search/input_box.twig' with {
  59. 'str': '',
  60. 'column_type': column_types[column_index],
  61. 'column_id': column_types[column_index] ? 'edit_fieldID_' : 'fieldID_',
  62. 'in_zoom_search_edit': true,
  63. 'foreigners': foreigners,
  64. 'column_name': field_popup,
  65. 'column_name_hash': md5(field_popup),
  66. 'foreign_data': foreign_data,
  67. 'table': table,
  68. 'column_index': column_index,
  69. 'foreign_max_limit': foreign_max_limit,
  70. 'criteria_values': '',
  71. 'db': db,
  72. 'titles': titles,
  73. 'in_fbs': false
  74. } only %}
  75. </th>
  76. </tr>
  77. {% endfor %}
  78. </tbody>
  79. </table>
  80. </div>
  81. <input type="hidden" id="queryID" name="sql_query" />
  82. </form>