PHP Classes

File: src/Cabin/Hull/View/cargo/blog_comments_form.twig

Recommend this page to a friend!
  Classes of Scott Arciszewski   CMS Airship   src/Cabin/Hull/View/cargo/blog_comments_form.twig   Download  
File: src/Cabin/Hull/View/cargo/blog_comments_form.twig
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: CMS Airship
Content management system with security features
Author: By
Last change:
Date: 7 years ago
Size: 5,917 bytes
 

Contents

Class file image Download
{% if cabin_custom_config()['blog']['comments']['enabled'] %} <h3>{{ __("Leave a Comment") }}</h3> <div id="blog_comments_form"> {% if userid() or cabin_custom_config()['blog']['comments']['guests'] %} {% if blog_success %}{# #}<p class="blog-comment-success">{{ __(blog_success) }}</p>{# #}{% elseif blog_error %}{# #}<p class="blog-comment-error">{{ __(blog_error) }}</p>{# #}{% endif %} <form method="post" class="comment-form"> {% if form_action %} {{ form_token(form_action) }} {% else %} {{ form_token() }} {% endif %} <div class="form-row" id="reply-to"></div> {% if userid() %} <div class="form-row"> <div class="form-column blog-comment-label"> <label for="blog-reply-author">{{ __("Author") }}:</label> </div> <div class="form-column blog-comment-author-wrapper"> <select id="blog-reply-author" name="author"> <option value="">{{ __("Name / URL") }}</option> <optgroup label="{{ __("Author")|e('html_attr') }}"> {% for author in user_authors() %} <option{# #} class="select-author-name"{# #}{% if author.default_author_for_user %} selected="selected"{% endif %}{# #} value="{{ author.authorid|e('html_attr') }}" > {{ author.name }} </option> {% endfor %} </optgroup> </select> <a href="{{ cabin_url('Bridge') }}author">{{ __("Create a New Author") }}</a> </div> </div> {% endif %} <div class="form-row guest-comment-field"> <div class="form-column blog-comment-label"> <label for="name" {% if not userid() %} class="required-form"{% endif %} >{{ __("Your Name") }}</label>: </div> <div class="form-colum blog-comment-name-wrapper"> <input{# #} id="blog-comment-name"{# #} type="text"{# #} name="name"{# #} placeholder="Public Name"{# #}{% if not userid() %} required="required"{% endif %}{# #} value="{{ _POST.name|e('html_attr') }}"{# #} /> </div> </div> <div class="form-row guest-comment-field"> <div class="form-column blog-comment-label"> <label for="email"{% if not userid() %} class="required-form"{% endif %}>{{ __("Email Address") }}</label>: </div> <div class="form-column blog-comment-email-wrapper"> <input{# #} id="blog-comment-email"{# #} type="text"{# #} name="email"{# #} placeholder="test@example.com"{# #}{% if not userid() %} required="required"{% endif %}{# #} value="{{ _POST.email|e('html_attr') }}"{# #} /> </div> </div> <div class="form-row guest-comment-field"> <div class="form-column blog-comment-label"> <label for="url">{{ __("Your Website") }}</label>: </div> <div class="form-column blog-comment-url-wrapper"> <input id="blog-comment-url" type="text" name="url" placeholder="https://yourdomain.com" value="{{ _POST.url|e('html_attr') }}" /> </div> </div> <div class="form-row"> <div class="form-column blog-comment-label"> <label for="url">{{ __("Your Message") }}</label>: </div> <div class="form-column blog-comment-textarea-wrapper"> <textarea{# #} required="required"{# #} name="message"{# #} class="blog-comment-textarea"{# #} placeholder="Markdown is supported."{# #}>{# #}{{ _POST.message|e('html_attr') }}{# #}</textarea> </div> </div> {% if config.blog['comments']['recaptcha'] %} {% if not can('publish') %} <div class="form-column blog-comment-label"> <label for="g-recaptcha">{{ __("CAPTCHA") }}:</label> </div> <div class="form-column blog-comment-captcha-wrapper"> <div class="g-recaptcha" data-sitekey="{{ config.recaptcha["site-key"]|e('html_attr') }}"></div> </div> {% endif %} {% endif %} <div class="form-row"> <div class="form-column"></div> <div class="form-column"> <button type="submit">{{ __("Submit Comment") }}</button> </div> </div> </form> {% endif %} </div> {% endif %} {% if form_action %} <script src="{{ csp_hash("https://www.google.com/recaptcha/api.js", "script-src", "sha384") }}"></script> {% endif %}