Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
timesheet
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
web2project
timesheet
Commits
902a5843
Commit
902a5843
authored
Mar 25, 2008
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup tabs and reformat
parent
e8afdac0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
addedit.php
addedit.php
+8
-8
No files found.
addedit.php
View file @
902a5843
...
@@ -27,7 +27,7 @@ $timesheet_id = intval( dPgetParam( $_GET, "timesheet_id", 0 ) );
...
@@ -27,7 +27,7 @@ $timesheet_id = intval( dPgetParam( $_GET, "timesheet_id", 0 ) );
// check permissions for this record
// check permissions for this record
$canEdit
=
!
getDenyEdit
(
$m
,
$timesheet_id
);
$canEdit
=
!
getDenyEdit
(
$m
,
$timesheet_id
);
if
(
!
$canEdit
)
{
if
(
!
$canEdit
)
{
$AppUI
->
redirect
(
"m=public&a=access_denied"
);
$AppUI
->
redirect
(
"m=public&a=access_denied"
);
}
}
$canDelete
=
$perms
->
checkModule
(
$m
,
'delete'
);
$canDelete
=
$perms
->
checkModule
(
$m
,
'delete'
);
...
@@ -53,12 +53,12 @@ $obj = new CTimesheet();
...
@@ -53,12 +53,12 @@ $obj = new CTimesheet();
// load the record data in case of that this script is used to edit the timesheet qith timesheet_id (transmitted via GET)
// load the record data in case of that this script is used to edit the timesheet qith timesheet_id (transmitted via GET)
if
(
!
$obj
->
load
(
$timesheet_id
,
false
)
&&
(
$timesheet_id
>
0
)
)
{
if
(
!
$obj
->
load
(
$timesheet_id
,
false
)
&&
(
$timesheet_id
>
0
)
)
{
// show some error messages using the dPFramework if loadOperation failed
// show some error messages using the dPFramework if loadOperation failed
// these error messages are nicely integrated with the frontend of dP
// these error messages are nicely integrated with the frontend of dP
// use detailed error messages as often as possible
// use detailed error messages as often as possible
$AppUI
->
setMsg
(
'Timesheet'
);
$AppUI
->
setMsg
(
'Timesheet'
);
$AppUI
->
setMsg
(
"invalidID"
,
UI_MSG_ERROR
,
true
);
$AppUI
->
setMsg
(
"invalidID"
,
UI_MSG_ERROR
,
true
);
$AppUI
->
redirect
();
// go back to the calling location
$AppUI
->
redirect
();
// go back to the calling location
}
}
// setup the title block
// setup the title block
...
@@ -68,7 +68,7 @@ $ttl = ( $timesheet_id > 0 ) ? "Edit Timesheet" : "New Timesheet";
...
@@ -68,7 +68,7 @@ $ttl = ( $timesheet_id > 0 ) ? "Edit Timesheet" : "New Timesheet";
$titleBlock
=
new
CTitleBlock
(
$ttl
,
'timesheet.png'
,
$m
,
"
$m
.
$a
"
);
$titleBlock
=
new
CTitleBlock
(
$ttl
,
'timesheet.png'
,
$m
,
"
$m
.
$a
"
);
$titleBlock
->
addCrumb
(
"?m=timesheet"
,
"view all timesheets"
);
$titleBlock
->
addCrumb
(
"?m=timesheet"
,
"view all timesheets"
);
if
(
$canDelete
&&
(
$timesheet_id
>
0
)
)
{
if
(
$canDelete
&&
(
$timesheet_id
>
0
)
)
{
$titleBlock
->
addCrumbDelete
(
'delete timesheet'
,
$canDelete
,
$msg
);
$titleBlock
->
addCrumbDelete
(
'delete timesheet'
,
$canDelete
,
$msg
);
}
}
$titleBlock
->
show
();
$titleBlock
->
show
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment