<li class="tab col s12 m6 l3"><a href="#set3">{{ 'config.tab_menu.user_info'|trans }}</a></li>
<li class="tab col s12 m6 l3"><a href="#set4">{{ 'config.tab_menu.password'|trans }}</a></li>
<li class="tab col s12 m6 l3"><a href="#set5">{{ 'config.tab_menu.rules'|trans }}</a></li>
- <li class="tab col s12 m6 l3"><a href="#set6">{{ 'config.tab_menu.reset'|trans }}</a></li>
+ <li class="tab col s12 m6 l3"><a href="#set6">{{ 'config.tab_menu.ignore_origin'|trans }}</a></li>
+ <li class="tab col s12 m6 l3"><a href="#set7">{{ 'config.tab_menu.reset'|trans }}</a></li>
</ul>
</div>
{% else %}
<em>{{ 'config.form_feed.no_token'|trans }}</em>
{% endif %}
- – <a href="{{ path('generate_token') }}">
+
{% if feed.token %}
- {{ 'config.form_feed.token_reset'|trans }}
+ – <a href="{{ path('generate_token') }}">{{ 'config.form_feed.token_reset'|trans }}</a>
+ – <a href="{{ path('revoke_token') }}">{{ 'config.form_feed.token_revoke'|trans }}</a>
{% else %}
- {{ 'config.form_feed.token_create'|trans }}
- {% endif %}</a>
+ – <a href="{{ path('generate_token') }}">{{ 'config.form_feed.token_create'|trans }}</a>
+ {% endif %}
</div>
</div>
</div>
{{ form_start(form.user) }}
{{ form_errors(form.user) }}
+ <div class="row">
+ <div class="col s12">
+ <h6 class="grey-text">{{ 'config.form_user.login_label'|trans }}</h6>
+ <div>
+ {{ app.user.username }}
+ </div>
+ </div>
+ </div>
+
<div class="row">
<div class="input-field col s12">
{{ form_label(form.user.name) }}
<tr>
<td>{{ 'config.form_user.two_factor.emailTwoFactor_label'|trans }}</td>
<td>{% if app.user.isEmailTwoFactor %}<b>{{ 'config.form_user.two_factor.state_enabled'|trans }}</b>{% else %}{{ 'config.form_user.two_factor.state_disabled'|trans }}{% endif %}</td>
- <td><a href="{{ path('config_otp_email') }}" class="waves-effect waves-light btn{% if app.user.isEmailTwoFactor %} disabled{% endif %}">{{ 'config.form_user.two_factor.action_email'|trans }}</a></td>
+ <td><a href="{{ path('config_otp_email') }}" class="waves-effect waves-light btn{% if app.user.isEmailTwoFactor %} disabled{% endif %}">{{ 'config.form_user.two_factor.action_email'|trans }}</a> {% if app.user.isEmailTwoFactor %}<a href="{{ path('disable_otp_email') }}" class="waves-effect waves-light btn red">Disable</a>{% endif %}</td>
</tr>
<tr>
<td>{{ 'config.form_user.two_factor.googleTwoFactor_label'|trans }}</td>
<td>{% if app.user.isGoogleTwoFactor %}<b>{{ 'config.form_user.two_factor.state_enabled'|trans }}</b>{% else %}{{ 'config.form_user.two_factor.state_disabled'|trans }}{% endif %}</td>
- <td><a href="{{ path('config_otp_app') }}" class="waves-effect waves-light btn{% if app.user.isGoogleTwoFactor %} disabled{% endif %}">{{ 'config.form_user.two_factor.action_app'|trans }}</a></td>
+ <td><a href="{{ path('config_otp_app') }}" class="waves-effect waves-light btn{% if app.user.isGoogleTwoFactor %} disabled{% endif %}">{{ 'config.form_user.two_factor.action_app'|trans }}</a> {% if app.user.isGoogleTwoFactor %}<a href="{{ path('disable_otp_app') }}" class="waves-effect waves-light btn red">Disable</a>{% endif %}</td>
</tr>
</tbody>
</table>
« {{ tagging_rule.rule }} »
{{ 'config.form_rules.then_tag_as_label'|trans }}
« {{ tagging_rule.tags|join(', ') }} »
- <a href="{{ path('edit_tagging_rule', {id: tagging_rule.id}) }}" title="{{ 'config.form_rules.edit_rule_label'|trans }}">
- <i class="tool grey-text mode_edit material-icons">mode_edit</i>
+ <a href="{{ path('edit_tagging_rule', {id: tagging_rule.id}) }}" title="{{ 'config.form_rules.edit_rule_label'|trans }}" class="mode_edit">
+ <i class="tool grey-text material-icons">mode_edit</i>
</a>
- <a href="{{ path('delete_tagging_rule', {id: tagging_rule.id}) }}" title="{{ 'config.form_rules.delete_rule_label'|trans }}">
- <i class="tool grey-text delete material-icons">delete</i>
+ <a href="{{ path('delete_tagging_rule', {id: tagging_rule.id}) }}" title="{{ 'config.form_rules.delete_rule_label'|trans }}" class="delete">
+ <i class="tool grey-text material-icons">delete</i>
</a>
</li>
{% endfor %}
</div>
{% endif %}
- {{ form_start(form.new_tagging_rule) }}
- {{ form_errors(form.new_tagging_rule) }}
-
- <div class="row">
- <div class="input-field col s12">
- {{ form_label(form.new_tagging_rule.rule) }}
- {{ form_errors(form.new_tagging_rule.rule) }}
- {{ form_widget(form.new_tagging_rule.rule) }}
+ <ul class="row">
+ <li class="col l6 m6 s12">
+ <div class="card">
+ <div class="card-content">
+ <span class="card-title">{{ 'config.form_rules.card.new_tagging_rule'|trans }}</span>
+
+ {{ form_start(form.new_tagging_rule) }}
+ {{ form_errors(form.new_tagging_rule) }}
+
+ <div class="row">
+ <div class="input-field col s12">
+ {{ form_label(form.new_tagging_rule.rule) }}
+ {{ form_errors(form.new_tagging_rule.rule) }}
+ {{ form_widget(form.new_tagging_rule.rule) }}
+ </div>
+ </div>
+
+ <div class="row">
+ <div class="input-field col s12">
+ {{ form_label(form.new_tagging_rule.tags) }}
+ {{ form_errors(form.new_tagging_rule.tags) }}
+ {{ form_widget(form.new_tagging_rule.tags) }}
+ </div>
+ </div>
+
+ {{ form_widget(form.new_tagging_rule.save, {'attr': {'class': 'btn waves-effect waves-light'}}) }}
+ {{ form_rest(form.new_tagging_rule) }}
+ </form>
+ </div>
</div>
- </div>
-
- <div class="row">
- <div class="input-field col s12">
- {{ form_label(form.new_tagging_rule.tags) }}
- {{ form_errors(form.new_tagging_rule.tags) }}
- {{ form_widget(form.new_tagging_rule.tags) }}
+ </li>
+ <li class="col l6 m6 s12">
+ <div class="card z-depth-1">
+ <div class="card-content">
+ <span class="card-title">{{ 'config.form_rules.card.import_tagging_rules'|trans }}</span>
+ <p>{{ 'config.form_rules.card.import_tagging_rules_detail'|trans }}</p>
+ {{ form_start(form.import_tagging_rule) }}
+ {{ form_errors(form.import_tagging_rule) }}
+ <div class="row">
+ <div class="file-field input-field col s12">
+ {{ form_errors(form.import_tagging_rule.file) }}
+ <div class="btn">
+ <span>{{ form.import_tagging_rule.file.vars.label|trans }}</span>
+ {{ form_widget(form.import_tagging_rule.file) }}
+ </div>
+ <div class="file-path-wrapper">
+ <input class="file-path validate" type="text">
+ </div>
+ </div>
+ </div>
+
+ {{ form_widget(form.import_tagging_rule.import, { 'attr': {'class': 'btn waves-effect waves-light'} }) }}
+
+ {{ form_rest(form.import_tagging_rule) }}
+ </form>
+ </div>
</div>
- </div>
-
- {{ form_widget(form.new_tagging_rule.save, {'attr': {'class': 'btn waves-effect waves-light'}}) }}
- {{ form_rest(form.new_tagging_rule) }}
- </form>
+ </li>
+ {% if app.user.config.taggingRules is not empty %}
+ <li class="col l6 m6 s12">
+ <div class="card z-depth-1">
+ <div class="card-content">
+ <span class="card-title">{{ 'config.form_rules.card.export_tagging_rules'|trans }}</span>
+ <p>{{ 'config.form_rules.card.export_tagging_rules_detail'|trans }}</p>
+ <br/>
+ <p><a href="{{ path('export_tagging_rule') }}" class="waves-effect waves-light btn">{{ 'config.form_rules.export'|trans }}</a></p>
+ </div>
+ </div>
+ </li>
+ {% endif %}
+ </ul>
<div class="row">
<div class="input-field col s12">
</div>
<div id="set6" class="col s12">
+ {% if app.user.config.ignoreOriginRules is not empty %}
+ <div class="row">
+ <div class="input-field col s12">
+ <ul>
+ {% for ignore_origin_rule in app.user.config.ignoreOriginRules %}
+ <li>
+ {{ 'config.form_rules.if_label'|trans }}
+ « {{ ignore_origin_rule.rule }} »
+ <a href="{{ path('edit_ignore_origin_rule', {id: ignore_origin_rule.id}) }}" title="{{ 'config.form_rules.edit_rule_label'|trans }}" class="mode_edit">
+ <i class="tool grey-text material-icons">mode_edit</i>
+ </a>
+ <a href="{{ path('delete_ignore_origin_rule', {id: ignore_origin_rule.id}) }}" title="{{ 'config.form_rules.delete_rule_label'|trans }}" class="delete">
+ <i class="tool grey-text material-icons">delete</i>
+ </a>
+ </li>
+ {% endfor %}
+ </ul>
+ </div>
+ </div>
+ {% endif %}
+
+ {{ form_start(form.new_ignore_origin_user_rule) }}
+ {{ form_errors(form.new_ignore_origin_user_rule) }}
+
+ <div class="row">
+ <div class="input-field col s12">
+ {{ form_label(form.new_ignore_origin_user_rule.rule) }}
+ {{ form_errors(form.new_ignore_origin_user_rule.rule) }}
+ {{ form_widget(form.new_ignore_origin_user_rule.rule) }}
+ </div>
+ </div>
+
+ {{ form_widget(form.new_ignore_origin_user_rule.save, {'attr': {'class': 'btn waves-effect waves-light'}}) }}
+ {{ form_rest(form.new_ignore_origin_user_rule) }}
+ </form>
+ </div>
+
+ <div id="set7" class="col s12">
<div class="row">
<h5>{{ 'config.reset.title'|trans }}</h5>
<p>{{ 'config.reset.description'|trans }}</p>