Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
8b76f567
Commit
8b76f567
authored
Apr 03, 2007
by
Penny Leach
Browse files
resume: fixing bug [#562] - personal information fields should not
be required
parent
ccb2c4ba
Changes
2
Hide whitespace changes
Inline
Side-by-side
htdocs/artefact/resume/index.php
View file @
8b76f567
...
...
@@ -122,36 +122,24 @@ $form = array(
'defaultvalue'
=>
((
!
empty
(
$personalinformation
))
?
strtotime
(
$personalinformation
->
get_composite
(
'dateofbirth'
))
:
null
),
'title'
=>
get_string
(
'dateofbirth'
,
'artefact.resume'
),
'rules'
=>
array
(
'required'
=>
true
,
),
),
'placeofbirth'
=>
array
(
'type'
=>
'text'
,
'defaultvalue'
=>
((
!
empty
(
$personalinformation
))
?
$personalinformation
->
get_composite
(
'placeofbirth'
)
:
null
),
'title'
=>
get_string
(
'placeofbirth'
,
'artefact.resume'
),
'rules'
=>
array
(
'required'
=>
true
,
),
),
'citizenship'
=>
array
(
'type'
=>
'text'
,
'defaultvalue'
=>
((
!
empty
(
$personalinformation
))
?
$personalinformation
->
get_composite
(
'citizenship'
)
:
null
),
'title'
=>
get_string
(
'citizenship'
,
'artefact.resume'
),
'rules'
=>
array
(
'required'
=>
true
,
),
),
'visastatus'
=>
array
(
'type'
=>
'text'
,
'defaultvalue'
=>
((
!
empty
(
$personalinformation
))
?
$personalinformation
->
get_composite
(
'visastatus'
)
:
null
),
'title'
=>
get_string
(
'visastatus'
,
'artefact.resume'
),
'rules'
=>
array
(
'required'
=>
true
,
),
),
'gender'
=>
array
(
'type'
=>
'radio'
,
...
...
@@ -162,18 +150,12 @@ $form = array(
'male'
=>
get_string
(
'male'
,
'artefact.resume'
),
),
'title'
=>
get_string
(
'gender'
,
'artefact.resume'
),
'rules'
=>
array
(
'required'
=>
true
,
),
),
'maritalstatus'
=>
array
(
'type'
=>
'text'
,
'defaultvalue'
=>
((
!
empty
(
$personalinformation
))
?
$personalinformation
->
get_composite
(
'maritalstatus'
)
:
null
),
'title'
=>
get_string
(
'maritalstatus'
,
'artefact.resume'
),
'rules'
=>
array
(
'required'
=>
true
,
),
),
),
),
...
...
htdocs/artefact/resume/lib.php
View file @
8b76f567
...
...
@@ -219,7 +219,7 @@ class ArtefactTypePersonalinformation extends ArtefactTypeResume {
// only set it to dirty if it's changed
$this
->
dirty
=
true
;
$this
->
mtime
=
time
();
if
(
$field
==
'dateofbirth'
)
{
if
(
$field
==
'dateofbirth'
&&
!
empty
(
$value
)
)
{
$value
=
db_format_timestamp
(
$value
);
}
$this
->
composites
[
$field
]
=
$value
;
...
...
@@ -255,12 +255,12 @@ class ArtefactTypePersonalinformation extends ArtefactTypeResume {
public
static
function
get_composite_fields
()
{
static
$composites
=
array
(
'dateofbirth'
=>
''
,
'placeofbirth'
=>
''
,
'citizenship'
=>
''
,
'visastatus'
=>
''
,
'gender'
=>
''
,
'maritalstatus'
=>
''
,
'dateofbirth'
=>
null
,
'placeofbirth'
=>
null
,
'citizenship'
=>
null
,
'visastatus'
=>
null
,
'gender'
=>
null
,
'maritalstatus'
=>
null
,
);
return
$composites
;
}
...
...
Write
Preview
Supports
Markdown
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