1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-20 20:01:37 +02:00

feat(admin-plugin): update fieldsets templates #211

This commit is contained in:
Awilum
2020-01-25 23:02:25 +03:00
parent 7b9d88a7cf
commit d7200c44df
3 changed files with 42 additions and 68 deletions

View File

@@ -1,59 +1,41 @@
{% extends "plugins/admin/templates/partials/base.html" %}
{% block content %}
<form method="post" id="form">
{{ csrf() }}
<div class="row">
<div class="col-md-6">
<form method="post" id="form">
{{ csrf() }}
<div class="w-full lg:w-3/12">
<div class="form-group">
<label for="title">{{ tr('admin_title') }}</label>
<label for="title" class="form-control-title">{{ tr('admin_title') }}</label>
<input type="text" id="title" 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_fieldsets_label') }}</small>
<small>{{ tr('admin_help_text_for_fieldsets_label') }}</small>
</div>
<div class="form-group">
<label for="id">{{ tr('admin_name') }}</label>
<label for="id" class="form-control-title">{{ tr('admin_name') }}</label>
<input type="text" id="id" 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_fieldsets_name') }}</small>
<small>{{ tr('admin_help_text_for_fieldsets_name') }}</small>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="row">
<div class="col-md-7">
<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_fieldsets_icon', {':link': '<a href="https://fontawesome.com/icons?d=gallery&m=free" target="_blank">fontawesome</a>'})|raw }}</small>
</div>
</div>
<div class="col-md-5">
<div class="form-group">
<label for="icon">{{ tr('admin_hide') }}</label>
<select class="form-control" id="fieldsetHide" name="hide" class="form-control">
<option value="1">{{ tr('admin_yes') }}</option>
<option value="0" selected>{{ tr('admin_no') }}</option>
</select>
<small class="form-text text-muted">{{ tr('admin_help_text_for_fieldsets_hide') }}</small>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<div class="btn-group custom-btn-group">
<input type="submit" id="create" name="create" value="{{ tr('admin_create') }}" class="buttonbtn-black">
<button type="button" class="buttondropdown-toggle dropdown-toggle-split" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<label for="icon" class="form-control-title">{{ 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>{{ tr('admin_help_text_for_fieldsets_icon', {':link': '<a href="https://fontawesome.com/icons?d=gallery&m=free" target="_blank">fontawesome</a>'})|raw }}</small>
</div>
<div class="form-group">
<label for="icon" class="form-control-title">{{ tr('admin_hide') }}</label>
<select class="js-example-basic-single form-control" id="fieldsetHide" name="hide">
<option value="1">{{ tr('admin_yes') }}</option>
<option value="0" selected="selected">{{ tr('admin_no') }}</option>
</select>
<small>{{ tr('admin_help_text_for_fieldsets_hide') }}</small>
</div>
<div class="button-group">
<input type="submit" id="create" name="create" value="{{ tr('admin_create') }}" class="button">
<button type="button" class="buttondropdown-toggle dropdown-toggle-split" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span class="sr-only">Toggle Dropdown</span>
</button>
<div class="dropdown">
</button>
<div class="dropdown">
<input type="submit" id="create-and-edit" name="create-and-edit" value="{{ tr('admin_create_and_edit') }}" class="dropdown-item">
</div>
</div>
</div>
</div>
</div>
</form>
{% endblock %}
</form>
{% endblock %}

View File

@@ -1,16 +1,10 @@
{% extends "plugins/admin/templates/partials/base.html" %}
{% block content %}
<form method="post" id="form">
{{ csrf() }}
<input type="hidden" id="action" name="action" value="save-form">
<input type="hidden" id="id" name="id" value="{{ id }}">
<div class="row">
<div class="col-12">
<div class="form-group">
<textarea name="data" rows="0" cols="0" class="form-control code-editor js-code">{{ data }}</textarea>
</div>
</div>
</div>
</form>
{% endblock %}
<form method="post" id="form">
{{ csrf() }}
<input type="hidden" id="action" name="action" value="save-form">
<input type="hidden" id="id" name="id" value="{{ id }}">
<textarea name="data" rows="0" cols="0" class="js-code">{{ data }}</textarea>
</form>
{% endblock %}

View File

@@ -1,20 +1,18 @@
{% extends "plugins/admin/templates/partials/base.html" %}
{% block content %}
<form method="post" id="form">
{{ csrf() }}
<input type="hidden" id="fieldset-id-current-{{ id }}" name="fieldset-id-current" value="{{ id }}">
<div class="row">
<div class="col-md-6">
<form method="post" id="form">
{{ csrf() }}
<input type="hidden" id="fieldset-id-current-{{ id }}" name="fieldset-id-current" value="{{ id }}">
<div class="w-full lg:w-3/12">
<div class="form-group">
<label for="id">{{ tr('admin_name') }}</label>
<label for="id" class="form-control-title">{{ tr('admin_name') }}</label>
<input type="text" id="id" 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_fieldsets_name') }}</small>
<small>{{ tr('admin_help_text_for_fieldsets_name') }}</small>
</div>
<div class="form-group">
<input type="submit" id="renameFieldset" name="rename_fieldset" value="{{ tr('admin_save') }}" class="buttonbtn-black">
<input type="submit" id="renameFieldset" name="rename_fieldset" value="{{ tr('admin_save') }}" class="button">
</div>
</div>
</div>
</form>
{% endblock %}
</form>
{% endblock %}