Rename add_slot by add_column
This commit is contained in:
parent
5d4958e1f4
commit
5750a36172
@ -387,15 +387,15 @@ if (!empty($_GET['delete_column'])) {
|
||||
// Add a slot
|
||||
// -------------------------------
|
||||
|
||||
if (isset($_GET['add_slot'])) {
|
||||
if (isset($_GET['add_column'])) {
|
||||
$smarty->assign('poll_id', $poll_id);
|
||||
$smarty->assign('admin_poll_id', $admin_poll_id);
|
||||
$smarty->assign('format', $poll->format);
|
||||
$smarty->assign('title', __('Generic', 'Poll') . ' - ' . $poll->title);
|
||||
$smarty->display('add_slot.tpl');
|
||||
$smarty->display('add_column.tpl');
|
||||
exit;
|
||||
}
|
||||
if (isset($_POST['confirm_add_slot'])) {
|
||||
if (isset($_POST['confirm_add_column'])) {
|
||||
try {
|
||||
if ($poll->format === 'D') {
|
||||
$newdate = strip_tags($_POST['newdate']);
|
||||
|
@ -200,7 +200,7 @@ class AdminPollService {
|
||||
* @throws MomentAlreadyExistsException When the moment to add already exists in database
|
||||
*/
|
||||
public function addDateSlot($poll_id, $datetime, $new_moment) {
|
||||
$this->logService->log('ADD_SLOT', 'id:' . $poll_id . ', datetime:' . $datetime . ', moment:' . $new_moment);
|
||||
$this->logService->log('ADD_COLUMN', 'id:' . $poll_id . ', datetime:' . $datetime . ', moment:' . $new_moment);
|
||||
|
||||
$slots = $this->slotRepository->listByPollId($poll_id);
|
||||
$result = $this->findInsertPosition($slots, $datetime);
|
||||
@ -243,7 +243,7 @@ class AdminPollService {
|
||||
* @throws MomentAlreadyExistsException When the moment to add already exists in database
|
||||
*/
|
||||
public function addClassicSlot($poll_id, $title) {
|
||||
$this->logService->log('ADD_SLOT', 'id:' . $poll_id . ', title:' . $title);
|
||||
$this->logService->log('ADD_COLUMN', 'id:' . $poll_id . ', title:' . $title);
|
||||
|
||||
$slots = $this->slotRepository->listByPollId($poll_id);
|
||||
|
||||
|
@ -32,7 +32,7 @@
|
||||
{/if}
|
||||
<div class="form-group">
|
||||
<button class="btn btn-default" type="submit" name="back">{__('adminstuds', 'Back to the poll')}</button>
|
||||
<button type="submit" name="confirm_add_slot" class="btn btn-success">{__('adminstuds', 'Add a column')}</button>
|
||||
<button type="submit" name="confirm_add_column" class="btn btn-success">{__('adminstuds', 'Add a column')}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
@ -21,7 +21,7 @@
|
||||
</td>
|
||||
{/foreach}
|
||||
<td>
|
||||
<a href="{poll_url id=$admin_poll_id admin=true action='add_slot'}"
|
||||
<a href="{poll_url id=$admin_poll_id admin=true action='add_column'}"
|
||||
class="btn btn-link btn-sm" title="{__('adminstuds', 'Add a column')}">
|
||||
<i class="glyphicon glyphicon-plus text-success"></i><span class="sr-only">{__('Poll results', 'Add a column')}</span>
|
||||
</a>
|
||||
|
@ -27,7 +27,7 @@
|
||||
{/foreach}
|
||||
{/foreach}
|
||||
<td>
|
||||
<a href="{poll_url id=$admin_poll_id admin=true action='add_slot'}"
|
||||
<a href="{poll_url id=$admin_poll_id admin=true action='add_column'}"
|
||||
class="btn btn-link btn-sm" title="{__('adminstuds', 'Add a column')}">
|
||||
<i class="glyphicon glyphicon-plus text-success"></i><span class="sr-only">{__('Poll results', 'Add a column')}</span>
|
||||
</a>
|
||||
|
Loading…
Reference in New Issue
Block a user