Activate Button without Clicking

Asked

Viewed 20 times

0

I’d be grateful if you could help me. I need the function of a button (which is to trigger the chronometer of a task) to be executed without clicking on a date, or when changing the status of a task:

<?php if ($task->billed == 0)
{
    $is_assigned = $task->current_user_is_assigned;
    if (!$this
        ->tasks_model
        ->is_timer_started($task->id))
    { ?>
            <p class="no-margin pull-left"<?php if (!$is_assigned)
        { ?> data-toggle="tooltip" data-title="<?php echo _l('task_start_timer_only_assignee'); ?>"<?php
        } ?>>
               <a href="#" class="mbot10 btn<?php if (!$is_assigned || $task->status == Tasks_model::STATUS_COMPLETE)
        {
            echo ' disabled btn-default';
        }
        else
        {
            echo ' btn-success';
        } ?>" onclick ="timer_action(this, <?php echo $task->id; ?>); return false;">
               <i class="fa fa-clock-o"></i> <?php echo _l('task_start_timer');

?>
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.