]> git.lizzy.rs Git - cheatdb.git/blobdiff - app/templates/macros/reviews.html
Remove full review form from package page
[cheatdb.git] / app / templates / macros / reviews.html
index 1ab9de59bc2f0d01a385b9a172ad2697498e8245..42ae614f089799c4f619828c902c7ad05398a341 100644 (file)
                <div class="card-header">
                        {{ _("Review") }}
                </div>
-               <div class="card-body">
+               <form method="post" action="{{ package.getReviewURL() }}" class="card-body">
+                       <input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
                        <p>
                                {{ _("Do you recommend this %(type)s?", type=package.type.value | lower) }}
                        </p>
 
                        <div class="btn-group">
-                               <a class="btn btn-primary" href="{{ url_for('user.login', r=package.getReviewURL()) }}">
+                               <button class="btn btn-primary" name="recommends" value="yes">
                                        <i class="fas fa-thumbs-up mr-2"></i>
                                        {{ _("Yes") }}
-                               </a>
-                               <a class="btn btn-primary" href="{{ url_for('user.login', r=package.getReviewURL()) }}">
+                               </button>
+                               <button class="btn btn-primary" name="recommends" value="no">
                                        <i class="fas fa-thumbs-down mr-2"></i>
                                        {{ _("No") }}
-                               </a>
+                               </button>
                        </div>
-               </div>
+               </form>
        </div>
 {% endmacro %}