options_block.twig 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. <form method="post" action="sql.php" name="displayOptionsForm" class="ajax print_ignore">
  2. {{ Url_getHiddenInputs({
  3. 'db': db,
  4. 'table': table,
  5. 'sql_query': sql_query,
  6. 'goto': goto,
  7. 'display_options_form': 1
  8. }) }}
  9. {{ Util_getDivForSliderEffect('', 'Options'|trans) }}
  10. <fieldset>
  11. <div class="formelement">
  12. {# pftext means "partial or full texts" (done to reduce line lengths #}
  13. {{ Util_getRadioFields(
  14. 'pftext',
  15. {
  16. 'P': 'Partial texts'|trans,
  17. 'F': 'Full texts'|trans
  18. },
  19. pftext,
  20. true,
  21. true,
  22. '',
  23. 'pftext_' ~ unique_id
  24. ) }}
  25. </div>
  26. {% if relwork and displaywork %}
  27. <div class="formelement">
  28. {{ Util_getRadioFields(
  29. 'relational_display',
  30. {
  31. 'K': 'Relational key'|trans,
  32. 'D': 'Display column for relationships'|trans
  33. },
  34. relational_display,
  35. true,
  36. true,
  37. '',
  38. 'relational_display_' ~ unique_id
  39. ) }}
  40. </div>
  41. {% endif %}
  42. <div class="formelement">
  43. {% include 'checkbox.twig' with {
  44. 'html_field_name': 'display_binary',
  45. 'label': 'Show binary contents'|trans,
  46. 'checked': display_binary is not empty,
  47. 'onclick': false,
  48. 'html_field_id': 'display_binary_' ~ unique_id
  49. } only %}
  50. {% include 'checkbox.twig' with {
  51. 'html_field_name': 'display_blob',
  52. 'label': 'Show BLOB contents'|trans,
  53. 'checked': display_blob is not empty,
  54. 'onclick': false,
  55. 'html_field_id': 'display_blob_' ~ unique_id
  56. } only %}
  57. </div>
  58. {# I would have preferred to name this "display_transformation".
  59. This is the only way I found to be able to keep this setting sticky
  60. per SQL query, and at the same time have a default that displays
  61. the transformations. #}
  62. <div class="formelement">
  63. {% include 'checkbox.twig' with {
  64. 'html_field_name': 'hide_transformation',
  65. 'label': 'Hide browser transformation'|trans,
  66. 'checked': hide_transformation is not empty,
  67. 'onclick': false,
  68. 'html_field_id': 'hide_transformation_' ~ unique_id
  69. } only %}
  70. </div>
  71. {% if possible_as_geometry %}
  72. <div class="formelement">
  73. {{ Util_getRadioFields(
  74. 'geoOption',
  75. {
  76. 'GEOM': 'Geometry'|trans,
  77. 'WKT': 'Well Known Text'|trans,
  78. 'WKB': 'Well Known Binary'|trans
  79. },
  80. geo_option,
  81. true,
  82. true,
  83. '',
  84. 'geoOption_' ~ unique_id
  85. ) }}
  86. </div>
  87. {% else %}
  88. <div class="formelement">
  89. {{ possible_as_geometry }}
  90. {{ Util_getRadioFields(
  91. 'geoOption',
  92. {
  93. 'WKT': 'Well Known Text'|trans,
  94. 'WKB': 'Well Known Binary'|trans
  95. },
  96. geo_option,
  97. true,
  98. true,
  99. '',
  100. 'geoOption_' ~ unique_id
  101. ) }}
  102. </div>
  103. {% endif %}
  104. <div class="clearfloat"></div>
  105. </fieldset>
  106. <fieldset class="tblFooters">
  107. <input type="submit" value="{% trans 'Go' %}" />
  108. </fieldset>
  109. </div>{# slider effect div #}
  110. </form>