From feb0c1e6ce1ce4207e467ae52ca1632122590eda Mon Sep 17 00:00:00 2001 From: Meteor-Furet Date: Tue, 8 May 2018 15:03:22 +0200 Subject: [PATCH 1/4] =?UTF-8?q?Modification=20collect=5Fusers=5Fmail=20de?= =?UTF-8?q?=20bool=20=C3=A0=20int=20(MAJ=20de=20la=20cr=C3=A9ation=20d'un?= =?UTF-8?q?=20sondage)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/classes/Framadate/Collect_mail.php | 37 +++++++++++++++++++ app/classes/Framadate/Form.php | 5 ++- .../Framadate/Repositories/PollRepository.php | 2 +- .../Framadate/Services/InputService.php | 4 ++ app/inc/constants.php | 1 + create_poll.php | 3 +- js/app/create_poll.js | 6 +-- locale/en.json | 24 ++++++++---- tpl/create_poll.tpl | 27 ++++++++++---- 9 files changed, 86 insertions(+), 23 deletions(-) create mode 100644 app/classes/Framadate/Collect_mail.php diff --git a/app/classes/Framadate/Collect_mail.php b/app/classes/Framadate/Collect_mail.php new file mode 100644 index 0000000..8abc12e --- /dev/null +++ b/app/classes/Framadate/Collect_mail.php @@ -0,0 +1,37 @@ +editable = Editable::EDITABLE_BY_ALL; + $this->collect_users_mail = Collect_mail::NO_COLLECT; $this->clearChoices(); } diff --git a/app/classes/Framadate/Repositories/PollRepository.php b/app/classes/Framadate/Repositories/PollRepository.php index 2e3f68a..f44a928 100644 --- a/app/classes/Framadate/Repositories/PollRepository.php +++ b/app/classes/Framadate/Repositories/PollRepository.php @@ -28,7 +28,7 @@ class PollRepository extends AbstractRepository { 'password_hash' => $form->password_hash, 'results_publicly_visible' => $form->results_publicly_visible ? 1 : 0, 'ValueMax' => $form->ValueMax, - 'collect_users_mail' => $form->collect_users_mail? 1 : 0, + 'collect_users_mail' => ($form->collect_users_mail >= 0 && $form->collect_users_mail <= 3) ? $form->collect_users_mail : 0, ]); } diff --git a/app/classes/Framadate/Services/InputService.php b/app/classes/Framadate/Services/InputService.php index 904fe95..a3e10d4 100644 --- a/app/classes/Framadate/Services/InputService.php +++ b/app/classes/Framadate/Services/InputService.php @@ -115,6 +115,10 @@ class InputService { return filter_var($editable, FILTER_VALIDATE_REGEXP, ['options' => ['regexp' => EDITABLE_CHOICE_REGEX]]); } + public function filterCollect_mail($collect_mail) { + return filter_var($collect_mail, FILTER_VALIDATE_REGEXP, ['options' => ['regexp' => COLLECT_MAIL_CHOICE_REGEX]]); + } + public function filterComment($comment) { $comment = str_replace("\r\n", "\n", $comment); return $this->returnIfNotBlank($comment); diff --git a/app/inc/constants.php b/app/inc/constants.php index 065fbf2..92f2b5e 100644 --- a/app/inc/constants.php +++ b/app/inc/constants.php @@ -33,6 +33,7 @@ const CHOICE_REGEX = '/^[ 012]$/'; const BOOLEAN_REGEX = '/^(on|off|true|false|1|0)$/i'; const BOOLEAN_TRUE_REGEX = '/^(on|true|1)$/i'; const EDITABLE_CHOICE_REGEX = '/^[0-2]$/'; +const COLLECT_MAIL_CHOICE_REGEX = '/^[0-3]$/'; const BASE64_REGEX = '/^[A-Za-z0-9]+$/'; const MD5_REGEX = '/^[A-Fa-f0-9]{32}$/'; diff --git a/create_poll.php b/create_poll.php index de51c3b..5b7597a 100644 --- a/create_poll.php +++ b/create_poll.php @@ -59,7 +59,6 @@ if ($goToStep2) { $ValueMax = $use_ValueMax === true ? $inputService->filterValueMax($_POST['ValueMax']) : null; $collect_users_mail = isset($_POST['collect_users_mail']) ? $inputService->filterBoolean($_POST['collect_users_mail']) : false; - $use_customized_url = isset($_POST['use_customized_url']) ? $inputService->filterBoolean($_POST['use_customized_url']) : false; $customized_url = $use_customized_url === true ? $inputService->filterId($_POST['customized_url']) : null; $name = $inputService->filterName($_POST['name']); @@ -70,7 +69,7 @@ if ($goToStep2) { $receiveNewComments = isset($_POST['receiveNewComments']) ? $inputService->filterBoolean($_POST['receiveNewComments']) : false; $hidden = isset($_POST['hidden']) ? $inputService->filterBoolean($_POST['hidden']) : false; $use_password = filter_input(INPUT_POST, 'use_password', FILTER_VALIDATE_REGEXP, ['options' => ['regexp' => BOOLEAN_REGEX]]); - $collect_users_mail = isset($_POST['collect_users_mail']) ? $inputService->filterBoolean($_POST['collect_users_mail']) : false; + $collect_users_mail = $inputService->filterCollect_mail($_POST['collect_users_mail']); $use_password = filter_input(INPUT_POST, 'use_password', FILTER_VALIDATE_REGEXP, ['options' => ['regexp' => BOOLEAN_REGEX]]); $password = isset($_POST['password']) ? $_POST['password'] : null; $password_repeat = isset($_POST['password_repeat']) ? $_POST['password_repeat'] : null; diff --git a/js/app/create_poll.js b/js/app/create_poll.js index 2793e98..295ab47 100644 --- a/js/app/create_poll.js +++ b/js/app/create_poll.js @@ -81,8 +81,8 @@ $(document).ready(function () { /** * Hide/Show Warning collect_users_mail + editable by all */ - $("#collect_users_mail").change(function(){ - if ($(this).prop("checked") && $("input[name='editable']:checked").val() == 1) { + $("input[name='collect_users_mail']").change(function(){ + if (($("input[name='collect_users_mail']:checked").val() != 0) && ($("input[name='editable']:checked").val() == 1)) { $("#collect_warning").removeClass("hidden"); } else { $("#collect_warning").addClass("hidden"); @@ -90,7 +90,7 @@ $(document).ready(function () { }); $("input[name='editable']").change(function(){ - if ($("#collect_users_mail").prop("checked") && $("input[name='editable']:checked").val() == 1) { + if ($("input[name='collect_users_mail']:checked").val() != 0 && $("input[name='editable']:checked").val() == 1) { $("#collect_warning").removeClass("hidden"); } else { $("#collect_warning").addClass("hidden"); diff --git a/locale/en.json b/locale/en.json index ea52d83..496b72e 100644 --- a/locale/en.json +++ b/locale/en.json @@ -309,6 +309,7 @@ "Vote no for": "Vote \"no\" for", "Vote yes for": "Vote \"yes\" for", "Votes of the poll": "Votes", + "Warning : anyone can access to your email address after voting": "Warning : anyone can access to your email address after voting", "polled user": "polled user", "polled users": "polled users" }, @@ -320,6 +321,7 @@ "Cancel the name edit": "Cancel the name edit", "Cancel the rules edit": "Cancel the rules edit", "Cancel the title edit": "Cancel the title edit", + "Collect of the polled users email addresses": "Collect of the polled users email addresses", "Collecting the polled users emails": "Collecting the polled users email addresses", "Edit the description": "Edit the description", "Edit the email adress": "Edit the email address", @@ -331,6 +333,7 @@ "Expiration date": "Expiry date", "Export to CSV": "Export to CSV", "Initiator of the poll": "Creator of the poll", + "No collect of the polled users email addresses": "No collect of the polled users email addresses", "No password": "No password", "Only votes are protected": "Only votes are protected", "Password protected": "Password protected", @@ -358,8 +361,13 @@ "Step 1": { "All voters can modify any vote": "All voters can modify any vote", "Collect the polled users email addresses": "Collecting the polled users' email addresses", - "Collect users email": "Collect users' email addresses", + "Collect users email": "Collect users email", + "Collect voters email": "Collect voters email", "Customize the URL": "Customize the URL", + "Email addresses are collected but not required": "Email addresses are collected but not required", + "Email addresses are not collected": "Email addresses are not collected", + "Email addresses are required": "Email addresses are required", + "Email addresses are required and verified": "Email addresses are required and verified", "Go to step 2": "Go to step 2", "Limit the amount of voters per option": "Limit the amount of voters per option", "More informations here:": "More informations here:", @@ -384,6 +392,7 @@ "ValueMax instructions": "votes per option", "Voters can modify their vote themselves": "Voters can modify their vote themselves", "Votes cannot be modified": "Votes cannot be modified", + "Warning : anyone can access to the polled users's email addresses.": "Warning : anyone can access to the polled users's email addresses.", "Warning: anyone can access the polled users email addresses since all voters can modify any vote. You should restrict permission rules.": "Warning: Anyone can see the polled users' email addresses since all voters can modify any vote. You should restrict permission rules.", "You are in the poll creation section.": "You are in the poll creation section.", "You can enable or disable the editor at will.": "You can enable or disable the editor at will." @@ -442,6 +451,7 @@ "Back to the poll": "Back to the poll", "Choice added": "Choice added", "Collect the emails of the polled users for the choice": "Collect the emails of the polled users for the choice", + "Collect the emails of the polled users for this column": "Collect the emails of the polled users for this column", "Column removed": "Column deleted", "Column's adding": "Adding a column", "Comment deleted": "Comment deleted", @@ -473,12 +483,12 @@ "remove a column or a line with": "remove a column or a line with" }, "display_mails": { - "No one voted 'If need be' to this option.": "No one voted \"If need be\" for this option.", - "No one voted 'No' to this option.": "No one voted \"No\" for this option.", - "No one voted 'Yes' to this option.": "No one voted \"Yes\" for this option.", - "People who have answered 'If need be' to this option have left these email addresses:": "Email addresses of all users who voted \"If need be\" for this option:", - "People who have answered 'No' to this option have left these email addresses:": "Email addresses of all users who voted \"No\" for this option:", - "People who have answered 'Yes' to this option have left these email addresses:": "Email addresses of all users who voted \"Yes\" for this option:" + "People who have answered 'If need be' to this option have left those email addresses :": "People who have answered 'If need be' to this option have left those email addresses :", + "People who have answered 'If need be' to this option have not left any email addresses.": "People who have answered 'If need be' to this option have not left any email addresses.", + "People who have answered 'No' to this option have left those email addresses :": "People who have answered 'No' to this option have left those email addresses :", + "People who have answered 'No' to this option have not left any email addresses.": "People who have answered 'No' to this option have not left any email addresses.", + "People who have answered 'Yes' to this option have left those email addresses :": "People who have answered 'Yes' to this option have left those email addresses :", + "People who have answered 'Yes' to this option have not left any email addresses.": "People who have answered 'Yes' to this option have not left any email addresses." }, "studs": { "Adding the vote succeeded": "Vote added", diff --git a/tpl/create_poll.tpl b/tpl/create_poll.tpl index 696024f..2525d38 100644 --- a/tpl/create_poll.tpl +++ b/tpl/create_poll.tpl @@ -328,20 +328,31 @@ {* Collect users email *} -
-
diff --git a/tpl/part/vote_table_classic.tpl b/tpl/part/vote_table_classic.tpl index aeda5fc..d317ec3 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}"> {__('Generic', 'Remove')} - {if $poll->collect_users_mail} + {if $poll->collect_users_mail != constant("Framadate\Collect_mail::NO_COLLECT")} @@ -68,8 +68,8 @@ - {if $poll->collect_users_mail} - + {if $poll->collect_users_mail != constant("Framadate\Collect_mail::NO_COLLECT")} + 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} @@ -184,11 +184,11 @@
- {if $poll->collect_users_mail} + {if $poll->collect_users_mail != constant("Framadate\Collect_mail::NO_COLLECT")} {/if}
- {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')}
diff --git a/tpl/part/vote_table_date.tpl b/tpl/part/vote_table_date.tpl index ae06a39..a70ebaa 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}"> {__('Generic', 'Remove')} - {if $poll->collect_users_mail} + {if $poll->collect_users_mail != constant("Framadate\Collect_mail::NO_COLLECT")} @@ -112,8 +112,8 @@ - {if $poll->collect_users_mail} - + {if $poll->collect_users_mail != constant("Framadate\Collect_mail::NO_COLLECT")} + 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}
@@ -239,11 +239,11 @@
- {if $poll->collect_users_mail} - + {if $poll->collect_users_mail != constant("Framadate\Collect_mail::NO_COLLECT")} + 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}
- {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')}
From 4c0c2a16f9619c67f437f14ad5ea1b86f4c97fe6 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Fri, 25 May 2018 12:36:18 +0200 Subject: [PATCH 4/4] Small fixes Change CollectMail class name, add a title on voters name in admin with email value Signed-off-by: Thomas Citharel --- .../{Collect_mail.php => CollectMail.php} | 6 ++---- app/classes/Framadate/Form.php | 7 ++++--- .../Framadate/Services/InputService.php | 18 +++++++++--------- create_poll.php | 3 +-- tpl/create_poll.tpl | 18 +++++++++--------- tpl/part/poll_info.tpl | 10 +++++----- tpl/part/vote_table_classic.tpl | 14 +++++++------- tpl/part/vote_table_date.tpl | 16 ++++++++-------- 8 files changed, 45 insertions(+), 47 deletions(-) rename app/classes/Framadate/{Collect_mail.php => CollectMail.php} (91%) diff --git a/app/classes/Framadate/Collect_mail.php b/app/classes/Framadate/CollectMail.php similarity index 91% rename from app/classes/Framadate/Collect_mail.php rename to app/classes/Framadate/CollectMail.php index 8abc12e..155bee4 100644 --- a/app/classes/Framadate/Collect_mail.php +++ b/app/classes/Framadate/CollectMail.php @@ -20,16 +20,14 @@ namespace Framadate; /** - * Class Collect_mail + * Class CollectMail * * Is used to specify the poll's edition permissions. * @TODO : wait to use the SplEnum * * @package Framadate */ -class Collect_mail { // extends SplEnum - const __default = self::NO_COLLECT; - +class CollectMail { // extends SplEnum const NO_COLLECT = 0; const COLLECT = 1; const COLLECT_REQUIRED = 2; diff --git a/app/classes/Framadate/Form.php b/app/classes/Framadate/Form.php index a277eca..2f62012 100644 --- a/app/classes/Framadate/Form.php +++ b/app/classes/Framadate/Form.php @@ -84,7 +84,7 @@ class Form /** * Tells if voters email addresses are collected or not. - * @var \Framadate\Collect_mail + * @var \Framadate\CollectMail */ public $collect_users_mail; @@ -93,9 +93,10 @@ class Form */ private $choices; - public function __construct(){ + public function __construct() + { $this->editable = Editable::EDITABLE_BY_ALL; - $this->collect_users_mail = Collect_mail::NO_COLLECT; + $this->collect_users_mail = CollectMail::NO_COLLECT; $this->clearChoices(); } diff --git a/app/classes/Framadate/Services/InputService.php b/app/classes/Framadate/Services/InputService.php index a3e10d4..81dfe25 100644 --- a/app/classes/Framadate/Services/InputService.php +++ b/app/classes/Framadate/Services/InputService.php @@ -69,23 +69,23 @@ class InputService { public function filterMail($mail) { /////////////////////////////////////////////////////////////////////////////////////// // formatting - + $mail = trim($mail); - + /////////////////////////////////////////////////////////////////////////////////////// // e-mail validation - + $resultat = FALSE; - + $validator = new EmailValidator(); - + if ($validator->isValid($mail, new RFCValidation())) { $resultat = $mail; } - + /////////////////////////////////////////////////////////////////////////////////////// // return - + return $resultat; } @@ -115,8 +115,8 @@ class InputService { return filter_var($editable, FILTER_VALIDATE_REGEXP, ['options' => ['regexp' => EDITABLE_CHOICE_REGEX]]); } - public function filterCollect_mail($collect_mail) { - return filter_var($collect_mail, FILTER_VALIDATE_REGEXP, ['options' => ['regexp' => COLLECT_MAIL_CHOICE_REGEX]]); + public function filterCollectMail($collectMail) { + return filter_var($collectMail, FILTER_VALIDATE_REGEXP, ['options' => ['regexp' => COLLECT_MAIL_CHOICE_REGEX]]); } public function filterComment($comment) { diff --git a/create_poll.php b/create_poll.php index 5b7597a..7b1c0a9 100644 --- a/create_poll.php +++ b/create_poll.php @@ -58,7 +58,6 @@ if ($goToStep2) { $use_ValueMax = isset($_POST['use_ValueMax']) ? $inputService->filterBoolean($_POST['use_ValueMax']) : false; $ValueMax = $use_ValueMax === true ? $inputService->filterValueMax($_POST['ValueMax']) : null; - $collect_users_mail = isset($_POST['collect_users_mail']) ? $inputService->filterBoolean($_POST['collect_users_mail']) : false; $use_customized_url = isset($_POST['use_customized_url']) ? $inputService->filterBoolean($_POST['use_customized_url']) : false; $customized_url = $use_customized_url === true ? $inputService->filterId($_POST['customized_url']) : null; $name = $inputService->filterName($_POST['name']); @@ -69,7 +68,7 @@ if ($goToStep2) { $receiveNewComments = isset($_POST['receiveNewComments']) ? $inputService->filterBoolean($_POST['receiveNewComments']) : false; $hidden = isset($_POST['hidden']) ? $inputService->filterBoolean($_POST['hidden']) : false; $use_password = filter_input(INPUT_POST, 'use_password', FILTER_VALIDATE_REGEXP, ['options' => ['regexp' => BOOLEAN_REGEX]]); - $collect_users_mail = $inputService->filterCollect_mail($_POST['collect_users_mail']); + $collect_users_mail = $inputService->filterCollectMail($_POST['collect_users_mail']); $use_password = filter_input(INPUT_POST, 'use_password', FILTER_VALIDATE_REGEXP, ['options' => ['regexp' => BOOLEAN_REGEX]]); $password = isset($_POST['password']) ? $_POST['password'] : null; $password_repeat = isset($_POST['password_repeat']) ? $_POST['password_repeat'] : null; diff --git a/tpl/create_poll.tpl b/tpl/create_poll.tpl index 19afac0..05efe44 100644 --- a/tpl/create_poll.tpl +++ b/tpl/create_poll.tpl @@ -325,7 +325,7 @@
- + {* Collect users email *}
@@ -335,19 +335,19 @@
@@ -360,12 +360,12 @@
- + {* END div.form-group *} - + {* END div.collapse *} - - + +

diff --git a/tpl/part/poll_info.tpl b/tpl/part/poll_info.tpl index 09defaf..3de7245 100644 --- a/tpl/part/poll_info.tpl +++ b/tpl/part/poll_info.tpl @@ -233,19 +233,19 @@

- {if $poll->collect_users_mail == constant("Framadate\Collect_mail::NO_COLLECT")} + {if $poll->collect_users_mail == constant("Framadate\CollectMail::NO_COLLECT")} {$txt=__('PollInfo', 'Voters email adresses are not collected')} - {else if $poll->collect_users_mail == constant("Framadate\Collect_mail::COLLECT")} + {else if $poll->collect_users_mail == constant("Framadate\CollectMail::COLLECT")} {$txt=__('PollInfo', 'Voters email adresses are collected')} - {else if $poll->collect_users_mail == constant("Framadate\Collect_mail::COLLECT_REQUIRED")} + {else if $poll->collect_users_mail == constant("Framadate\CollectMail::COLLECT_REQUIRED")} {$txt=__('PollInfo', 'Voters email adresses are collected and required')} - {else if $poll->collect_users_mail == constant("Framadate\Collect_mail::COLLECT_REQUIRED_VERIFIED")} + {else if $poll->collect_users_mail == constant("Framadate\CollectMail::COLLECT_REQUIRED_VERIFIED")} {$txt=__('PollInfo', 'Voters email adresses are collected, required and verified')} {else} {$txt='Error'} {/if}

{$txt|html}

- +
{/if} diff --git a/tpl/part/vote_table_classic.tpl b/tpl/part/vote_table_classic.tpl index d317ec3..6ce6b38 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}"> {__('Generic', 'Remove')}
- {if $poll->collect_users_mail != constant("Framadate\Collect_mail::NO_COLLECT")} + {if $poll->collect_users_mail != constant("Framadate\CollectMail::NO_COLLECT")} @@ -68,8 +68,8 @@ - {if $poll->collect_users_mail != constant("Framadate\Collect_mail::NO_COLLECT")} - 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 $poll->collect_users_mail != constant("Framadate\CollectMail::NO_COLLECT")} + collect_users_mail != constant("Framadate\CollectMail::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} @@ -112,13 +112,13 @@ {elseif !$hidden} {* Voted line *} - {$vote->name|html} + mail}title="{$vote->mail|html}"{/if}>{$vote->name|html} {if $active && !$expired && $accessGranted && ( $poll->editable == constant('Framadate\Editable::EDITABLE_BY_ALL') or $admin or ($poll->editable == constant('Framadate\Editable::EDITABLE_BY_OWN') && $editedVoteUniqueId == $vote->uniqId) - ) && $slots gt 4 + ) && $slots|count gt 4 } @@ -184,11 +184,11 @@
- {if $poll->collect_users_mail != constant("Framadate\Collect_mail::NO_COLLECT")} + {if $poll->collect_users_mail != constant("Framadate\CollectMail::NO_COLLECT")} {/if}
- {if $poll->collect_users_mail != constant("Framadate\Collect_mail::NO_COLLECT") && $poll->editable == constant('Framadate\Editable::EDITABLE_BY_ALL')} + {if $poll->collect_users_mail != constant("Framadate\CollectMail::NO_COLLECT") && $poll->editable == constant('Framadate\Editable::EDITABLE_BY_ALL')}
diff --git a/tpl/part/vote_table_date.tpl b/tpl/part/vote_table_date.tpl index a70ebaa..0259c46 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}"> {__('Generic', 'Remove')} - {if $poll->collect_users_mail != constant("Framadate\Collect_mail::NO_COLLECT")} + {if $poll->collect_users_mail != constant("Framadate\CollectMail::NO_COLLECT")} @@ -112,9 +112,9 @@ - {if $poll->collect_users_mail != constant("Framadate\Collect_mail::NO_COLLECT")} - 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} + {if $poll->collect_users_mail != constant("Framadate\CollectMail::NO_COLLECT")} + collect_users_mail != constant("Framadate\CollectMail::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}
@@ -162,7 +162,7 @@ {* Voted line *} - {$vote->name|html} + {$vote->name|html} {if $active && !$expired && $accessGranted && ( $poll->editable == constant('Framadate\Editable::EDITABLE_BY_ALL') @@ -239,11 +239,11 @@
- {if $poll->collect_users_mail != constant("Framadate\Collect_mail::NO_COLLECT")} - 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 $poll->collect_users_mail != constant("Framadate\CollectMail::NO_COLLECT")} + collect_users_mail != constant("Framadate\CollectMail::COLLECT")} required {/if} id="mail" name="mail" class="form-control" title="{__('Generic', 'Your email address')}" placeholder="{__('Generic', 'Your email address')}" /> {/if}
- {if $poll->collect_users_mail != constant("Framadate\Collect_mail::NO_COLLECT") && $poll->editable == constant('Framadate\Editable::EDITABLE_BY_ALL')} + {if $poll->collect_users_mail != constant("Framadate\CollectMail::NO_COLLECT") && $poll->editable == constant('Framadate\Editable::EDITABLE_BY_ALL')}