1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-24 05:43:10 +02:00

feat(admin-panel): add help text for common form controls #280

This commit is contained in:
Awilum
2019-11-06 20:32:31 +03:00
parent 0bccc728ae
commit 795642e8f9
3 changed files with 12 additions and 0 deletions

View File

@@ -199,6 +199,10 @@ admin_sqlite3_database: "SQLite3 Database"
admin_sqlite3_table: "SQLite3 Table"
admin_error_name_empty_input: "Name has to be an alphanumeric value (from 1 chars)"
admin_error_title_empty_input: "Title has to be an alphanumeric value (from 1 chars)"
admin_error_icon_empty_input: "Icon has to be an alphanumeric value (from 1 chars)"
admin_help_text_for_label: "The fieldsets label shown in the Admin Panel."
admin_help_text_for_name: "The fieldsets unique name in lowercase chars only."
admin_help_text_for_icon: "The fieldsets valid :link icon class."
admin_entries_visible: "Visible"
admin_entries_draft: "Draft"
admin_entries_hidden: "Hidden"

View File

@@ -8,10 +8,17 @@
<div class="form-group">
<label for="title">{{ tr('admin_title') }}</label>
<input type="text" id="fieldsetTitle" name="title" value="" class="form-control" required="required" data-validation="length required" data-validation-length="min1" data-validation-error-msg="{{ tr('admin_error_title_empty_input') }}">
<small class="form-text text-muted">{{ tr('admin_help_text_for_label') }}</small>
</div>
<div class="form-group">
<label for="id">{{ tr('admin_name') }}</label>
<input type="text" id="fieldsetId" name="id" value="" class="form-control" required="required" data-validation="length required" data-validation-length="min1" data-validation-error-msg="{{ tr('admin_error_name_empty_input') }}">
<small class="form-text text-muted">{{ tr('admin_help_text_for_name') }}</small>
</div>
<div class="form-group">
<label for="icon">{{ tr('admin_icon') }}</label>
<input type="text" id="fieldsetIcon" name="icon" value="far fa-file-alt" class="form-control" required="required" data-validation="length required" data-validation-length="min1" data-validation-error-msg="{{ tr('admin_error_icon_empty_input') }}">
<small class="form-text text-muted">{{ tr('admin_help_text_for_icon', {':link': '<a href="https://fontawesome.com/icons?d=gallery&m=free" target="_blank">fontawesome</a>'})|raw }}</small>
</div>
<div class="form-group">
<input type="submit" id="createFieldset" name="create_fieldset" value="{{ tr('admin_create') }}" class="btn btn-black">

View File

@@ -9,6 +9,7 @@
<div class="form-group">
<label for="id">{{ tr('admin_name') }}</label>
<input type="text" id="fieldsetId" name="id" value="{{ id }}" class="form-control" required="required" data-validation="length required" data-validation-length="min1" data-validation-error-msg="{{ tr('admin_error_name_empty_input') }}">
<small class="form-text text-muted">{{ tr('admin_help_text_for_name') }}</small>
</div>
<div class="form-group">
<input type="submit" id="renameFieldset" name="rename_fieldset" value="{{ tr('admin_save') }}" class="btn btn-black">