indenting and help for edit task template variables
This commit is contained in:
parent
f704f7dfa4
commit
8c0a4fe0e8
3 changed files with 134 additions and 68 deletions
|
|
@ -830,61 +830,60 @@ sub www_viewProject {
|
|||
my $origDepFieldId = $origDepField."_formId";
|
||||
my $origEndField = "orig_end_$id";
|
||||
my $origEndFieldId = $origEndField."_formId";
|
||||
|
||||
|
||||
$hash->{'task.start'} = WebGUI::Form::text($session,{
|
||||
-name=>"start_$id",
|
||||
-value=>$startDate,
|
||||
-size=>"10",
|
||||
-maxlength=>"10",
|
||||
-extras=>qq|onfocus="doCalendar(this.id);" class="taskdate" onblur="adjustTaskTimeFromDate(this,document.getElementById('$endId'),document.getElementById('$durId'),this,false,document.getElementById('$predId'),document.getElementById('$origStartFieldId'),document.getElementById('$origEndFieldId'),$seq);"|
|
||||
});
|
||||
|
||||
-name=>"start_$id",
|
||||
-value=>$startDate,
|
||||
-size=>"10",
|
||||
-maxlength=>"10",
|
||||
-extras=>qq|onfocus="doCalendar(this.id);" class="taskdate" onblur="adjustTaskTimeFromDate(this,document.getElementById('$endId'),document.getElementById('$durId'),this,false,document.getElementById('$predId'),document.getElementById('$origStartFieldId'),document.getElementById('$origEndFieldId'),$seq);"|
|
||||
});
|
||||
|
||||
$hash->{'task.start'} .= WebGUI::Form::hidden($session,{
|
||||
-name=>$origStartField,
|
||||
-value=>$startDate,
|
||||
-extras=>qq|id="$origStartFieldId"|
|
||||
});
|
||||
|
||||
|
||||
-name=>$origStartField,
|
||||
-value=>$startDate,
|
||||
-extras=>qq|id="$origStartFieldId"|
|
||||
});
|
||||
|
||||
$hash->{'task.dependants'} = WebGUI::Form::integer($session,{
|
||||
-name=>"dependants_$id",
|
||||
-value=>$row->{dependants} || "",
|
||||
-defaultValue=>"",
|
||||
-extras=>qq|class="taskdependant" onchange="validateDependant(this,document.getElementById('$origDepFieldId'),'$seq',document.getElementById('$startId'),document.getElementById('$endId'),document.getElementById('$durId'),false,document.getElementById('$origStartFieldId'),document.getElementById('$origEndFieldId'));"|
|
||||
});
|
||||
-name=>"dependants_$id",
|
||||
-value=>$row->{dependants} || "",
|
||||
-defaultValue=>"",
|
||||
-extras=>qq|class="taskdependant" onchange="validateDependant(this,document.getElementById('$origDepFieldId'),'$seq',document.getElementById('$startId'),document.getElementById('$endId'),document.getElementById('$durId'),false,document.getElementById('$origStartFieldId'),document.getElementById('$origEndFieldId'));"|
|
||||
});
|
||||
$hash->{'task.dependants'} .= WebGUI::Form::hidden($session,{
|
||||
-name=>$origDepField,
|
||||
-value=>$row->{dependants},
|
||||
-extras=>qq|id="$origDepFieldId"|
|
||||
});
|
||||
|
||||
-name=>$origDepField,
|
||||
-value=>$row->{dependants},
|
||||
-extras=>qq|id="$origDepFieldId"|
|
||||
});
|
||||
|
||||
$hash->{'task.end'} = WebGUI::Form::text($session,{
|
||||
-name=>"end_$id",
|
||||
-value=>$endDate,
|
||||
-size=>"10",
|
||||
-maxlength=>"10",
|
||||
-extras=>qq|class="taskdate" onfocus="doCalendar(this.id);" onblur="adjustTaskTimeFromDate(document.getElementById('$startId'),this,document.getElementById('$durId'),this,false,document.getElementById('$predId'),document.getElementById('$origStartFieldId'),document.getElementById('$origEndFieldId'),$seq);"|
|
||||
});
|
||||
|
||||
-name=>"end_$id",
|
||||
-value=>$endDate,
|
||||
-size=>"10",
|
||||
-maxlength=>"10",
|
||||
-extras=>qq|class="taskdate" onfocus="doCalendar(this.id);" onblur="adjustTaskTimeFromDate(document.getElementById('$startId'),this,document.getElementById('$durId'),this,false,document.getElementById('$predId'),document.getElementById('$origStartFieldId'),document.getElementById('$origEndFieldId'),$seq);"|
|
||||
});
|
||||
|
||||
$hash->{'task.end'} .= WebGUI::Form::hidden($session,{
|
||||
-name=>$origEndField,
|
||||
-value=>$endDate,
|
||||
-extras=>qq|id="$origEndFieldId"|
|
||||
});
|
||||
-name=>$origEndField,
|
||||
-value=>$endDate,
|
||||
-extras=>qq|id="$origEndFieldId"|
|
||||
});
|
||||
#Don't display uneditable fields if the task is a milestone.
|
||||
if($isMilestone) {
|
||||
$hash->{'task.duration'} = $row->{duration};
|
||||
$hash->{'task.duration'} = $row->{duration};
|
||||
$hash->{'task.duration'} .= WebGUI::Form::hidden($session,{
|
||||
-name=>"duration_$id",
|
||||
-value=>$duration,
|
||||
-extras=>qq|id="$durId"|
|
||||
});
|
||||
-name=>"duration_$id",
|
||||
-value=>$duration,
|
||||
-extras=>qq|id="$durId"|
|
||||
});
|
||||
} else {
|
||||
$hash->{'task.duration'} = WebGUI::Form::float($session,{
|
||||
-name=>"duration_$id",
|
||||
-value=>$duration,
|
||||
-extras=>qq|class="taskduration" onchange="adjustTaskTimeFromDuration(document.getElementById('$startId'),document.getElementById('$endId'),this,false,document.getElementById('$predId'),document.getElementById('$origStartFieldId'),document.getElementById('$origEndFieldId'),$seq);" |
|
||||
});
|
||||
-name=>"duration_$id",
|
||||
-value=>$duration,
|
||||
-extras=>qq|class="taskduration" onchange="adjustTaskTimeFromDuration(document.getElementById('$startId'),document.getElementById('$endId'),this,false,document.getElementById('$predId'),document.getElementById('$origStartFieldId'),document.getElementById('$origEndFieldId'),$seq);" |
|
||||
});
|
||||
|
||||
}
|
||||
} else {
|
||||
|
|
@ -910,28 +909,27 @@ sub www_viewProject {
|
|||
if($canEdit) {
|
||||
#Build Form for submitting on the fly updates
|
||||
$var->{'form.header'} = WebGUI::Form::formHeader($session,{
|
||||
action=>$self->getUrl,
|
||||
extras=>q|name="editAll"|
|
||||
});
|
||||
action=>$self->getUrl,
|
||||
extras=>q|name="editAll"|
|
||||
});
|
||||
$var->{'form.header'} .= WebGUI::Form::hidden($session, {
|
||||
-name=>"func",
|
||||
-value=>"saveExistingTasks"
|
||||
});
|
||||
-name=>"func",
|
||||
-value=>"saveExistingTasks"
|
||||
});
|
||||
$var->{'form.header'} .= WebGUI::Form::hidden($session, {
|
||||
-name=>"projectId",
|
||||
-value=>$projectId
|
||||
});
|
||||
$var->{'form.footer'} = WebGUI::Form::formFooter($session);
|
||||
$var->{'project.canEdit'} = "true";
|
||||
$var->{'task.resources.label'} = $i18n->get("task resources label");
|
||||
$var->{'task.resources.url'} = $self->getUrl("func=manageResources");
|
||||
|
||||
-name=>"projectId",
|
||||
-value=>$projectId
|
||||
});
|
||||
$var->{'form.footer'} = WebGUI::Form::formFooter($session);
|
||||
$var->{'project.canEdit'} = "true";
|
||||
$var->{'task.resources.label'} = $i18n->get("task resources label");
|
||||
$var->{'task.resources.url'} = $self->getUrl("func=manageResources");
|
||||
}
|
||||
|
||||
if($canAddTask) {
|
||||
$var->{'task.add.label'} = $i18n->get("add task label");
|
||||
$var->{'task.add.url'} = $self->getUrl("func=editTask;projectId=$projectId;taskId=new");
|
||||
$var->{'task.canAdd'} = "true";
|
||||
$var->{'task.add.label'} = $i18n->get("add task label");
|
||||
$var->{'task.add.url'} = $self->getUrl("func=editTask;projectId=$projectId;taskId=new");
|
||||
$var->{'task.canAdd'} = "true";
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -950,9 +948,9 @@ sub www_viewProject {
|
|||
sub www_drawGanttChart {
|
||||
my $self = shift;
|
||||
my $var = {};
|
||||
#Set Method Helpers
|
||||
my ($session,$privilege,$form,$db,$dt,$i18n,$user) = $self->setSessionVars;
|
||||
my $config = $session->config;
|
||||
#Set Method Helpers
|
||||
my ($session,$privilege,$form,$db,$dt,$i18n,$user) = $self->setSessionVars;
|
||||
my $config = $session->config;
|
||||
my $style = $session->style;
|
||||
my $eh = $session->errorHandler;
|
||||
|
||||
|
|
|
|||
|
|
@ -89,6 +89,18 @@ our $HELP = {
|
|||
],
|
||||
},
|
||||
|
||||
'task edit template' => {
|
||||
title => 'edit task template vars title',
|
||||
body => 'edit task template vars body',
|
||||
fields => [ ],
|
||||
related => [
|
||||
{
|
||||
tag => 'project manager add/edit',
|
||||
namespace => 'Asset_ProjectManager',
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
1; ##All perl modules must return true
|
||||
|
|
|
|||
|
|
@ -356,13 +356,69 @@ our $I18N = {
|
|||
lastUpdated => 0
|
||||
},
|
||||
|
||||
'' => {
|
||||
message => q||,
|
||||
'edit task template vars title' => {
|
||||
message => q|Edit Task Template Variables|,
|
||||
lastUpdated => 0
|
||||
},
|
||||
|
||||
'' => {
|
||||
message => q||,
|
||||
'edit task template vars body' => {
|
||||
message => q|<p>The Edit Task template has these template variables</p>
|
||||
<p>! : This variable is required for the Data Form to function correctly.</p>
|
||||
|
||||
<p><b>form.header</b> ! <br />
|
||||
Code to setup the Edit Task form. Leaving out this variable will prevent the form
|
||||
from working.
|
||||
</p>
|
||||
|
||||
<p><b>form.name</b> ! <br />
|
||||
Form element for the user to enter/edit the name of the task.
|
||||
</p>
|
||||
|
||||
<p><b>form.duration</b> ! <br />
|
||||
Form element for the duration of the task.
|
||||
</p>
|
||||
|
||||
<p><b>form.duration.units</b> ! <br />
|
||||
Form element for the units of duration for the task.
|
||||
</p>
|
||||
|
||||
<p><b>form.start</b> ! <br />
|
||||
Form element for the starting date for the task.
|
||||
</p>
|
||||
|
||||
<p><b>form.end</b> ! <br />
|
||||
Form element for the ending date for the task.
|
||||
</p>
|
||||
|
||||
<p><b>form.dependants</b> ! <br />
|
||||
Form element for something I really don't understand.
|
||||
</p>
|
||||
|
||||
<p><b>form.resource</b> ! <br />
|
||||
Form element for selecting a user to accomplish this task.
|
||||
</p>
|
||||
|
||||
<p><b>form.milestone</b> ! <br />
|
||||
Form element for setting this task to be a milestone in the project.
|
||||
</p>
|
||||
|
||||
<p><b>form.percentComplete</b> ! <br />
|
||||
Form element for entering in how much of the project has been completed, as a percentage.
|
||||
</p>
|
||||
|
||||
<p><b>form.save</b> ! <br />
|
||||
A button to save data entered into the form.
|
||||
</p>
|
||||
|
||||
<p><b>form.footer</b> ! <br />
|
||||
Code to end the form.
|
||||
</p>
|
||||
|
||||
<p><b>extras</b> ! <br />
|
||||
The URL to the Extras directory.
|
||||
</p>
|
||||
|
||||
|,
|
||||
lastUpdated => 0
|
||||
},
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue