Format template

This commit is contained in:
Mo 2023-02-25 20:47:34 +01:00
parent 70dea0440a
commit 1ac042ebee
2 changed files with 42 additions and 42 deletions

View file

@ -3,4 +3,4 @@ default_job = "clippy"
[jobs.clippy]
command = ["cargo", "clippy", "-q", "--all-targets", "--color", "always", "--workspace"]
need_stdout = false
watch = ["tests", "benches", "examples", "crates"]
watch = ["tests", "benches", "examples", "crates", "templates"]

View file

@ -41,51 +41,51 @@
<label for="{{ custom_field.id }}" class="form-label">{{ custom_field.label }}</label>
{% match custom_field.field_type %}
{% when config::CustomFieldType::Text %}
<input type="text"
class="form-control"
name="{{ custom_field.id }}"
id="{{ custom_field.id }}"
value="{{ value }}"
{% if required %}required{% endif %}>
{% when config::CustomFieldType::Textarea with { rows } %}
<textarea rows="{{ rows }}"
style="resize: none"
class="form-control"
name="{{ custom_field.id }}"
id="{{ custom_field.id }}"
{% if required %}required{% endif %}>{{ value }}</textarea>
{% endmatch %}
{% when config::CustomFieldType::Text %}
<input type="text"
class="form-control"
name="{{ custom_field.id }}"
id="{{ custom_field.id }}"
value="{{ value }}"
{% if required %}required{% endif %}>
{% when config::CustomFieldType::Textarea with { rows } %}
<textarea rows="{{ rows }}"
style="resize: none"
class="form-control"
name="{{ custom_field.id }}"
id="{{ custom_field.id }}"
{% if required %}required{% endif %}>{{ value }}</textarea>
{% endmatch %}
{% match custom_field.required_feedback %}
{% when Some with (feedback) %}
<div class="invalid-feedback">{{ feedback }}</div>
{% when None %}
{% endmatch %}
</div>
{% endfor %}
{% match custom_field.required_feedback %}
{% when Some with (feedback) %}
<div class="invalid-feedback">{{ feedback }}</div>
{% when None %}
{% endmatch %}
</div>
{% endfor %}
<div class="mb-2 mt-4">
<img src="data:image/png;base64,{{ captcha }}">
</div>
<div class="mb-3">
<label for="captcha_answer" class="form-label">{{ strings.captcha_field.label }}</label>
<input type="text"
name="captcha_answer"
class="form-control"
id="captcha_answer"
required>
<div class="invalid-feedback">{{ strings.captcha_field.required_feedback }}</div>
</div>
<div class="mb-2 mt-4">
<img src="data:image/png;base64,{{ captcha }}">
</div>
<div class="mb-3">
<label for="captcha_answer" class="form-label">{{ strings.captcha_field.label }}</label>
<input type="text"
name="captcha_answer"
class="form-control"
id="captcha_answer"
required>
<div class="invalid-feedback">{{ strings.captcha_field.required_feedback }}</div>
</div>
{% if error_message.len() > 0 %}
<div class="alert alert-warning" role="alert">{{ error_message }}</div>
{% endif %}
{% if error_message.len() > 0 %}
<div class="alert alert-warning" role="alert">{{ error_message }}</div>
{% endif %}
<div class="d-grid">
<button type="submit" class="btn btn-primary">{{ strings.submit }}</button>
</div>
</form>
<div class="d-grid">
<button type="submit" class="btn btn-primary">{{ strings.submit }}</button>
</div>
</form>
{% endblock %}
{% block scripts %}