Selects are working in user management
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
{% extends "layout.html" %}
|
||||
{% macro user_table_row(parameter, edit_text, show_text, validate, button=False) -%}
|
||||
{% macro user_table_row(parameter, edit_text, show_text, validate, button=False, id=0) -%}
|
||||
<th data-field="{{ parameter }}" id="{{ parameter }}"
|
||||
data-name="{{ parameter }}"
|
||||
data-visible="{{visiblility.get(parameter)}}"
|
||||
@@ -12,7 +12,7 @@
|
||||
{% endif %}
|
||||
{% if validate %}data-edit-validate="{{ _('This Field is Required') }}"{% endif %}>
|
||||
{% if button %}
|
||||
<div><div class="btn btn-default disabled" aria-disabled="true">{{edit_text}}</div></div><br>
|
||||
<div><div data-id="{{id}}" data-toggle="modal" data-target="#restrictModal" class="btn btn-default button_head disabled" aria-disabled="true">{{edit_text}}</div></div><br>
|
||||
{% endif %}
|
||||
{{ show_text }}
|
||||
</th>
|
||||
@@ -47,7 +47,7 @@
|
||||
data-editable-source={{url}}
|
||||
{% if validate %}data-edit-validate="{{ _('This Field is Required') }}"{% endif %}>
|
||||
<div>
|
||||
<select id="select_{{ parameter }}" disabled="">
|
||||
<select id="select_{{ parameter }}" class="header_select" onchange="selectHeader(this, '{{parameter}}')" disabled="">
|
||||
<option value="all">{{ _('Show All') }}</option>
|
||||
{% for language in languages %}
|
||||
<option value="{{language.lang_code}}">{{language.name}}</option>
|
||||
@@ -69,7 +69,7 @@
|
||||
data-editable-source={{url}}
|
||||
{% if validate %}data-edit-validate="{{ _('This Field is Required') }}"{% endif %}>
|
||||
<div>
|
||||
<select id="select_{{ parameter }}" disabled="">
|
||||
<select id="select_{{ parameter }}" class="header_select" onchange="selectHeader(this, '{{parameter}}')" disabled="">
|
||||
<option>{{_('Select...')}}</option>
|
||||
{% for translation in translations %}
|
||||
<option value="{{translation}}">{{translation.display_name|capitalize}}</option>
|
||||
@@ -104,10 +104,10 @@
|
||||
{{ user_table_row('kindle_mail', _('Enter Kindle E-mail Address'), _('Kindle E-mail'), true) }}
|
||||
{{ user_select_translations('locale', url_for('admin.table_get_locale'), _('Locale'), true) }}
|
||||
{{ user_select_languages('default_language', url_for('admin.table_get_default_lang'), _('Visible Book Languages'), true) }}
|
||||
{{ user_table_row('denied_tags', _("Edit Denied Tags"), _("Denied Tags"), true, true) }}
|
||||
{{ user_table_row('allowed_tags', _("Edit Allowed Tags"), _("Allowed Tags"), true, true) }}
|
||||
{{ user_table_row('allowed_column_value', _("Edit Allowed Column Values"), _("Allowed Column Values"), true, true) }}
|
||||
{{ user_table_row('denied_column_value', _("Edit Denied Column Values"), _("Denied Columns Values"), true, true) }}
|
||||
{{ user_table_row('denied_tags', _("Edit Denied Tags"), _("Denied Tags"), false, true, 0) }}
|
||||
{{ user_table_row('allowed_tags', _("Edit Allowed Tags"), _("Allowed Tags"), false, true, 1) }}
|
||||
{{ user_table_row('allowed_column_value', _("Edit Allowed Column Values"), _("Allowed Column Values"), false, true, 2) }}
|
||||
{{ user_table_row('denied_column_value', _("Edit Denied Column Values"), _("Denied Columns Values"), false, true, 3) }}
|
||||
{{ user_checkbox_row("role", "admin_role", _('Admin'), visiblility, all_roles)}}
|
||||
{{ user_checkbox_row("role", "download_role",_('Upload'), visiblility, all_roles)}}
|
||||
{{ user_checkbox_row("role", "upload_role", _('Download'), visiblility, all_roles)}}
|
||||
@@ -130,13 +130,14 @@
|
||||
{{ user_checkbox_row("sidebar_view", "sidebar_archived", _('Show archived books'), visiblility, sidebar_settings)}}
|
||||
{{ user_checkbox_row("sidebar_view", "sidebar_download", _('Show Downloaded Books'), visiblility, sidebar_settings)}}
|
||||
{{ user_checkbox_row("sidebar_view", "sidebar_list", _('Show Books List'), visiblility, sidebar_settings)}}
|
||||
<th data-align="right" data-formatter="UserActions" data-switchable="false"><div><div class="btn btn-default disabled" aria-disabled="true">{{_('Delete User')}}</div></div><br>{{_('Delete User')}}</th>
|
||||
<th data-align="right" data-formatter="UserActions" data-switchable="false"><div><div class="btn btn-default button_head disabled" aria-disabled="true">{{_('Delete User')}}</div></div><br>{{_('Delete User')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
{% endblock %}
|
||||
{% block modal %}
|
||||
{{ delete_confirm_modal() }}
|
||||
{{ restrict_modal() }}
|
||||
{% endblock %}
|
||||
{% block js %}
|
||||
<script src="{{ url_for('static', filename='js/libs/bootstrap-table/bootstrap-table.min.js') }}"></script>
|
||||
|
||||
Reference in New Issue
Block a user