mirror of
https://github.com/flextype/flextype.git
synced 2025-08-19 11:21:30 +02:00
feat(admin-plugin): update all <small> tag in the templates #211
This commit is contained in:
@@ -1,55 +1,55 @@
|
||||
{% extends "plugins/admin/templates/partials/base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<form method="post" id="form">
|
||||
{{ csrf() }}
|
||||
<input type="hidden" id="current_id" name="current_id" value="{{ current_id }}">
|
||||
<input type="hidden" id="fieldset" name="fieldset" value="{{ type }}">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="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_entry_label') }}</small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="id">{{ 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_entry_name') }}</small>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label>{{ tr('admin_routable') }}</label>
|
||||
<select class="form-control" name="routable">
|
||||
<option value="1" selected>{{ tr('admin_yes') }}</option>
|
||||
<option value="0">{{ tr('admin_no') }}</option>
|
||||
</select>
|
||||
<form method="post" id="form">
|
||||
{{ csrf() }}
|
||||
<input type="hidden" id="current_id" name="current_id" value="{{ current_id }}">
|
||||
<input type="hidden" id="fieldset" name="fieldset" value="{{ type }}">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="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>{{ tr('admin_help_text_for_entry_label') }}</small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="id">{{ 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>{{ tr('admin_help_text_for_entry_name') }}</small>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label>{{ tr('admin_routable') }}</label>
|
||||
<select class="form-control" name="routable">
|
||||
<option value="1" selected="selected">{{ tr('admin_yes') }}</option>
|
||||
<option value="0">{{ tr('admin_no') }}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label>{{ tr('admin_visibility') }}</label>
|
||||
<select class="form-control" name="visibility">
|
||||
<option value="visible" selected="selected">{{ tr('admin_visible') }}</option>
|
||||
<option value="hidden">{{ tr('admin_hidden') }}</option>
|
||||
<option value="draft">{{ tr('admin_draft') }}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label>{{ tr('admin_visibility') }}</label>
|
||||
<select class="form-control" name="visibility">
|
||||
<option value="visible" selected>{{ tr('admin_visible') }}</option>
|
||||
<option value="hidden">{{ tr('admin_hidden') }}</option>
|
||||
<option value="draft">{{ tr('admin_draft') }}</option>
|
||||
</select>
|
||||
<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">
|
||||
<span class="sr-only">Toggle Dropdown</span>
|
||||
</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 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">
|
||||
<span class="sr-only">Toggle Dropdown</span>
|
||||
</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 %}
|
@@ -13,7 +13,7 @@
|
||||
<div class="form-group">
|
||||
<label for="entryName">{{ tr('admin_name') }}</label>
|
||||
<input type="text" id="entryName" name="name" value="{{name_current}}" class="form-control" required="required" data-validation="length required" data-validation-allowing = "-_" 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_entry_name') }}</small>
|
||||
<small>{{ tr('admin_help_text_for_entry_name') }}</small>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
|
@@ -13,7 +13,7 @@
|
||||
<option value="{{ key }}" {% if key == fieldset %}selected{% endif %}>{{ value }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<small class="form-text text-muted">{{ tr('admin_help_text_for_entry_type') }}</small>
|
||||
<small>{{ tr('admin_help_text_for_entry_type') }}</small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="submit" id="saveEntry" name="save_entry" value="{{ tr('admin_save') }}" class="buttonbtn-black btn-fill btn-wd">
|
||||
|
@@ -36,12 +36,13 @@
|
||||
document.getElementById('duplicate-snippet-id-{{ id }}').submit();">
|
||||
<i class="icon icon--white mr-3">{{ icon('fas fa-copy') }}</i>
|
||||
{{ tr('admin_duplicate') }}</a>
|
||||
<a class="dropdown__item js-snippets-info" href="javascript:;" data-toggle="modal" data-target="#snippetsInfoModal" data-name="{{ id }}">
|
||||
<a class="dropdown__item js-snippets-info" href="javascript:;" onclick="event.preventDefault();
|
||||
embededCode('{{ id }}', {{ loop.index0 }});">
|
||||
<i class="icon icon--white mr-3">{{ icon('fas fa-code') }}</i>
|
||||
{{ tr('admin_embeded_code') }}</a>
|
||||
<div class="dropdown__divider"></div>
|
||||
<a class="dropdown__item" href="javascript:;" onclick="event.preventDefault();
|
||||
document.getElementById('delete-snippet-id-{{ id }}').submit();">
|
||||
deleteSnippet('{{ id }}', {{ loop.index0 }});">
|
||||
<i class="icon icon--white mr-3">{{ icon('fas fa-trash-alt') }}</i>
|
||||
{{ tr('admin_delete') }}</a>
|
||||
<form id="delete-snippet-id-{{ id }}" action="{{ path_for('admin.snippets.deleteProcess') }}" method="POST" style="display: none;">
|
||||
@@ -68,44 +69,47 @@
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<!-- Modal -->
|
||||
<div class="modal fade" id="snippetsInfoModal" tabindex="-1" role="dialog" aria-labelledby="snippetsInfoModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="snippetsInfoModalLabel">{{ tr('admin_embeded_code') }}</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<label for="shortcode">{{ tr('admin_shortcode') }}</label>
|
||||
<div class="alert alert-dark clipboard" role="alert">
|
||||
<span id="snippet">[snippets_exec id="<span class="js-snippets-snippet-placeholder"></span>"]</span>
|
||||
<button class="js-clipboard-buttonbtn" data-clipboard-target="#snippet">
|
||||
{{ tr('admin_copy') }}
|
||||
</button>
|
||||
</div>
|
||||
<br>
|
||||
<label for="template_code">{{ tr('admin_template_code') }}</label>
|
||||
<div id="template_code" class="alert alert-dark clipboard" role="alert">
|
||||
<span id="html">{{ snippets.exec('<span class="js-snippets-php-placeholder"></span>') }}</span>
|
||||
<button class="js-clipboard-buttonbtn" data-clipboard-target="#html">
|
||||
{{ tr('admin_copy') }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="_embeded-code-template hidden">
|
||||
<label for="shortcode">{{ tr('admin_shortcode') }}</label>
|
||||
<div class="alert alert-dark clipboard" role="alert">
|
||||
<span id="snippet">[snippets_exec id="<span class="js-snippets-snippet-placeholder"></span>"]</span>
|
||||
<button class="js-clipboard-buttonbtn" data-clipboard-target="#snippet">
|
||||
{{ tr('admin_copy') }}
|
||||
</button>
|
||||
</div>
|
||||
<br>
|
||||
<label for="template_code">{{ tr('admin_template_code') }}</label>
|
||||
<div id="template_code" class="alert alert-dark clipboard" role="alert">
|
||||
<span id="html">{{ snippets.exec('<span class="js-snippets-php-placeholder"></span>') }}</span>
|
||||
<button class="js-clipboard-buttonbtn" data-clipboard-target="#html">
|
||||
{{ tr('admin_copy') }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block tail %}
|
||||
<script type="text/javascript">
|
||||
$('.js-snippets-info').click(function () {
|
||||
$('#snippetsInfoModal').modal();
|
||||
$('.js-snippets-snippet-placeholder').html($(this).attr('data-name'));
|
||||
$('.js-snippets-php-placeholder').html($(this).attr('data-name'));
|
||||
});
|
||||
<script>
|
||||
function deleteSnippet(id, row_num) {
|
||||
dropdown[row_num].hide();
|
||||
Swal.fire(
|
||||
{title: "{{ tr('admin_cofirmation_required') }}", text: "{{ tr('admin_cofirmation_required_for_delivery_token') }}", showCancelButton: true, confirmButtonText: "{{ tr('admin_yes_iam_sure')|raw }}", cancelButtonText: "{{ tr('admin_cancel') }}"}
|
||||
).then((result) => {
|
||||
if (result.value) {
|
||||
document.getElementById('delete-snippet-id-' + id).submit();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function embededCode(id, row_num) {
|
||||
dropdown[row_num].hide();
|
||||
Swal.fire({
|
||||
title: "{{ tr('admin_embeded_code') }}",
|
||||
html: '<div><label>{{ tr("admin_shortcode") }}</label><div class="form-control"><span id="snippet">[snippets_exec id="' + id + '"]</span><button class="js-clipboard-buttonbtn" data-clipboard-target="#snippet">{{ tr("admin_copy") }}</button></div><br><label for="template_code"' +
|
||||
'>{{ tr("admin_template_code") }}</label><div id="template_code" class="alert alert-dark clipboard" role="alert"><span id="html">{{ snippets.exec("' + id + '") }}</span><button class="js-clipboard-buttonbtn" data-clipboard-target' +
|
||||
'="#html">{{ tr("admin_copy") }}</button></div></div>'
|
||||
});
|
||||
}
|
||||
</script>
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
@@ -76,14 +76,9 @@
|
||||
<script>
|
||||
function deleteDeliveryToken(id, row_num) {
|
||||
dropdown[row_num].hide();
|
||||
Swal.fire({
|
||||
title: "{{ tr('admin_cofirmation_required') }}",
|
||||
text: "{{ tr('admin_cofirmation_required_for_delivery_token') }}",
|
||||
showCancelButton: true,
|
||||
confirmButtonText: "{{ tr('admin_yes_iam_sure')|raw }}",
|
||||
cancelButtonText: "{{ tr('admin_cancel') }}",
|
||||
reverseButtons: true
|
||||
}).then((result) => {
|
||||
Swal.fire(
|
||||
{title: "{{ tr('admin_cofirmation_required') }}", text: "{{ tr('admin_cofirmation_required_for_delivery_token') }}", showCancelButton: true, confirmButtonText: "{{ tr('admin_yes_iam_sure')|raw }}", cancelButtonText: "{{ tr('admin_cancel') }}"}
|
||||
).then((result) => {
|
||||
if (result.value) {
|
||||
document.getElementById('delete-api-token-id-' + id).submit();
|
||||
}
|
||||
|
@@ -145,7 +145,7 @@
|
||||
<div class="form-group">
|
||||
<label for="entries[media][upload_images_width]" class="form-control-title">{{ tr('admin_width') }}</label>
|
||||
<input type="text" id="systemSettingsSystemTheme" name="entries[media][upload_images_width]" value="{{ registry.settings.entries.media.upload_images_width }}" class="form-control" required="required">
|
||||
<small class="form-text text-muted">{{ tr('admin_help_text_for_settings_media_image_width_label') }}</small>
|
||||
<small>{{ tr('admin_help_text_for_settings_media_image_width_label') }}</small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="entries[media][upload_images_height]" class="form-control-title">{{ tr('admin_height') }}</label>
|
||||
|
@@ -16,21 +16,21 @@
|
||||
<div class="form-group">
|
||||
<label>{{ tr('admin_username') }}</label>
|
||||
<input type="text" name="username" value="" class="form-control" placeholder="" pattern="^[a-z0-9_-]{3,16}$" required="required">
|
||||
<small class="form-text text-muted">
|
||||
<small>
|
||||
Lowercase chars only, e.g. admin
|
||||
</small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="email">{{ tr('admin_email') }}</label>
|
||||
<input type="text" name="email" value="" class="form-control" placeholder="" required="required">
|
||||
<small class="form-text text-muted">
|
||||
<small>
|
||||
Valid email address
|
||||
</small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="password">{{ tr('admin_password') }}</label>
|
||||
<input type="password" name="password" value="" class="form-control" placeholder="" pattern="(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,}" required="required">
|
||||
<small class="form-text text-muted">
|
||||
<small>
|
||||
The password must have at least 8 characters, contain uppercase letters, lowercase letters, special characters and numbers.
|
||||
</small>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user