List:Eventum General Discussion« Previous MessageNext Message »
From:Justin Putney Date:September 10 2009 8:16pm
Subject:Re: linking to Eventum pages & creating issues
View as plain text  
Brian,

I had to make an edit to *edit_custom_fields.tpl.html *in order to get the
custom field to work using the name. By default it was using the field
number which was not so helpful.

I tried to add it in the least invasive way possible. It looks like it can
be appended to the smarty request after declaring a $fld_title variable at
the top:

(~ line 10)
{assign var='fld_title' value=$custom_fields[i].fld_title}

(~ line 40)
<input id="custom_field_{$custom_fields[i].fld_id}" class="default"
type="text" name="custom_fields[{$custom_fields[i].fld_id}]" maxlength="255"
size="50" tabindex="{$tabindex++}"
value="{$smarty.request.custom_fields[$fld_id]|*
default:$smarty.request.custom_fields[$fld_title]|*
default:$custom_fields[i].value|default:$custom_fields[i].default_value}">

This could be added to all of the smarty requests.

Also, since the vars are assigned at the top, it seems like this file could
be simplified by using the shorter vars:
custom_fields[{$fld_id}] /*instead of*/
custom_fields[{$custom_fields[i].fld_id}]

Perhaps this can be incorporated into a future version. Let me know if that
doesn't work or make sense for some reason.

I'm still not able to get to the project using new.php?prj_id=X. Could
provide a little more guidance there?

Thanks!

-Justin

On Thu, Sep 10, 2009 at 9:50 AM, Bryan Alsdorf <bryan@stripped> wrote:

> Justin Putney wrote:
>
>> Thanks, Bryan. That makes sense. I'll give it a try. Can I send it to a
>> specific project this way?
>>
>
> You can pass prj_id=X to new.php where x is the ID of the project (this is
> already supported by Eventum)
>
>  Also, do I have to do anything different to set custom fields?
>>
>
> You just have to use a special name for them, custom_fields[X] where X is
> the field ID. In testing it seems custom fields already use $smarty.request
> so you won't have to edit them.
>
> new.php?custom_fields[4]=blah works for me.
>
>  Would you mind posting the list of possible GET/POST values I could set or
>> let me know the best place to look for them?
>>
>
> You can look at templates/new.tpl.html at the input fields, or perhaps a
> simpler way if you have firebug installed is just inspect the element and
> get the name from it.
>
>
> Best Regards,
> --
> Bryan Alsdorf, Lead Web Developer
> Monty Program, AB. http://askmonty.org
>

Thread
linking to Eventum pages & creating issuesJustin Putney10 Sep
Re: linking to Eventum pages & creating issuesJustin Putney10 Sep
  • Re: linking to Eventum pages & creating issuesBryan Alsdorf10 Sep
    • Re: linking to Eventum pages & creating issuesJustin Putney10 Sep
      • Re: linking to Eventum pages & creating issuesBryan Alsdorf10 Sep
        • Re: linking to Eventum pages & creating issuesJustin Putney10 Sep
          • Re: linking to Eventum pages & creating issuesBryan Alsdorf10 Sep
            • Re: linking to Eventum pages & creating issuesJustin Putney10 Sep
            • Re: linking to Eventum pages & creating issuesJustin Putney10 Sep