From e6716bc74565cb5524cb9c3876b343fbffe5e733 Mon Sep 17 00:00:00 2001 From: Meteor-Furet <justine.marlow@etu.utc.fr> Date: Tue, 8 May 2018 16:01:17 +0200 Subject: [PATCH] =?UTF-8?q?MAJ=20table=5Fvote=5Fclassic=20et=20table=5Fvot?= =?UTF-8?q?e=5Fdate=20+=20passage=20option=203=20de=20collect=5Fusers=5Fma?= =?UTF-8?q?il=20en=20disabled=20car=20non=20impl=C3=A9ment=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tpl/create_poll.tpl | 2 +- tpl/part/vote_table_classic.tpl | 10 +++++----- tpl/part/vote_table_date.tpl | 12 ++++++------ 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/tpl/create_poll.tpl b/tpl/create_poll.tpl index 2525d383..19afac0a 100644 --- a/tpl/create_poll.tpl +++ b/tpl/create_poll.tpl @@ -347,7 +347,7 @@ {__('Step 1', 'Email addresses are required')} </label> <label> - <input type="radio" name="collect_users_mail" {if $collect_users_mail==constant("Framadate\Collect_mail::COLLECT_REQUIRED_VERIFIED")}checked{/if} value="{constant("Framadate\Collect_mail::COLLECT_REQUIRED_VERIFIED")}"> + <input type="radio" disabled name="collect_users_mail" {if $collect_users_mail==constant("Framadate\Collect_mail::COLLECT_REQUIRED_VERIFIED")}checked{/if} value="{constant("Framadate\Collect_mail::COLLECT_REQUIRED_VERIFIED")}"> {__('Step 1', 'Email addresses are required and verified')} </label> </div> diff --git a/tpl/part/vote_table_classic.tpl b/tpl/part/vote_table_classic.tpl index aeda5fc0..d317ec37 100644 --- a/tpl/part/vote_table_classic.tpl +++ b/tpl/part/vote_table_classic.tpl @@ -30,7 +30,7 @@ class="btn btn-link btn-sm remove-column" title="{__('adminstuds', 'Remove the column')} {$slot->title|html}"> <i class="glyphicon glyphicon-remove text-danger"></i><span class="sr-only">{__('Generic', 'Remove')}</span> </a> - {if $poll->collect_users_mail} + {if $poll->collect_users_mail != constant("Framadate\Collect_mail::NO_COLLECT")} <a href="{poll_url id=$admin_poll_id admin=true action='collect_mail' action_value=($headersDCount)}" class="btn btn-link btn-sm collect-mail" title="{__('adminstuds', 'Collect the emails of the polled users for the choice')} {$slot->title|html}"> @@ -68,8 +68,8 @@ <span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span> <input type="hidden" name="edited_vote" value="{$vote->uniqId}"/> <input type="text" id="name" name="name" value="{$vote->name|html}" class="form-control" title="{__('Generic', 'Your name')}" placeholder="{__('Generic', 'Your name')}" /> - {if $poll->collect_users_mail} - <input type="email" required id="mail" name="mail" value="{$vote->mail|html}" class="form-control" title="{__('Generic', 'Your email address')}" placeholder="{__('Generic', 'Your email address')}" /> + {if $poll->collect_users_mail != constant("Framadate\Collect_mail::NO_COLLECT")} + <input type="email" {if $poll->collect_users_mail != constant("Framadate\Collect_mail::COLLECT")} required {/if} id="mail" name="mail" value="{$vote->mail|html}" class="form-control" title="{__('Generic', 'Your email address')}" placeholder="{__('Generic', 'Your email address')}" /> {/if} </div> </td> @@ -184,11 +184,11 @@ <div class="input-group input-group-sm"> <span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span> <input type="text" id="name" name="name" class="form-control" title="{__('Generic', 'Your name')}" placeholder="{__('Generic', 'Your name')}" /> - {if $poll->collect_users_mail} + {if $poll->collect_users_mail != constant("Framadate\Collect_mail::NO_COLLECT")} <input type="email" required id="mail" name="mail" class="form-control" title="{__('Generic', 'Your email address')}" placeholder="{__('Generic', 'Your email address')}" /> {/if} </div> - {if $poll->collect_users_mail && $poll->editable == constant('Framadate\Editable::EDITABLE_BY_ALL')} + {if $poll->collect_users_mail != constant("Framadate\Collect_mail::NO_COLLECT") && $poll->editable == constant('Framadate\Editable::EDITABLE_BY_ALL')} <div class="bg-danger"> <i class="glyphicon glyphicon-alert"> </i> <label> {__('Poll results', 'Anyone will be able to access your email address after your vote')} </label> diff --git a/tpl/part/vote_table_date.tpl b/tpl/part/vote_table_date.tpl index ae06a39a..a70ebaa1 100644 --- a/tpl/part/vote_table_date.tpl +++ b/tpl/part/vote_table_date.tpl @@ -32,7 +32,7 @@ title="{__('adminstuds', 'Remove the column')} {$slot->day|date_format:$date_format.txt_short|html} - {$moment|html}"> <i class="glyphicon glyphicon-remove text-danger"></i><span class="sr-only">{__('Generic', 'Remove')}</span> </a> - {if $poll->collect_users_mail} + {if $poll->collect_users_mail != constant("Framadate\Collect_mail::NO_COLLECT")} <a href="{poll_url id=$admin_poll_id admin=true action='collect_mail' action_value=($headersDCount)}" class="btn btn-link btn-sm collect-mail" title="{__('adminstuds', 'Collect the emails of the polled users for the choice')} {$slot->day|date_format:$date_format.txt_short|html} - {$moment|html}"> @@ -112,8 +112,8 @@ <span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span> <input type="hidden" name="edited_vote" value="{$vote->uniqId}"/> <input type="text" id="name" name="name" value="{$vote->name|html}" class="form-control" title="{__('Generic', 'Your name')}" placeholder="{__('Generic', 'Your name')}" /> - {if $poll->collect_users_mail} - <input type="email" required id="mail" name="mail" value="{$vote->mail|html}" class="form-control" title="{__('Generic', 'Your email address')}" placeholder="{__('Generic', 'Your email address')}" /> + {if $poll->collect_users_mail != constant("Framadate\Collect_mail::NO_COLLECT")} + <input type="email" {if $poll->collect_users_mail != constant("Framadate\Collect_mail::COLLECT")} required {/if} id="mail" name="mail" value="{$vote->mail|html}" class="form-control" title="{__('Generic', 'Your email address')}" placeholder="{__('Generic', 'Your email address')}" /> {/if} </div> </td> @@ -239,11 +239,11 @@ <div class="input-group input-group-sm"> <span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span> <input type="text" id="name" name="name" class="form-control" title="{__('Generic', 'Your name')}" placeholder="{__('Generic', 'Your name')}" /> - {if $poll->collect_users_mail} - <input type="email" required id="mail" name="mail" class="form-control" title="{__('Generic', 'Your email address')}" placeholder="{__('Generic', 'Your email address')}" /> + {if $poll->collect_users_mail != constant("Framadate\Collect_mail::NO_COLLECT")} + <input type="email" {if $poll->collect_users_mail != constant("Framadate\Collect_mail::COLLECT")} required {/if} id="mail" name="mail" class="form-control" title="{__('Generic', 'Your email address')}" placeholder="{__('Generic', 'Your email address')}" /> {/if} </div> - {if $poll->collect_users_mail && $poll->editable == constant('Framadate\Editable::EDITABLE_BY_ALL')} + {if $poll->collect_users_mail != constant("Framadate\Collect_mail::NO_COLLECT") && $poll->editable == constant('Framadate\Editable::EDITABLE_BY_ALL')} <div class="bg-danger"> <i class="glyphicon glyphicon-alert"> </i> <label> {__('Poll results', 'Anyone will be able to access your email address after your vote')} </label> -- GitLab