remove voting from UI in favour of polls

This commit is contained in:
Mario
2020-04-08 18:41:54 +00:00
parent 9c2d48bcd4
commit 806c738923
3 changed files with 1 additions and 27 deletions

View File

@@ -1287,13 +1287,6 @@ function hz_status_editor($a, $x, $popup = false) {
$plaintext = true;
// if(feature_enabled(local_channel(),'richtext'))
// $plaintext = false;
$feature_voting = feature_enabled($x['profile_uid'], 'consensus_tools');
if(x($x, 'hide_voting'))
$feature_voting = false;
$feature_nocomment = feature_enabled($x['profile_uid'], 'disable_comments');
if(x($x, 'disable_comments'))
$feature_nocomment = false;
@@ -1446,7 +1439,6 @@ function hz_status_editor($a, $x, $popup = false) {
'$poll_add_option_label' => t('Add option'),
'$poll_expire_unit_label' => [t('Minutes'), t('Hours'), t('Days')],
'$multiple_answers' => ['poll_multiple_answers', t("Allow multiple answers"), '', '', [t('No'), t('Yes')]],
'$feature_voting' => $feature_voting,
'$consensus' => ((array_key_exists('item',$x)) ? $x['item']['item_consensus'] : 0),
'$nocommenttitle' => t('Disable comments'),
'$nocommenttitlesub' => t('Toggle comments'),

View File

@@ -229,14 +229,6 @@ function get_features($filtered = true, $level = (-1)) {
false,
get_config('feature_lock','content_encrypt'),
],
[
'consensus_tools',
t('Enable Voting Tools'),
t('Provide a class of post which others can vote on'),
false,
get_config('feature_lock','consensus_tools'),
],
[
'disable_comments',

View File

@@ -155,16 +155,9 @@
<i id="profile-encrypt" class="fa fa-key jot-icons"></i>
</button>
{{/if}}
{{if $feature_voting}}
<button id="profile-voting-wrapper" class="btn btn-outline-secondary btn-sm" title="{{$voting}}" onclick="toggleVoting();return false;">
<i id="profile-voting" class="fa fa-square-o jot-icons"></i>
</button>
{{/if}}
<button type="button" id="profile-poll-wrapper" class="btn btn-outline-secondary btn-sm" title="{{$poll}}" onclick="initPoll();">
<i id="profile-poll" class="fa fa-bar-chart jot-icons"></i>
</button>
{{if $feature_nocomment}}
<button id="profile-nocomment-wrapper" class="btn btn-outline-secondary btn-sm" title="{{$nocommenttitle}}" onclick="toggleNoComment();return false;">
<i id="profile-nocomment" class="fa fa-comments jot-icons"></i>
@@ -174,7 +167,7 @@
{{$custommoretoolsbuttons}}
{{/if}}
</div>
{{if $writefiles || $weblink || $setloc || $clearloc || $feature_expire || $feature_encrypt || $feature_voting || $custommoretoolsdropdown}}
{{if $writefiles || $weblink || $setloc || $clearloc || $feature_expire || $feature_encrypt || $custommoretoolsdropdown}}
<div class="btn-group d-lg-none">
<button type="button" id="more-tools" class="btn btn-outline-secondary btn-sm dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
<i id="more-tools-icon" class="fa fa-cog jot-icons"></i>
@@ -206,9 +199,6 @@
{{if $feature_encrypt}}
<a class="dropdown-item" href="#" onclick="red_encrypt('{{$cipher}}','#profile-jot-text',$('#profile-jot-text').val());return false;"><i class="fa fa-key"></i>&nbsp;{{$encrypt}}</a>
{{/if}}
{{if $feature_voting}}
<a class="dropdown-item" href="#" onclick="toggleVoting(); return false;"><i id="profile-voting-sub" class="fa fa-square-o"></i>&nbsp;{{$voting}}</a>
{{/if}}
<a class="dropdown-item" href="#" onclick="initPoll(); return false"><i id="profile-poll" class="fa fa-bar-chart jot-icons"></i>&nbsp;{{$poll}}</a>
{{if $feature_nocomment}}
<a class="dropdown-item" href="#" onclick="toggleNoComment(); return false;"><i id="profile-nocomment-sub" class="fa fa-comments"></i>&nbsp;{{$nocommenttitlesub}}</a>