Merge branch 'fix/hide_vote_form' into 'develop'

Fix/hide vote form

Lorsque le mot de passe est requis pour voter mais pas pour voir le sondage, on n'affiche plus le formulaire de vote (la protection était déjà présente pour les sondages classiques).

See merge request !104
This commit is contained in:
Antonin 2016-03-05 16:44:57 +01:00
commit f07b4c3d10
4 changed files with 5 additions and 5 deletions

View File

@ -80,7 +80,6 @@ $(document).ready(function () {
$(this).find('.hours:eq(' + i + ')').val(first_day_hours[i]); // fill hours $(this).find('.hours:eq(' + i + ')').val(first_day_hours[i]); // fill hours
} }
}); });
$('#d0-h0').focus();
}); });
// Buttons "Add an hour" // Buttons "Add an hour"

View File

@ -93,12 +93,12 @@
<div class="row"> <div class="row">
<div class="form-group form-group {if $admin}col-md-4{else}col-md-6{/if}"> <div class="form-group form-group {if $admin}col-md-4{else}col-md-6{/if}">
<label for="public-link"><a class="public-link" href="{poll_url id=$poll_id}">{__('PollInfo', 'Public link of the poll')} <span class="btn-link glyphicon glyphicon-link"></span></a></label> <label for="public-link"><a class="public-link" href="{poll_url id=$poll_id}">{__('PollInfo', 'Public link of the poll')} <span class="btn-link glyphicon glyphicon-link"></span></a></label>
<input class="form-control" id="public-link" type="text" readonly="readonly" value="{poll_url id=$poll_id}" /> <input class="form-control" id="public-link" type="text" readonly="readonly" value="{poll_url id=$poll_id}" onclick="select();"/>
</div> </div>
{if $admin} {if $admin}
<div class="form-group col-md-4"> <div class="form-group col-md-4">
<label for="admin-link"><a class="admin-link" href="{poll_url id=$admin_poll_id admin=true}">{__('PollInfo', 'Admin link of the poll')} <span class="btn-link glyphicon glyphicon-link"></span></a></label> <label for="admin-link"><a class="admin-link" href="{poll_url id=$admin_poll_id admin=true}">{__('PollInfo', 'Admin link of the poll')} <span class="btn-link glyphicon glyphicon-link"></span></a></label>
<input class="form-control" id="admin-link" type="text" readonly="readonly" value="{poll_url id=$admin_poll_id admin=true}" /> <input class="form-control" id="admin-link" type="text" readonly="readonly" value="{poll_url id=$admin_poll_id admin=true}" onclick="select();"/>
</div> </div>
<div id="expiration-form" class="form-group col-md-4"> <div id="expiration-form" class="form-group col-md-4">
<label class="control-label">{__('PollInfo', 'Expiration date')}</label> <label class="control-label">{__('PollInfo', 'Expiration date')}</label>

View File

@ -44,8 +44,9 @@
</thead> </thead>
<tbody> <tbody>
{foreach $votes as $vote} {foreach $votes as $vote}
{* Edited line *}
{if $editingVoteId === $vote->uniqId} {* Edited line *} {if $editingVoteId === $vote->uniqId && !$expired}
<tr class="hidden-print"> <tr class="hidden-print">
<td class="bg-info" style="padding:5px"> <td class="bg-info" style="padding:5px">

View File

@ -179,7 +179,7 @@
{* Line to add a new vote *} {* Line to add a new vote *}
{if $active && $editingVoteId === 0 && !$expired} {if $active && $editingVoteId === 0 && !$expired && $accessGranted}
<tr id="vote-form" class="hidden-print"> <tr id="vote-form" class="hidden-print">
<td class="bg-info" style="padding:5px"> <td class="bg-info" style="padding:5px">
<div class="input-group input-group-sm"> <div class="input-group input-group-sm">