Verified Commit 6b3c5f06 authored by Luc Didry's avatar Luc Didry
Browse files

WIP Working on locales

parent 5e43c197
......@@ -105,3 +105,4 @@ funky:
# - if [ ! -z ${ZANATA_CONFIG_FRAMABOT+x} ]; then make push-locales; fi
# only:
# - develop
# - work-on-locales
......@@ -62,7 +62,7 @@ if (!empty($_POST['poll_admin'])) {
}
if (!$poll) {
$message = new Message('error', __('Error', 'This poll doesn\'t exist !'));
$message = new Message('error', __('Error', "This poll doesn't exist!"));
} else if ($poll && !$securityService->canAccessPoll($poll) && !$is_admin) {
$message = new Message('error', __('Password', 'Wrong password'));
} else {
......@@ -77,7 +77,7 @@ if (!$poll) {
// Add comment
$result = $pollService->addComment($poll_id, $name, $comment);
if ($result) {
$message = new Message('success', __('Comments', 'Comment added'));
$message = new Message('success', __('Comments', 'Comment saved'));
$notificationService->sendUpdateNotification($poll, NotificationService::ADD_COMMENT, $name);
} else {
$message = new Message('danger', __('Error', 'Comment failed'));
......
......@@ -47,7 +47,7 @@ $token_form_value = empty($_POST['token']) ? null : $_POST['token'];
$editedVoteUniqueId = filter_input(INPUT_POST, 'editedVoteUniqueId', FILTER_VALIDATE_REGEXP, ['options' => ['regexp' => POLL_REGEX]]);
if (is_null($poll) || $config['use_smtp'] === false || is_null($token) || is_null($token_form_value)
|| !$token->check($token_form_value) || is_null($editedVoteUniqueId)) {
$message = new Message('error', __('Error', 'Something is going wrong...'));
$message = new Message('error', __('Error', 'Something has gone wrong...'));
}
if (is_null($message)) {
......
......@@ -177,14 +177,14 @@ usort($messages, 'compareCheckMessage');
<div class="row">
<form method="get" action="" class="hidden-print">
<div class="input-group input-group-sm pull-right col-xs-12 col-sm-2">
<select name="lang" class="form-control" title="<?=__('Language selector', 'Select the language')?>" >
<select name="lang" class="form-control" title="<?=__('Language selector', 'Select language')?>" >
<?php foreach ($ALLOWED_LANGUAGES as $lang_key => $language) { ?>
<option lang="fr" <?php if (substr($lang_key, 0, 2)===$locale) { echo 'selected';} ?> value="<?=substr($lang_key, 0, 2)?>"><?=$language?></option>
<?php } ?>
</select>
<span class="input-group-btn">
<button type="submit" class="btn btn-default btn-sm" title="<?=__('Language selector', 'Select the language')?>">OK</button>
</span>
<span class="input-group-btn">
<button type="submit" class="btn btn-default btn-sm" title="<?=__('Language selector', 'Select language')?>">OK</button>
</span>
</div>
</form>
</div>
......
......@@ -67,7 +67,7 @@ if (!empty($_GET['poll'])) {
if ($poll) {
$poll_id = $poll->id;
} else {
$smarty->assign('error', __('Error', 'This poll doesn\'t exist !'));
$smarty->assign('error', __('Error', "This poll doesn't exist!"));
$smarty->display('error.tpl');
exit;
}
......@@ -81,7 +81,7 @@ $messagePollCreated = $sessionService->get("Framadate", "messagePollCreated", FA
if ($messagePollCreated) {
$sessionService->remove("Framadate", "messagePollCreated");
$message = new Message('success', __('adminstuds', 'The poll is created.'));
$message = new Message('success', __('adminstuds', 'The poll was created.'));
}
// -------------------------------
......@@ -229,7 +229,7 @@ if (!empty($_POST['save'])) { // Save edition of an old vote
$slots_hash = $inputService->filterMD5($_POST['control']);
if (empty($editedVote)) {
$message = new Message('danger', __('Error', 'Something is going wrong...'));
$message = new Message('danger', __('Error', 'Something has gone wrong...'));
}
if (count($choices) !== count($_POST['choices'])) {
$message = new Message('danger', __('Error', 'There is a problem with your choices'));
......@@ -245,7 +245,7 @@ if (!empty($_POST['save'])) { // Save edition of an old vote
$message = new Message('danger', __('Error', 'Update vote failed'));
}
} catch (AlreadyExistsException $aee) {
$message = new Message('danger', __('Error', 'The name you\'ve chosen already exist in this poll!'));
$message = new Message('danger', __('Error', "The name you've chosen already exists in this poll!"));
} catch (ConcurrentEditionException $cee) {
$message = new Message('danger', __('Error', 'Poll has been updated before you vote'));
} catch (ConcurrentVoteException $cve) {
......@@ -402,7 +402,7 @@ if (isset($_GET['delete_column'])) {
}
if ($result) {
$message = new Message('success', __('adminstuds', 'Column removed'));
$message = new Message('success', __('adminstuds', 'Column deleted'));
} else {
$message = new Message('danger', __('Error', 'Failed to delete column'));
}
......@@ -465,7 +465,7 @@ if (isset($_POST['confirm_add_column'])) {
exit_displaying_add_column(new Message('danger', __('Error', "Can't create an empty column.")));
}
if ($poll->format === 'D') {
$date = DateTime::createFromFormat(__('Date', 'datetime_parseformat'), $_POST['newdate'])->setTime(0, 0, 0);
$date = DateTime::createFromFormat(__('Date', 'Y-m-d'), $_POST['newdate'])->setTime(0, 0, 0);
$time = $date->getTimestamp();
$newmoment = str_replace(',', '-', strip_tags($_POST['newmoment']));
$adminPollService->addDateSlot($poll_id, $time, $newmoment);
......
......@@ -125,7 +125,7 @@ class InputService {
}
public function filterDate($date) {
$dDate = DateTime::createFromFormat(__('Date', 'datetime_parseformat'), $date)->setTime(0, 0, 0);
$dDate = DateTime::createFromFormat(__('Date', 'Y-m-d'), $date)->setTime(0, 0, 0);
return $dDate->format('Y-m-d H:i:s');
}
......
......@@ -9,7 +9,7 @@
*
* =============================
*
* Ce logiciel est rgi par la licence CeCILL-B. Si une copie de cette licence
* Ce logiciel est régi par la licence CeCILL-B. Si une copie de cette licence
* ne se trouve pas avec ce fichier vous pouvez l'obtenir sur
* http://www.cecill.info/licences/Licence_CeCILL-B_V1-fr.txt
*
......@@ -56,14 +56,14 @@ class InstallService {
public function install(Smarty &$smarty) {
// Check values are present
if (empty($this->fields['appName']) || empty($this->fields['appMail']) || empty($this->fields['defaultLanguage']) || empty($this->fields['dbName']) || empty($this->fields['dbHost']) || empty($this->fields['dbPort']) || empty($this->fields['dbUser'])) {
return $this->error('MISSING_VALUES');
return $this->error('Missing values');
}
// Connect to database
try {
$connect = $this->connectTo($this->fields);
} catch(\Doctrine\DBAL\DBALException $e) {
return $this->error('CANT_CONNECT_TO_DATABASE', $e->getMessage());
return $this->error('Unable to connect to database', $e->getMessage());
}
// Write configuration to conf.php file
......
......@@ -66,7 +66,7 @@ class MailService {
$mail->Subject = $subject;
// Bodies
$body = $body . ' <br/><br/>' . __('Mail', 'Thanks for your trust.') . ' <br/>' . NOMAPPLICATION . ' <hr/>' . __('Mail', 'FOOTER');
$body = $body . ' <br/><br/>' . __('Mail', 'Thank you for your trust.') . ' <br/>' . NOMAPPLICATION . ' <hr/>' . __('Mail', "\"The road is long, but the way is clear…\"<br/>Framasoft lives only by your donations.<br/>Thank you in advance for your support https://soutenir.framasoft.org");
$mail->isHTML(true);
$mail->msgHTML($body, ROOT_DIR, true);
......
......@@ -38,7 +38,7 @@ class NotificationService {
if ($isVoteAndCanSendIt || $isCommentAndCanSendIt || $isOtherType) {
if (self::isParticipation($type)) {
$translationString = 'Poll\'s participation: %s';
$translationString = 'Poll participation: %s';
} else {
$translationString = 'Notification of poll: %s';
}
......@@ -53,24 +53,24 @@ class NotificationService {
switch ($type) {
case self::UPDATE_VOTE:
$message .= $name . ' ';
$message .= __('Mail', "updated a vote.\nYou can find your poll at the link") . " :\n\n";
$message .= __('Mail', "updated a vote.<br/>You can visit your poll at the link") . " :\n\n";
$message .= $link;
break;
case self::ADD_VOTE:
$message .= $name . ' ';
$message .= __('Mail', "filled a vote.\nYou can find your poll at the link") . " :\n\n";
$message .= __('Mail', "added a vote.<br/>You can visit your poll at the link") . " :\n\n";
$message .= $link;
break;
case self::ADD_COMMENT:
$message .= $name . ' ';
$message .= __('Mail', "wrote a comment.\nYou can find your poll at the link") . " :\n\n";
$message .= __('Mail', "wrote a comment.<br/>You can visit your poll at the link") . " :\n\n";
$message .= $link;
break;
case self::UPDATE_POLL:
$message = __f('Mail', 'Someone just change your poll available at the following link %s.', Utils::getUrlSondage($poll->admin_id, true)) . "\n\n";
$message = __f('Mail', 'Someone just changed your poll at the following link <a href=\"%1$s\">%1$s</a>.', Utils::getUrlSondage($poll->admin_id, true)) . "\n\n";
break;
case self::DELETED_POLL:
$message = __f('Mail', 'Someone just delete your poll %s.', Utils::htmlEscape($poll->title)) . "\n\n";
$message = __f('Mail', 'Someone just deleted your poll "%s".', Utils::htmlEscape($poll->title)) . "\n\n";
break;
}
......
......@@ -32,12 +32,12 @@ $i18n->get('', 'Something, just to load the dictionary');
$locale = str_replace('_', '-', $i18n->getLoadedLang());
/* Date Format */
$date_format['txt_full'] = __('Date', 'FULL'); //summary in create_date_poll.php and removal date in choix_(date|autre).php
$date_format['txt_short'] = __('Date', 'SHORT'); // radio title
$date_format['txt_day'] = __('Date', 'DAY');
$date_format['txt_date'] = __('Date', 'DATE');
$date_format['txt_month_year'] = __('Date', 'MONTH_YEAR');
$date_format['txt_datetime_short'] = __('Date', 'DATETIME');
$date_format['txt_full'] = __('Date', '%A, %B %e, %Y'); //summary in create_date_poll.php and removal date in choix_(date|autre).php
$date_format['txt_short'] = __('Date', '%A %e %B %Y'); // radio title
$date_format['txt_day'] = __('Date', '%a %e');
$date_format['txt_date'] = __('Date', '%Y-%m-%d');
$date_format['txt_month_year'] = __('Date', '%B %Y');
$date_format['txt_datetime_short'] = __('Date', '%m/%d/%Y %H:%M');
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { //%e can't be used on Windows platform, use %#d instead
foreach ($date_format as $k => $v) {
$date_format[$k] = preg_replace('#(?<!%)((?:%%)*)%e#', '\1%#d', $v); //replace %e by %#d for windows
......
......@@ -30,9 +30,9 @@ function bandeau_titre($titre)
if(count($ALLOWED_LANGUAGES) > 1){
echo '<form method="post" action="" class="hidden-print">
<div class="input-group input-group-sm pull-right col-md-2 col-xs-4">
<select name="lang" class="form-control" title="' . __('Language selector', 'Select the language') . '" >' . liste_lang() . '</select>
<select name="lang" class="form-control" title="' . __('Language selector', 'Select language') . '" >' . liste_lang() . '</select>
<span class="input-group-btn">
<button type="submit" class="btn btn-default btn-sm" title="' . __('Language selector', 'Change the language') . '">OK</button>
<button type="submit" class="btn btn-default btn-sm" title="' . __('Language selector', 'Change language') . '">OK</button>
</span>
</div>
</form>';
......
......@@ -88,7 +88,7 @@ switch ($step) {
$_SESSION['form'] = serialize($form);
// Display step 2
$smarty->assign('title', __('Step 2 classic', 'Poll subjects (2 on 3)'));
$smarty->assign('title', __('Step 2 classic', 'Poll options (2 of 3)'));
$smarty->assign('choices', $form->getChoices());
$smarty->assign('allowMarkdown', $config['user_can_add_img_or_link']);
$smarty->assign('error', null);
......@@ -114,7 +114,7 @@ switch ($step) {
}
}
// Expiration date is initialised with config parameter. Value will be modified in step 4 if user has defined an other date
// Expiry date is initialised with config parameter. Value will be modified in step 4 if user has defined an other date
$form->end_date = $max_expiry_time;
// Summary
......@@ -146,7 +146,7 @@ switch ($step) {
$_SESSION['form'] = serialize($form);
$smarty->assign('title', __('Step 3', 'Removal date and confirmation (3 on 3)'));
$smarty->assign('title', __('Step 3', 'Removal date and confirmation (3 of 3)'));
$smarty->assign('summary', $summary);
$smarty->assign('end_date_str', $end_date_str);
$smarty->assign('default_poll_duration', $config['default_poll_duration']);
......@@ -185,17 +185,17 @@ switch ($step) {
// Send confirmation by mail if enabled
if ($config['use_smtp'] === true) {
$message = __('Mail', "This is the message you have to send to the people you want to poll. \nNow, you have to send this message to everyone you want to poll.");
$message = __('Mail', "This is the message to forward to the poll participants.");
$message .= '<br/><br/>';
$message .= Utils::htmlMailEscape($form->admin_name) . ' ' . __('Mail', 'hast just created a poll called') . ' : "' . Utils::htmlMailEscape($form->title) . '".<br/>';
$message .= sprintf(__('Mail', 'Thanks for filling the poll at the link above') . ' :<br/><br/><a href="%1$s">%1$s</a>', Utils::getUrlSondage($poll_id));
$message .= Utils::htmlMailEscape($form->admin_name) . ' ' . __('Mail', 'has just created a poll called') . ' : "' . Utils::htmlMailEscape($form->title) . '".<br/>';
$message .= sprintf(__('Mail', 'Thank you for participating in the poll at the following link') . ' :<br/><br/><a href="%1$s">%1$s</a>', Utils::getUrlSondage($poll_id));
$message_admin = __('Mail', "This message should NOT be sent to the polled people. It is private for the poll's creator.\n\nYou can now modify it at the link above");
$message_admin = __('Mail', "This message should NOT be sent to the poll participants. You should keep it private. <br/><br/>You can modify your poll at the following link");
$message_admin .= sprintf(' :<br/><br/><a href="%1$s">%1$s</a>', Utils::getUrlSondage($admin_poll_id, true));
if ($mailService->isValidEmail($form->admin_mail)) {
$mailService->send($form->admin_mail, '[' . NOMAPPLICATION . '][' . __('Mail', 'Author\'s message') . '] ' . __('Generic', 'Poll') . ': ' . $form->title, $message_admin);
$mailService->send($form->admin_mail, '[' . NOMAPPLICATION . '][' . __('Mail', 'For sending to the polled users') . '] ' . __('Generic', 'Poll') . ': ' . $form->title, $message);
$mailService->send($form->admin_mail, '[' . NOMAPPLICATION . '][' . __('Mail', 'Message for the author') . '] ' . __('Generic', 'Poll') . ': ' . $form->title, $message_admin);
$mailService->send($form->admin_mail, '[' . NOMAPPLICATION . '][' . __('Mail', 'Participant link') . '] ' . __('Generic', 'Poll') . ': ' . $form->title, $message);
}
}
......
......@@ -99,7 +99,7 @@ switch ($step) {
$_SESSION['form'] = serialize($form);
// Display step 2
$smarty->assign('title', __('Step 2 date', 'Poll dates (2 on 3)'));
$smarty->assign('title', __('Step 2 date', 'Poll dates (2 of 3)'));
$smarty->assign('choices', $form->getChoices());
$smarty->assign('error', null);
......@@ -119,7 +119,7 @@ switch ($step) {
// Check if there are at most MAX_SLOTS_PER_POLL slots
if (count($_POST['days']) > MAX_SLOTS_PER_POLL) {
// Display step 2
$smarty->assign('title', __('Step 2 date', 'Poll dates (2 on 3)'));
$smarty->assign('title', __('Step 2 date', 'Poll dates (2 of 3)'));
$smarty->assign('choices', $form->getChoices());
$smarty->assign('error', __f('Error', 'You can\'t select more than %d dates', MAX_SLOTS_PER_POLL));
......@@ -145,7 +145,7 @@ switch ($step) {
if (!empty($day)) {
// Add choice to Form data
$date = DateTime::createFromFormat(__('Date', 'datetime_parseformat'), $_POST['days'][$i])->setTime(0, 0, 0);
$date = DateTime::createFromFormat(__('Date', 'Y-m-d'), $_POST['days'][$i])->setTime(0, 0, 0);
$time = (string) $date->getTimestamp();
$choice = new Choice($time);
$form->addChoice($choice);
......@@ -181,7 +181,7 @@ switch ($step) {
$_SESSION['form'] = serialize($form);
$smarty->assign('title', __('Step 3', 'Removal date and confirmation (3 on 3)'));
$smarty->assign('title', __('Step 3', 'Removal date and confirmation (3 of 3)'));
$smarty->assign('summary', $summary);
$smarty->assign('end_date_str', $end_date_str);
$smarty->assign('default_poll_duration', $config['default_poll_duration']);
......@@ -224,20 +224,20 @@ switch ($step) {
// Send confirmation by mail if enabled
if ($config['use_smtp'] === true) {
$message = __('Mail', "This is the message you have to send to the people you want to poll. \nNow, you have to send this message to everyone you want to poll.");
$message = __('Mail', "This is the message to forward to the poll participants.");
$message .= '<br/><br/>';
$message .= Utils::htmlEscape($form->admin_name) . ' ' . __('Mail', 'hast just created a poll called') . ' : "' . Utils::htmlEscape($form->title) . '".<br/>';
$message .= __('Mail', 'Thanks for filling the poll at the link above') . ' :<br/><br/><a href="%1$s">%1$s</a>';
$message .= Utils::htmlEscape($form->admin_name) . ' ' . __('Mail', 'has just created a poll called') . ' : "' . Utils::htmlEscape($form->title) . '".<br/>';
$message .= __('Mail', 'Thank you for participating in the poll at the following link') . ' :<br/><br/><a href="%1$s">%1$s</a>';
$message_admin = __('Mail', "This message should NOT be sent to the polled people. It is private for the poll's creator.\n\nYou can now modify it at the link above");
$message_admin = __('Mail', "This message should NOT be sent to the poll participants. You should keep it private. <br/><br/>You can modify your poll at the following link");
$message_admin .= ' :<br/><br/><a href="%1$s">%1$s</a>';
$message = sprintf($message, Utils::getUrlSondage($poll_id));
$message_admin = sprintf($message_admin, Utils::getUrlSondage($admin_poll_id, true));
if ($mailService->isValidEmail($form->admin_mail)) {
$mailService->send($form->admin_mail, '[' . NOMAPPLICATION . '][' . __('Mail', 'Author\'s message') . '] ' . __('Generic', 'Poll') . ': ' . Utils::htmlEscape($form->title), $message_admin);
$mailService->send($form->admin_mail, '[' . NOMAPPLICATION . '][' . __('Mail', 'For sending to the polled users') . '] ' . __('Generic', 'Poll') . ': ' . Utils::htmlEscape($form->title), $message);
$mailService->send($form->admin_mail, '[' . NOMAPPLICATION . '][' . __('Mail', 'Message for the author') . '] ' . __('Generic', 'Poll') . ': ' . Utils::htmlEscape($form->title), $message_admin);
$mailService->send($form->admin_mail, '[' . NOMAPPLICATION . '][' . __('Mail', 'Participant link') . '] ' . __('Generic', 'Poll') . ': ' . Utils::htmlEscape($form->title), $message);
}
}
......
......@@ -113,10 +113,10 @@ if ($goToStep2) {
$error_on_customized_url = true;
} else if ($pollRepository->existsById($customized_url)) {
$error_on_customized_url = true;
$error_on_customized_url_msg = __('Error', 'Poll id already used');
$error_on_customized_url_msg = __('Error', 'Identifier is already used');
} else if (in_array($customized_url, ['admin', 'vote', 'action'], true)) {
$error_on_customized_url = true;
$error_on_customized_url_msg = __('Error', 'This id is not allowed');
$error_on_customized_url_msg = __('Error', 'This identifier is not allowed');
}
}
......@@ -171,11 +171,11 @@ if ($goToStep2) {
}
} else {
// Title Erreur !
$title = __('Error', 'Error!') . ' - ' . __('Step 1', 'Poll creation (1 on 3)');
$title = __('Error', 'Error!') . ' - ' . __('Step 1', 'Poll creation (1 of 3)');
}
} else {
// Title OK (formulaire pas encore rempli)
$title = __('Step 1', 'Poll creation (1 on 3)');
$title = __('Step 1', 'Poll creation (1 of 3)');
}
// Prepare error messages
......@@ -236,7 +236,7 @@ if (!empty($_POST[GO_TO_STEP_2])) {
if ($error_on_customized_url) {
$errors['customized_url']['aria'] = 'aria-describeby="customized_url" ';
$errors['customized_url']['class'] = ' has-error';
$errors['customized_url']['msg'] = isset($error_on_customized_url_msg) ? $error_on_customized_url_msg : __('Error', "Something is wrong with the format: customized urls should only consist of alphanumeric characters and hyphens.");
$errors['customized_url']['msg'] = isset($error_on_customized_url_msg) ? $error_on_customized_url_msg : __('Error', "Something is wrong with the format: Customized URLs should only consist of alphanumeric characters and hyphens.");
}
if ($error_on_description) {
......@@ -268,17 +268,17 @@ if (!empty($_POST[GO_TO_STEP_2])) {
if ($error_on_password) {
$errors['password']['aria'] = 'aria-describeby="poll_password_error" ';
$errors['password']['class'] = ' has-error';
$errors['password']['msg'] = __('Error', 'Password is empty');
$errors['password']['msg'] = __('Error', 'Password is empty.');
}
if ($error_on_password_repeat) {
$errors['password_repeat']['aria'] = 'aria-describeby="poll_password_repeat_error" ';
$errors['password_repeat']['class'] = ' has-error';
$errors['password_repeat']['msg'] = __('Error', 'Passwords do not match');
$errors['password_repeat']['msg'] = __('Error', 'Passwords do not match.');
}
if ($error_on_ValueMax) {
$errors['ValueMax']['aria'] = 'aria-describeby="poll_ValueMax" ';
$errors['ValueMax']['class'] = ' has-error';
$errors['ValueMax']['msg'] = __('Error', 'Error on amount of voters limitation : value must be an integer greater than 0');
$errors['ValueMax']['msg'] = __('Error', 'Error on amount of votes limitation: Value must be an integer greater than 0');
}
}
......
......@@ -53,7 +53,7 @@ if (!empty($_GET['poll'])) {
}
if (!$poll) {
$smarty->assign('error', __('Error', 'This poll doesn\'t exist !'));
$smarty->assign('error', __('Error', "This poll doesn't exist!"));
$smarty->display('error.tpl');
exit;
}
......@@ -104,7 +104,7 @@ foreach ($votes as $vote) {
$text = __('Generic', 'No');
break;
case 1:
$text = __('Generic', 'Ifneedbe');
$text = __('Generic', 'Under reserve');
break;
case 2:
$text = __('Generic', 'Yes');
......
......@@ -53,7 +53,7 @@ if (!empty($_POST['mail'])) {
}
}
$smarty->assign('title', __('Homepage', 'Where are my polls'));
$smarty->assign('title', __('Homepage', 'Where are my polls?'));
$smarty->assign('message', $message);
$smarty->assign('locale', $locale);
......
......@@ -49,6 +49,6 @@ $smarty->assign('show_cultivate_your_garden', $config['show_cultivate_your_garde
$smarty->assign('col_size', 12 / $nbcol);
$smarty->assign('demo_poll_url', $demoPollURL);
$smarty->assign('title', __('Generic', 'Make your polls'));
$smarty->assign('title', __('Generic', 'Create your own polls'));
$smarty->display('index.tpl');
......@@ -150,7 +150,7 @@ $(document).ready(function () {
}
});
// Button "Remove all hours"
// Button "Remove all times"
$(document).on('click', '#resethours', function () {
$selected_days.find('fieldset').each(function () {
......@@ -168,7 +168,7 @@ $(document).ready(function () {
updateButtonState();
});
// Button "Copy hours of the first day"
// Button "Copy times from the first day"
function addHour(last_hour, add_button) {
......@@ -223,14 +223,14 @@ $(document).ready(function () {
});
});
// Buttons "Add an hour"
// Buttons "Add a time slot"
$(document).on('click', '.add-an-hour', function () {
var last_hour = $(this).parent('div').parent('div').prev();
addHour(last_hour, $(this));
});
// Buttons "Remove an hour"
// Buttons "Remove a time slot"
$(document).on('click', '.remove-an-hour', function () {
var last_hour = $(this).parent('div').parent('div').prev();
......
This diff is collapsed.
This diff is collapsed.
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