Skip to content
GitLab
About GitLab
GitLab: the DevOps platform
Explore GitLab
Install GitLab
How GitLab compares
Get started
GitLab docs
GitLab Learn
Pricing
Talk to an expert
/
Help
What's new
2
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Projects
Groups
Snippets
Sign up now
Login
Sign in / Register
Toggle navigation
Menu
Open sidebar
joomleague
Joomleague
Commits
e0a7a3b7
Commit
e0a7a3b7
authored
Feb 16, 2021
by
comraden
Browse files
add place of birth/death
parent
38e605a4
Changes
3
Hide whitespace changes
Inline
Side-by-side
com_joomleague/administrator/components/com_joomleague/assets/updates/jl_update_place_birthdeath.php
0 → 100644
View file @
e0a7a3b7
<?php
// no direct access
defined
(
'_JEXEC'
)
or
die
(
'Restricted access'
);
$version
=
'1.0'
;
$updateFileDate
=
'2021-02-16'
;
$updateFileTime
=
'12:00'
;
$updateDescription
=
'<span style="color:green">Update person (place of birth/death)</span>'
;
$excludeFile
=
'false'
;
if
(
!
function_exists
(
'PrintStepResult'
))
{
function
PrintStepResult
(
$result
)
{
if
(
$result
)
{
$output
=
' - <span style="color:green">'
.
JText
::
_
(
'SUCCESS'
)
.
'</span>'
;
}
else
{
$output
=
' - <span style="color:red">'
.
JText
::
_
(
'FAILED'
)
.
'</span>'
;
}
return
$output
;
}}
function
UpdateTablePerson
()
{
$db
=
JFactory
::
getDBO
();
echo
JText
::
sprintf
(
'Update table %1$s'
,
'<b>#__joomleague_person</b>'
);
$query
=
"
ALTER TABLE `#__joomleague_person` ADD
`birthplace` varchar(50) NOT NULL
AFTER `birthday`
"
;
$db
->
setQuery
(
$query
);
if
(
$db
->
query
()
)
{
echo
' - <span style="color:green">'
.
JText
::
_
(
'SUCCESS'
)
.
'</span>'
;
}
else
{
echo
' - <span style="color:red">'
.
JText
::
_
(
'FAILED'
)
.
'</span>'
;
}
$query
=
"
ALTER TABLE `#__joomleague_person`
ADD `deathplace` varchar(50) NOT NULL
AFTER `deathday`
"
;
$db
->
setQuery
(
$query
);
if
(
$db
->
query
()
)
{
echo
' - <span style="color:green">'
.
JText
::
_
(
'SUCCESS'
)
.
'</span>'
;
}
else
{
echo
' - <span style="color:red">'
.
JText
::
_
(
'FAILED'
)
.
'</span>'
;
}
return
''
;
}
?>
<hr>
<?php
$output
=
JText
::
sprintf
(
'JoomLeague v%1$s - Database-Update - Filedate: %2$s / %3$s'
,
$version
,
$updateFileDate
,
$updateFileTime
);
JToolBarHelper
::
title
(
$output
);
echo
UpdateTablePerson
();
echo
'<br/>'
;
?>
<hr
/>
com_joomleague/administrator/components/com_joomleague/models/forms/person.xml
View file @
e0a7a3b7
...
...
@@ -63,12 +63,22 @@
label=
"COM_JOOMLEAGUE_ADMIN_PERSON_BIRTHDAY"
class=
"inputbox"
format=
"%Y-%m-%d"
/>
<field
name=
"birthplace"
type=
"text"
label=
"COM_JOOMLEAGUE_ADMIN_PERSON_BIRTHPLACE"
class=
"inputbox"
/>
<field
name=
"deathday"
type=
"calendar"
label=
"COM_JOOMLEAGUE_ADMIN_PERSON_DEATHDAY"
class=
"inputbox"
format=
"%Y-%m-%d"
/>
<field
name=
"deathplace"
type=
"text"
label=
"COM_JOOMLEAGUE_ADMIN_PERSON_DEATHPLACE"
class=
"inputbox"
/>
<field
name=
"height"
type=
"text"
...
...
@@ -225,4 +235,4 @@
<option
value=
"1"
>
JYES
</option>
</field>
</fieldset>
</form>
\ No newline at end of file
</form>
languages/en-GB/admin/en-GB/en-GB.com_joomleague.ini
View file @
e0a7a3b7
...
...
@@ -807,6 +807,8 @@ COM_JOOMLEAGUE_ADMIN_PERSON_L_NAME="Last name"
;COM_JOOMLEAGUE_ADMIN_PERSON_IMAGE="Image"
COM_JOOMLEAGUE_ADMIN_PERSON_BIRTHDAY
=
"Birthday"
COM_JOOMLEAGUE_ADMIN_PERSON_DEATHDAY
=
"Day of death"
COM_JOOMLEAGUE_ADMIN_PERSON_BIRTHPLACE
=
"Birthplace"
COM_JOOMLEAGUE_ADMIN_PERSON_DEATHPLACE
=
"Place of death"
COM_JOOMLEAGUE_ADMIN_PERSON_NATIONALITY
=
"Nationality"
COM_JOOMLEAGUE_ADMIN_PERSON_INFO
=
"Info"
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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