Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extract HTML from SqlQueryForm::getHtmlForInsert
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
- Loading branch information
1 parent
1a14b3e
commit 732236c
Showing
5 changed files
with
148 additions
and
174 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
<a id="querybox"></a> | ||
<div id="queryboxcontainer"> | ||
<fieldset id="queryboxf"> | ||
<legend>{{ legend|raw }}</legend> | ||
<div id="queryfieldscontainer"> | ||
<div id="{{ columns_list is not empty ? 'sqlquerycontainer' : 'sqlquerycontainerfull' }}"> | ||
<textarea tabindex="100" name="sql_query" id="sqlquery" cols="{{ textarea_cols }}" rows="{{ textarea_rows * 2 }}" | ||
{{- textarea_auto_select ? ' onclick="Functions.selectContent(this, sqlBoxLocked, true);"' }}> | ||
{{- query -}} | ||
</textarea> | ||
<div id="querymessage"></div> | ||
|
||
{% if columns_list is not empty %} | ||
<input type="button" value="SELECT *" id="selectall" class="btn btn-secondary button sqlbutton"> | ||
<input type="button" value="SELECT" id="select" class="btn btn-secondary button sqlbutton"> | ||
<input type="button" value="INSERT" id="insert" class="btn btn-secondary button sqlbutton"> | ||
<input type="button" value="UPDATE" id="update" class="btn btn-secondary button sqlbutton"> | ||
<input type="button" value="DELETE" id="delete" class="btn btn-secondary button sqlbutton"> | ||
{% endif %} | ||
<input type="button" value="{% trans 'Clear' %}" id="clear" class="btn btn-secondary button sqlbutton"> | ||
{% if codemirror_enable %} | ||
<input type="button" value="{% trans 'Format' %}" id="format" class="btn btn-secondary button sqlbutton"> | ||
{% endif %} | ||
<input type="button" value="{% trans 'Get auto-saved query' %}" id="saved" class="btn btn-secondary button sqlbutton"> | ||
|
||
<div> | ||
<input type="checkbox" name="parameterized" id="parameterized"> | ||
<label for="parameterized">{% trans 'Bind parameters' %}</label> | ||
{{ show_docu('faq', 'faq6-40') }} | ||
<div id="parametersDiv"></div> | ||
</div> | ||
</div> | ||
|
||
{% if columns_list is not empty %} | ||
<div id="tablefieldscontainer"> | ||
<label>{% trans 'Columns' %}</label> | ||
<select id="tablefields" name="dummy" size="{{ textarea_rows - 2 }}" ondblclick="Functions.insertValueQuery()" multiple> | ||
{% for field in columns_list %} | ||
<option value="{{ backquote(field['Field']) }}" | ||
{{- field['Field'] is not null and field['Comment'] is not null and field['Field']|length > 0 ? ' title="' ~ field['Comment'] ~ '"' }}> | ||
{{ field['Field'] }} | ||
</option> | ||
{% endfor %} | ||
</select> | ||
|
||
<div id="tablefieldinsertbuttoncontainer"> | ||
{% if show_icons('ActionLinksMode') %} | ||
<input type="button" class="btn btn-secondary button" name="insert" value="{{ '<<' }}" onclick="Functions.insertValueQuery()" title="{% trans 'Insert' %}"> | ||
{% else %} | ||
<input type="button" class="btn btn-secondary button" name="insert" value="{% trans 'Insert' %}" onclick="Functions.insertValueQuery()"> | ||
{% endif %} | ||
</div> | ||
</div> | ||
{% endif %} | ||
|
||
<div class="clearfloat"></div> | ||
</div> | ||
|
||
{% if has_bookmark %} | ||
<div id="bookmarkoptions"> | ||
<div class="formelement"> | ||
<label for="bkm_label">{% trans 'Bookmark this SQL query:' %}</label> | ||
<input type="text" name="bkm_label" id="bkm_label" tabindex="110" value=""> | ||
</div> | ||
|
||
<div class="formelement"> | ||
<input type="checkbox" name="bkm_all_users" tabindex="111" id="id_bkm_all_users" value="true"> | ||
<label for="id_bkm_all_users">{% trans 'Let every user access this bookmark' %}</label> | ||
</div> | ||
|
||
<div class="formelement"> | ||
<input type="checkbox" name="bkm_replace" tabindex="112" id="id_bkm_replace" value="true"> | ||
<label for="id_bkm_replace">{% trans 'Replace existing bookmark of same name' %}</label> | ||
</div> | ||
</div> | ||
{% endif %} | ||
|
||
<div class="clearfloat"></div> | ||
</fieldset> | ||
</div> | ||
|
||
<fieldset id="queryboxfooter" class="tblFooters"> | ||
<div class="formelement"></div> | ||
|
||
<div class="formelement"> | ||
[ | ||
<label for="id_sql_delimiter">{% trans 'Delimiter' %}</label> | ||
<input type="text" name="sql_delimiter" tabindex="131" size="3" value="{{ delimiter }}" id="id_sql_delimiter"> | ||
] | ||
</div> | ||
|
||
<div class="formelement"> | ||
<input type="checkbox" name="show_query" value="1" id="checkbox_show_query" tabindex="132"> | ||
<label for="checkbox_show_query">{% trans 'Show this query here again' %}</label> | ||
</div> | ||
|
||
<div class="formelement"> | ||
<input type="checkbox" name="retain_query_box" value="1" id="retain_query_box" tabindex="133" | ||
{{- retain_query_box ? ' checked' }}> | ||
<label for="retain_query_box">{% trans 'Retain query box' %}</label> | ||
</div> | ||
|
||
<div class="formelement"> | ||
<input type="checkbox" name="rollback_query" value="1" id="rollback_query" tabindex="134"> | ||
<label for="rollback_query">{% trans 'Rollback when finished' %}</label> | ||
</div> | ||
|
||
<div class="formelement"> | ||
{{ get_fk_checkbox() }} | ||
</div> | ||
|
||
<input class="btn btn-primary" type="submit" id="button_submit_query" name="SQL" tabindex="200" value="{% trans 'Go' %}"> | ||
|
||
<div class="clearfloat"></div> | ||
</fieldset> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters