auto password hash and add help_text in inputs

This commit is contained in:
long2ice
2021-05-06 21:42:39 +08:00
parent 064eceea57
commit 95b41da2b4
7 changed files with 37 additions and 1 deletions

View File

@@ -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>

View File

@@ -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 {

View File

@@ -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 }}'), {

View File

@@ -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>

View File

@@ -10,4 +10,9 @@
</select>
</div>
{% include "components/select.html" %}
{% if help_text %}
<small class="form-hint">
{{ help_text }}
</small>
{% endif %}
{% endwith %}

View File

@@ -6,5 +6,10 @@
{% endif %} {% if disabled %}
disabled
{% endif %} >
{% if help_text %}
<small class="form-hint">
{{ help_text }}
</small>
{% endif %}
</label>
</div>

View File

@@ -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>