place date and time field on the ItemAddAlbum.tpl

nonamer

Joined: 2007-03-28
Posts: 63
Posted: Thu, 2011-09-01 03:38

I want to place the date and time field on the ItemAddAlbum.tpl so when I create an album I can assign the date myself instead of it being generated for me. How can I do this? I have the code for ItemEditItem.tpl that contains it.

<div class="gbBlock">
  <h3> {g->text text="%s Date and Time" arg1=$ItemEditItem.typeName.0
	postSprintfArg1=$ItemEditItem.typeName.2} </h3>
	{* Specific translations: {g->text text="Link Date and Time"} *}

  <p class="giDescription">
    {if !empty($ItemEditItem.isItemPhoto)}
      {g->text text="Set the date and time when this image was captured."}
    {elseif !empty($ItemEditItem.isItemUnknown)}
      {g->text text="Set the date and time to be displayed for this item."}
    {else}
      {g->text text="Set the date and time to be displayed for this %s."
	       arg1=$ItemEditItem.typeName.1 postSprintfArg1=$ItemEditItem.typeName.3}
      {* Specific translations:
	 {g->text text="Set the date and time to be displayed for this link."} *}
    {/if}
  </p>

  <p>
    {capture name=originationTimestampField}{strip}
      {g->formVar var="form[originationTimestampSplit]"}
    {/strip}{/capture}
    {g->text text="Date:"}
    {capture name=htmlSelectDate}
      {html_select_date time=$form.originationTimestamp
       field_array=$smarty.capture.originationTimestampField start_year="1970" end_year="+0"}
    {/capture}
    {$smarty.capture.htmlSelectDate|utf8}
    {g->text text="Time:"}
    {html_select_time time=$form.originationTimestamp
     field_array=$smarty.capture.originationTimestampField}
    <br/>
  </p>

  {if !empty($ItemEditItem.originationTimestamp)}
  <script type="text/javascript">
  // <![CDATA[
  function setOriginationTimestamp() {ldelim}
    var frm = document.getElementById('itemAdminForm');
    frm.elements['{$smarty.capture.originationTimestampField}[Date_Month]'].value = '{$ItemEditItem.originationTimestamp.Date_Month}';
    frm.elements['{$smarty.capture.originationTimestampField}[Date_Day]'].value = '{$ItemEditItem.originationTimestamp.Date_Day}';
    frm.elements['{$smarty.capture.originationTimestampField}[Date_Year]'].value = '{$ItemEditItem.originationTimestamp.Date_Year}';
    frm.elements['{$smarty.capture.originationTimestampField}[Time_Hour]'].value = '{$ItemEditItem.originationTimestamp.Time_Hour}';
    frm.elements['{$smarty.capture.originationTimestampField}[Time_Minute]'].value = '{$ItemEditItem.originationTimestamp.Time_Minute}';
    frm.elements['{$smarty.capture.originationTimestampField}[Time_Second]'].value = '{$ItemEditItem.originationTimestamp.Time_Second}';
  {rdelim}
  // ]]>
  </script>
  <p>
    {g->text text="Use the original capture date and time from file information (e.g. Exif tag):"}
    <br/>
    <a href="#" onclick="setOriginationTimestamp();return false">
      {g->date timestamp=$ItemEditItem.originationTimestamp.timestamp style="datetime"}
    </a>
  </p>
  {/if}

  {if !empty($form.error.originationTimestamp.invalid)}
  <div class="giError">
    {g->text text="You must enter a valid date and time"}
  </div>
  {/if}
</div>

this is really important to me so please help me!!! ;) thanks

 
nonamer

Joined: 2007-03-28
Posts: 63
Posted: Wed, 2012-08-29 18:23

bump