Commit 0f041064 authored by Jerome Mariette's avatar Jerome Mariette
Browse files

add date field

parent 4bf8fc81
......@@ -253,7 +253,7 @@ class tx_nG6_eid {
$value = trim(t3lib_div::_GP('value'));
//If change concernes a date
if( $field == "date" )
if( $field == "date" || $field == "crdate" )
{
//Change date format
$date = explode('-', $value) ;
......
......@@ -80,6 +80,7 @@ class tx_nG6_db {
'tx_nG6_project.description AS project_description, '.
'tx_nG6_project.fe_group AS project_fe_group, '.
'tx_nG6_project.public AS project_public, '.
'tx_nG6_project.crdate AS project_crdate, '.
'tx_nG6_project.hidden AS project_hidden',
'FROM' => 'tx_nG6_project',
'WHERE' => $where,
......@@ -109,6 +110,7 @@ class tx_nG6_db {
'id' => $project_id,
'name' => $row['project_name'],
'hidden' => $row['project_hidden'],
'date' => $row['project_crdate'],
'public' => $row['project_public'],
'group' => $row['project_fe_group'],
'description' => $row['project_description']);
......@@ -138,6 +140,7 @@ class tx_nG6_db {
return array('id' => $vals['uid'],
'name' => $vals['name'],
'hidden' => $vals['hidden'],
'date' => $vals['crdate'],
'public' => $vals['public'],
'group' => $vals['fe_group'],
'description' => $vals['description']);
......
......@@ -209,7 +209,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
{assign var="hidden_attribute" value=""}
{/if}
<td class="{$editable} field=project=name {$hidden_attribute}">{$project_values.href}</td>
<td class="{$editable} field=run=date {$hidden_attribute}">{$project_values.date|date_format:"%d-%m-%y"}</td>
<td class="{$editable} field=project=crdate {$hidden_attribute}">{$project_values.date|date_format:"%d-%m-%y"}</td>
<td class="{$editable} field=project=description {$hidden_attribute}">{$project_values.description}</td>
</tr>
{/foreach}
......
......@@ -79,7 +79,7 @@ $(function () {
var field = match[2];
/* For dates */
if( field == 'date' )
if( field == 'date' || field == 'crdate' )
{
attribType = "calendar" ;
attribOnblur = "ignore" ; //For keep input when click on calendar
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment