Format template
This commit is contained in:
parent
70dea0440a
commit
1ac042ebee
2 changed files with 42 additions and 42 deletions
|
@ -3,4 +3,4 @@ default_job = "clippy"
|
||||||
[jobs.clippy]
|
[jobs.clippy]
|
||||||
command = ["cargo", "clippy", "-q", "--all-targets", "--color", "always", "--workspace"]
|
command = ["cargo", "clippy", "-q", "--all-targets", "--color", "always", "--workspace"]
|
||||||
need_stdout = false
|
need_stdout = false
|
||||||
watch = ["tests", "benches", "examples", "crates"]
|
watch = ["tests", "benches", "examples", "crates", "templates"]
|
||||||
|
|
|
@ -41,51 +41,51 @@
|
||||||
<label for="{{ custom_field.id }}" class="form-label">{{ custom_field.label }}</label>
|
<label for="{{ custom_field.id }}" class="form-label">{{ custom_field.label }}</label>
|
||||||
|
|
||||||
{% match custom_field.field_type %}
|
{% match custom_field.field_type %}
|
||||||
{% when config::CustomFieldType::Text %}
|
{% when config::CustomFieldType::Text %}
|
||||||
<input type="text"
|
<input type="text"
|
||||||
class="form-control"
|
class="form-control"
|
||||||
name="{{ custom_field.id }}"
|
name="{{ custom_field.id }}"
|
||||||
id="{{ custom_field.id }}"
|
id="{{ custom_field.id }}"
|
||||||
value="{{ value }}"
|
value="{{ value }}"
|
||||||
{% if required %}required{% endif %}>
|
{% if required %}required{% endif %}>
|
||||||
{% when config::CustomFieldType::Textarea with { rows } %}
|
{% when config::CustomFieldType::Textarea with { rows } %}
|
||||||
<textarea rows="{{ rows }}"
|
<textarea rows="{{ rows }}"
|
||||||
style="resize: none"
|
style="resize: none"
|
||||||
class="form-control"
|
class="form-control"
|
||||||
name="{{ custom_field.id }}"
|
name="{{ custom_field.id }}"
|
||||||
id="{{ custom_field.id }}"
|
id="{{ custom_field.id }}"
|
||||||
{% if required %}required{% endif %}>{{ value }}</textarea>
|
{% if required %}required{% endif %}>{{ value }}</textarea>
|
||||||
{% endmatch %}
|
{% endmatch %}
|
||||||
|
|
||||||
{% match custom_field.required_feedback %}
|
{% match custom_field.required_feedback %}
|
||||||
{% when Some with (feedback) %}
|
{% when Some with (feedback) %}
|
||||||
<div class="invalid-feedback">{{ feedback }}</div>
|
<div class="invalid-feedback">{{ feedback }}</div>
|
||||||
{% when None %}
|
{% when None %}
|
||||||
{% endmatch %}
|
{% endmatch %}
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
<div class="mb-2 mt-4">
|
<div class="mb-2 mt-4">
|
||||||
<img src="data:image/png;base64,{{ captcha }}">
|
<img src="data:image/png;base64,{{ captcha }}">
|
||||||
</div>
|
</div>
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label for="captcha_answer" class="form-label">{{ strings.captcha_field.label }}</label>
|
<label for="captcha_answer" class="form-label">{{ strings.captcha_field.label }}</label>
|
||||||
<input type="text"
|
<input type="text"
|
||||||
name="captcha_answer"
|
name="captcha_answer"
|
||||||
class="form-control"
|
class="form-control"
|
||||||
id="captcha_answer"
|
id="captcha_answer"
|
||||||
required>
|
required>
|
||||||
<div class="invalid-feedback">{{ strings.captcha_field.required_feedback }}</div>
|
<div class="invalid-feedback">{{ strings.captcha_field.required_feedback }}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% if error_message.len() > 0 %}
|
{% if error_message.len() > 0 %}
|
||||||
<div class="alert alert-warning" role="alert">{{ error_message }}</div>
|
<div class="alert alert-warning" role="alert">{{ error_message }}</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div class="d-grid">
|
<div class="d-grid">
|
||||||
<button type="submit" class="btn btn-primary">{{ strings.submit }}</button>
|
<button type="submit" class="btn btn-primary">{{ strings.submit }}</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block scripts %}
|
{% block scripts %}
|
||||||
|
|
Loading…
Reference in a new issue