]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig
Update bundle & stock file
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Resources / views / themes / baggy / Config / index.html.twig
index c90bb2e3b97db79667d4f6fe6c46d9caddc8d63c..6ac6decb9195542078e866c9daf7c0797d122e86 100644 (file)
@@ -5,7 +5,7 @@
 {% block content %}
     <h2>{% trans %}Wallabag configuration{% endtrans %}</h2>
 
-    <form action="{{ path('config') }}" method="post" {{ form_enctype(form.config) }}>
+    {{ form_start(form.config) }}
         {{ form_errors(form.config) }}
 
         <fieldset class="w500p inline">
 
     <h2>{% trans %}RSS configuration{% endtrans %}</h2>
 
-    <form action="{{ path('config') }}" method="post" {{ form_enctype(form.rss) }}>
+    {{ form_start(form.rss) }}
         {{ form_errors(form.rss) }}
 
+        <div class="row">
+            {% trans %}RSS feeds provided by wallabag allow you to read your saved articles with your favourite RSS reader.{% endtrans %}
+        </div>
+
         <fieldset class="w500p inline">
             <div class="row">
                 <label>Rss token</label>
@@ -81,7 +85,7 @@
 
     <h2>{% trans %}User information{% endtrans %}</h2>
 
-    <form action="{{ path('config') }}" method="post" {{ form_enctype(form.user) }}>
+    {{ form_start(form.user) }}
         {{ form_errors(form.user) }}
 
         <fieldset class="w500p inline">
             </div>
         </fieldset>
 
+        {% if twofactor_auth %}
+        <div class="row">
+            {% trans %}Enabling two factor authentication means you'll receive an email with a code on every new untrusted connexion{% endtrans %}
+        </div>
+
+        <fieldset class="w500p inline">
+            <div class="row">
+                {{ form_label(form.user.twoFactorAuthentication) }}
+                {{ form_errors(form.user.twoFactorAuthentication) }}
+                {{ form_widget(form.user.twoFactorAuthentication) }}
+            </div>
+        </fieldset>
+        {% endif %}
+
         {{ form_rest(form.user) }}
     </form>
 
     <h2>{% trans %}Change your password{% endtrans %}</h2>
 
-    <form action="{{ path('config') }}" method="post" {{ form_enctype(form.pwd) }}>
+    {{ form_start(form.pwd) }}
         {{ form_errors(form.pwd) }}
 
         <fieldset class="w500p inline">
         {{ form_rest(form.pwd) }}
     </form>
 
+    <h2>{% trans %}Tagging rules{% endtrans %}</h2>
+
+    <ul>
+        {% for tagging_rule in app.user.config.taggingRules %}
+        <li>
+            if « {{ tagging_rule.rule }} » then tag as « {{ tagging_rule.tags|join(', ') }} »
+            <a href="{{ path('delete_tagging_rule', {id: tagging_rule.id}) }}" title="{% trans %}Delete{% endtrans %}" class="tool delete icon-trash icon"></a>
+        </li>
+        {% endfor %}
+    </ul>
+
+    {{ form_start(form.new_tagging_rule) }}
+        {{ form_errors(form.new_tagging_rule) }}
+
+        <fieldset class="w500p inline">
+            <div class="row">
+                {{ form_label(form.new_tagging_rule.rule) }}
+                {{ form_errors(form.new_tagging_rule.rule) }}
+                {{ form_widget(form.new_tagging_rule.rule) }}
+            </div>
+        </fieldset>
+
+        <fieldset class="w500p inline">
+            <div class="row">
+                {{ form_label(form.new_tagging_rule.tags) }}
+                {{ form_errors(form.new_tagging_rule.tags) }}
+                {{ form_widget(form.new_tagging_rule.tags) }}
+            </div>
+        </fieldset>
+
+        {{ form_rest(form.new_tagging_rule) }}
+    </form>
+
+    {% if is_granted('ROLE_SUPER_ADMIN') %}
     <h2>{% trans %}Add a user{% endtrans %}</h2>
 
-    <form action="{{ path('config') }}" method="post" {{ form_enctype(form.new_user) }}>
+    {{ form_start(form.new_user) }}
         {{ form_errors(form.new_user) }}
 
         <fieldset class="w500p inline">
 
         <fieldset class="w500p inline">
             <div class="row">
-                {{ form_label(form.new_user.password) }}
-                {{ form_errors(form.new_user.password) }}
-                {{ form_widget(form.new_user.password) }}
+                {{ form_label(form.new_user.plainPassword.first) }}
+                {{ form_errors(form.new_user.plainPassword.first) }}
+                {{ form_widget(form.new_user.plainPassword.first) }}
+            </div>
+        </fieldset>
+
+        <fieldset class="w500p inline">
+            <div class="row">
+                {{ form_label(form.new_user.plainPassword.second) }}
+                {{ form_errors(form.new_user.plainPassword.second) }}
+                {{ form_widget(form.new_user.plainPassword.second) }}
             </div>
         </fieldset>
 
         </fieldset>
 
         {{ form_rest(form.new_user) }}
+        {% endif %}
     </form>
 {% endblock %}