82 lines
No EOL
3 KiB
HTML
Executable file
82 lines
No EOL
3 KiB
HTML
Executable file
{if $userquery->login_check('',true) || $Cbucket->configs.anonym_comments == 'yes'}
|
|
<div class="">
|
|
<form class="" id="comment_form" >
|
|
|
|
<input type="hidden" name="reply_to" id="reply_to" value="0">
|
|
<input type="hidden" name="obj_id" id="obj_id" value="{$id}">
|
|
{if !$userquery->login_check('',true) && $Cbucket->configs.anonym_comments == 'yes'}
|
|
|
|
<div class="col-lg-10 col-md-10 col-sm-12 col-xs-12 form-group">
|
|
<label for="comment_name">
|
|
{lang code='name'}
|
|
</label>
|
|
<input type="text" name="name" id="comment_name" class="form-control">
|
|
</div>
|
|
|
|
<div class="col-lg-10 col-md-10 col-sm-12 col-xs-12 form-group">
|
|
<label for="comment_email">
|
|
{lang code='email_wont_display'}
|
|
</label>
|
|
<input type="email" name="email" id="comment_email" class="form-control">
|
|
</div>
|
|
|
|
|
|
|
|
{else}
|
|
<strong>{sprintf(lang('Comment as %s'),$userquery->username)}</strong>
|
|
{/if}
|
|
|
|
{ANCHOR place='before_compose_box'}
|
|
|
|
|
|
{if config('comments_captcha')=='all' || ( config('comments_captcha')=='guests' && !$userquery->login_check('',true) )}
|
|
|
|
<div class="col-lg-10 col-md-10 col-sm-12 col-xs-12 form-group">
|
|
|
|
{assign var=captcha value=get_captcha()}
|
|
{if $captcha}
|
|
{if $captcha.show_field}
|
|
<label class="label" for="captcha">Verification Code</label>
|
|
{load_captcha captcha=$captcha load=field field_params = ' id="captcha" class="input" '}
|
|
|
|
{/if}
|
|
{load_captcha captcha=$captcha load=function}
|
|
|
|
|
|
{/if}
|
|
</div>
|
|
{/if}
|
|
|
|
|
|
<div class="form-group">
|
|
{if !$userquery->login_check('',true) && $Cbucket->configs.anonym_comments == 'yes'}
|
|
<label for="comment_text">
|
|
{lang code='Your comment'}
|
|
</label>
|
|
{/if}
|
|
<textarea name="comment" id="comment_text" class="form-control clearfix"></textarea>
|
|
</div>
|
|
<div class="form-group clearfix">
|
|
<button type="submit" class="hidden-xs hidden-sm btn btn-primary pull-right" onclick="add_comment_js('comment_form','{$type}'){ANCHOR place='onClickAddComment'}">{lang('Comment')}</button>
|
|
</div>
|
|
|
|
<div class="hidden-lg hidden-md pl15 pr15">
|
|
<button type="submit" class="btn btn-primary" onclick="add_comment_js('comment_form','{$type}'){ANCHOR place='onClickAddComment'}">{lang('Comment')}</button>
|
|
</div>
|
|
</form>
|
|
|
|
<div id="add_comment_result" class="add_comment_result mtm mbm" style="display:none"></div>
|
|
|
|
{else}
|
|
{lang code='please_login_to_comment'}
|
|
{/if}
|
|
</div>
|
|
|
|
<script>
|
|
$(document).ready(function(){
|
|
$('body').on('submit','#comment_form',function(e){
|
|
e.preventDefault();
|
|
add_comment_js('comment_form','{$type}');
|
|
})
|
|
})
|
|
</script> |