Commit dd180e42 authored by Sebastian Castro's avatar Sebastian Castro
Browse files

form: fix checkbox custom checked value

parent 954cf900
......@@ -42,10 +42,10 @@ jQuery(document).ready(function()
initializeToHtml()
// Checkboxes, use custom checked value
$('input[type=checkbox]').change(function() {
$('input[type=checkbox][data-checked-value]').change(function() {
if ($(this).val() == 'on' && $(this).data('checked-value') != 'on')
$(this).val($(this).data('checked-value'))
})
}).trigger('change')
// TIMEPICKERS
$('.timepicker').each(function(e) {
......
......@@ -295,14 +295,14 @@ class ElementFormController extends GoGoController
$isAllowedPending = $configService->isUserAllowed('pending');
$showResultLink = 'stayonform' == $submitOption && ($isAllowedDirectModeration || $isAllowedPending);
$showResultLink = $submitOption == 'stayonform' && ($isAllowedDirectModeration || $isAllowedPending);
if ($showResultLink) {
$noticeText .= '</br><a href="'.$elementShowOnMapUrl.'">Voir le résultat sur la carte</a>';
}
$session->getFlashBag()->add('success', $noticeText);
if ('stayonform' != $submitOption && !$recopyInfo) {
if ($submitOption != 'stayonform' && !$recopyInfo) {
return $this->redirect($elementShowOnMapUrl);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment