Loading

Tasks Without a Due Date

You want to see a new feature?

Tasks Without a Due Date

Postby some person » 28.04.2011, 00:55

I have already posted this, but I thought that this should be posted under its own topic, as more people might see it.

I have added "never due" to tasks. This makes it so that the task can have a no due date.

Remove the following lines, in class.task.php;
  • $tage = $this->getDaysLeft($task['end']);
  • $task["endstring"] = $endstring;
  • $task["daysleft"] = $tage;

In class.task.php, below line 263 add the following.
Code: Select all
         if ($task["end"]) {
                $tage = $this->getDaysLeft($task['end']);
                $task["daysleft"] = $tage;
            $task["endstring"] = $endstring;
            } else {
               $task["daysleft"] = "";
            }

In edittask.tpl, replace line 32 with the following.
Code: Select all
               <div class="row"><label for="end">{#end#}:</label><input type="text" class="text" value="{$task.endstring}" name="end"  id="end"  {if $task.end == 0}disabled = "disabled"{/if} realname="{#end#}" /><br /><br />
               <label for="neverdue"></label><input type = "checkbox" class = "checkbox" value = "neverdue" name = "neverdue" id = "neverdue" {if $task.end == 0}checked = "checked"{/if} onclick = "if (this.checked == true) {ldelim} end.value = ''; end.disabled = true; {rdelim} else {ldelim} end.disabled = false;{rdelim}"><label for = "neverdue">{#neverdue#}</label>
                  </div>


In addtask.tpl, replace line 9 with the following.
Code: Select all
   <div class="row"><label for="end{$lists[list].ID}">{#due#}:</label><input type="text" class="text" name="end"  id="end{$lists[list].ID}"  realname="{#due#}" regexp="{literal}\d{2}.\d{2}.\d{4}{/literal}" /><br /><br />
   <label for = "neverdue"></label><input type = "checkbox" class = "checkbox" value = "neverdue" name = "neverdue" id = "neverdue" onclick = "if (this.checked == true) {ldelim} end{$lists[list].ID}.value = ''; end{$lists[list].ID}.disabled = true; {rdelim} else {ldelim} end{$lists[list].ID}.disabled = false;{rdelim}">{#neverdue#}
   </div>

And in addmytask.tpl, replace line 10 withe the following.
Code: Select all
   <div class="row"><label for="end{$myprojects[project].ID}">{#end#}:</label><input type="text" class="text" name="end"  id="end{$myprojects[project].ID}"  realname="{#due#}" regexp="{literal}\d{2}.\d{2}.\d{4}{/literal}" /><br /><br />
   <label for = "neverdue"></label><input type = "checkbox" class = "checkbox" value = "neverdue" name = "neverdue" id = "neverdue" onclick = "if (this.checked == true) {ldelim} end{$myprojects[project].ID}.value = ''; end{$myprojects[project].ID}.disabled = true; {rdelim} else {ldelim} end{$myprojects[project].ID}.disabled = false;{rdelim}">{#neverdue#}
   </div>


Edit: Updated the code to include a fix for not being able to enter due date after checking and then unchecking "Never due" option.
Have any Bitcoins (http://weusecoins.com) found my post helpful, you can send a tip to the following bitcoin address found on http://btc.to/a9n.
some person
 
Posts: 363
Joined: 16.04.2011, 12:46

Return to Feature Requests

Who is online

Users browsing this forum: No registered users