mirror of
https://github.com/fastapi-admin/fastapi-admin.git
synced 2026-03-13 10:32:25 +08:00
auto password hash and add help_text in inputs
This commit is contained in:
@@ -2,4 +2,9 @@
|
||||
<label class="form-label">{{ label }}</label>
|
||||
<input {% if not null %}required{% endif %} type="{{ input_type }}" class="form-control" name="{{ name }}"
|
||||
placeholder="{{ placeholder }}" {% if disabled %}disabled{% endif %} value="{{ value }}">
|
||||
{% if help_text %}
|
||||
<small class="form-hint">
|
||||
{{ help_text }}
|
||||
</small>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
@@ -2,6 +2,11 @@
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/jsoneditor@9.4.0/dist/jsoneditor.min.css">
|
||||
<div class="form-label">{{ label }}</div>
|
||||
<div id="{{ name }}" class="form-group mb-3"></div>
|
||||
{% if help_text %}
|
||||
<small class="form-hint">
|
||||
{{ help_text }}
|
||||
</small>
|
||||
{% endif %}
|
||||
<input {% if not null %}required{% endif %} type="text" name="{{ name }}" value='{{ value|safe }}' hidden>
|
||||
<style>
|
||||
.jsoneditor {
|
||||
|
||||
@@ -3,6 +3,11 @@
|
||||
<div class="form-label">{{ label }}</div>
|
||||
<select multiple class="form-select" name="{{ name }}" id="{{ id }}">
|
||||
</select>
|
||||
{% if help_text %}
|
||||
<small class="form-hint">
|
||||
{{ help_text }}
|
||||
</small>
|
||||
{% endif %}
|
||||
</div>
|
||||
<script>
|
||||
new Choices(el = document.getElementById('{{ id }}'), {
|
||||
|
||||
@@ -8,4 +8,9 @@
|
||||
<span class="form-check-label">{{ option[0] }}</span>
|
||||
</label>
|
||||
{% endfor %}
|
||||
{% if help_text %}
|
||||
<small class="form-hint">
|
||||
{{ help_text }}
|
||||
</small>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
@@ -10,4 +10,9 @@
|
||||
</select>
|
||||
</div>
|
||||
{% include "components/select.html" %}
|
||||
{% if help_text %}
|
||||
<small class="form-hint">
|
||||
{{ help_text }}
|
||||
</small>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
|
||||
@@ -6,5 +6,10 @@
|
||||
{% endif %} {% if disabled %}
|
||||
disabled
|
||||
{% endif %} >
|
||||
{% if help_text %}
|
||||
<small class="form-hint">
|
||||
{{ help_text }}
|
||||
</small>
|
||||
{% endif %}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
@@ -1,7 +1,13 @@
|
||||
<div class="form-group mb-3">
|
||||
<label class="form-label">{{ label }}</label>
|
||||
<textarea {% if not null %}required{% endif %} class="form-control" name="{{ name }}" placeholder="{{ placeholder }}"
|
||||
<textarea {% if not null %}required{% endif %} class="form-control" name="{{ name }}"
|
||||
placeholder="{{ placeholder }}"
|
||||
{% if disabled %}disabled{% endif %}>
|
||||
{{ value }}
|
||||
</textarea>
|
||||
{% if help_text %}
|
||||
<small class="form-hint">
|
||||
{{ help_text }}
|
||||
</small>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user