[symfony-users] Re: getUriPrefix() not printing port...

2008-05-19 Thread Sumedh

Anyone? :|

On May 17, 4:52 pm, Sumedh [EMAIL PROTECTED] wrote:
 Hi friends,

 I have this line...

 $this-urlBase = $this-getRequest()-getUriPrefix();

 in the action class...but this method does not print the port...it
 prints the first part (http://dev.example.com) correctly...but not my
 port...i.e. 8088

 Is it some known issues in getUriPrefix() method?

 - Thanks,
 Sumedhhttp://sumedhsays.wordpress.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] '%' character won't pass through Ajax 'observe_field' value parameter ...

2008-05-19 Thread Shinkan

Hi there !

I use this exact sample of code :

?php echo input_tag('rebate_' . $product_idname,
$product_array['rebate'], array( 'maxlength' = 5, 'size' = 6 )) ?
?php echo observe_field('rebate_' . $product_idname, 
array(
'url' = 
'orders/productRebate?id=' . $product_idname,
'loading' = 
Element.show('loading_div');,
'before' = alert(value);,
'complete' = 
Element.hide('loading_div'); .
remote_function(array(
'update' = 
'cart_list_content',
'url' = 
'orders/cartRefresh',
'loading' = 
Element.show('loading_div');,
'complete' = 
Element.hide('loading_div');,
'script' = 
true)),
'method' = 'get',
'script' = true,
'with' = 'rebate=' + value)) 
?



The fact is that is use 'rebate' field to input percentages, like
'90%'.
My before trigger on observe_field correctly shows me '90%' (with
alert()), but the action is not triggered (I don't get anything on
productRebate action).
When I input floats (like 0.9) in my rebate field, everything is
working.
So I just believe the percent (%) character is the trouble.

How can I proceed to obtain my f*$ù!ng '90%' on my action ?
Thanks in advance.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Ajax request and cookie handling

2008-05-19 Thread Shinkan

Hi there !

I have a problem with my symfony application, and I haven't found any
solution on snippets or any other documentation.

I have a whole secured app (is_secure: on on app's scope
security.yml), except for login and logout actions.
I widely use Ajax requests to display forms on pop-up divs.
I also remember logged users with session persistence (through
cookie).

The fact is, when session expires, my request is naturally forwarded
(probably by sfSecurityFilter) to my login action.
But this one check for an existing cookie and re-log user if cookie
is authenticated.
This works perfectly on normal pages with standard request, but as
soon as a session expires, Ajax requests results are all the login
form ...

Here is the beginning of my login action :

if( $this-getRequest()-getMethod() != sfRequest::POST )
{
$cookie = $this-getRequest()-
getCookie(sfConfig::get('app_cookie_name'));
if( $cookie )
{



Right ...
Is this that Ajax requests doesn't have access to cookie with
getCookie ?

How could I proceed to make Ajax requests checking cookies if it's the
case ?

Thanks in advance.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: getUriPrefix() not printing port...

2008-05-19 Thread Thomas Rabaix

The sfWebRequest uses the method

  /**
   * Returns the array that contains all request information ($_SERVER
or $_ENV).
   *
   * This information is stored in the [sf_path_info_array] constant.
   *
   * @return  array Path information
   */
  protected function getPathInfoArray()
  {
if (!$this-pathInfoArray)
{
  // parse PATH_INFO
  switch (sfConfig::get('sf_path_info_array'))
  {
case 'SERVER':
  $this-pathInfoArray = $_SERVER;
  break;

case 'ENV':
default:
  $this-pathInfoArray = $_ENV;
  }
}

return $this-pathInfoArray;
  }

to get the port information. So you have to check which
'sf_path_info_array' is used, and then check if the port value is set.

Thomas

On Mon, May 19, 2008 at 8:55 AM, Sumedh [EMAIL PROTECTED] wrote:

 Anyone? :|

 On May 17, 4:52 pm, Sumedh [EMAIL PROTECTED] wrote:
 Hi friends,

 I have this line...

 $this-urlBase = $this-getRequest()-getUriPrefix();

 in the action class...but this method does not print the port...it
 prints the first part (http://dev.example.com) correctly...but not my
 port...i.e. 8088

 Is it some known issues in getUriPrefix() method?

 - Thanks,
 Sumedhhttp://sumedhsays.wordpress.com
 




-- 
Thomas Rabaix

Internet Consultant

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: sfGuardPlugin DB Layout Question

2008-05-19 Thread kayoone

nobody using sfGuard for complex projects? Common :)

I dont see a problem i using the profile_id to link it with site
content, but it would need 2 joins then to get the username.

eg:
$article-getMemberProfile()-getsfGuardUser()-getUsername()

That would result in more complex queries, which might be slower
especially when there is a list to be displayed with many entries
and usernames.

Really wondering how people do it, if you use the sfguarduser table
you have to get the sfguard schema.yml into your main schema and then
you have the problems i described above.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: sfGuardPlugin DB Layout Question

2008-05-19 Thread Lee Bolding

Make the user_profile-sfGuardUser a 1:1 relationship, then you don't  
need to do a join - the profile ID will always be the same as the user  
id.

Realistically, are users ever going to have more than 1 profile? 

On 19 May 2008, at 10:34, kayoone wrote:


 nobody using sfGuard for complex projects? Common :)

 I dont see a problem i using the profile_id to link it with site
 content, but it would need 2 joins then to get the username.

 eg:
 $article-getMemberProfile()-getsfGuardUser()-getUsername()

 That would result in more complex queries, which might be slower
 especially when there is a list to be displayed with many entries
 and usernames.

 Really wondering how people do it, if you use the sfguarduser table
 you have to get the sfguard schema.yml into your main schema and then
 you have the problems i described above.
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] XML Schema and sfAlternativeSchemaPlugin?

2008-05-19 Thread Lee Bolding

Is anybody using XML schema with sfAlternativeSchemaPlugin?

Or is it planned to support XML schema's soon?

I can't use Propel validators at the same time as  
sfAlternativeSchemaPlugin at the moment...

Ofcourse, adding Propel validators to the YML syntax would also solve  
this problem :)

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: Breadcrumb best practice

2008-05-19 Thread markchicobaby

How about Motilee, it also uses bread crumbs, via a slot.

I can't seem to find any files in the Motilee download resembling the
above, I was wondering if anyone knows off the top of their head how
Motile implements their breadcrumbs? (Before I dig too much
further...)

Thank you


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: Breadcrumb best practice

2008-05-19 Thread markchicobaby

Ah, I got it.  The Motile breadcrumb is implemented via a helper in
sfSimpleForumHelper.php

M


On May 19, 10:23 pm, markchicobaby [EMAIL PROTECTED] wrote:
 How about Motilee, it also uses bread crumbs, via a slot.

 I can't seem to find any files in the Motilee download resembling the
 above, I was wondering if anyone knows off the top of their head how
 Motile implements their breadcrumbs? (Before I dig too much
 further...)

 Thank you
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: sfGuardPlugin DB Layout Question

2008-05-19 Thread Lee Bolding

Yes, but with a 1:1 relationship they'll both be the same number. They  
should never be different unless you've manually altered your database.

But you can use constraints to further enforce this :)

On 19 May 2008, at 13:31, kayoone wrote:


 but propel objects need their own a primary key, otherwise they wont
 work.
 But i will try if that works, still the profile_id will be different
 from the user_id


 On 19 Mai, 12:21, Lee Bolding [EMAIL PROTECTED] wrote:
 Make the user_profile-sfGuardUser a 1:1 relationship, then you don't
 need to do a join - the profile ID will always be the same as the  
 user
 id.

 Realistically, are users ever going to have more than 1 profile?

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: sfGuardPlugin DB Layout Question

2008-05-19 Thread kayoone

mmh...the thing is, i dont want to have the sfGuard schema in my main
schema because of the problems described above, and
the relation betweet sfguarduser and the profile table is just set via
the config, there is no real relationship i guess.
The getProfile() method of the sfGuardPlugin is looking for the
profile table name in the config and fetching the profile via
the foreign key field which is also defined in the config so there is
no way for me to change that behavior without changing the plugin
code.

However i can just use the user_id Foreign key field to make
relationships to site content since thats also a primary key and we
have only one profile
per user, but that wont solve the problem that i have to do extra
joins to get the username, also $article-getSfGuardUser() wont work
then either i think.

I really wonder how other people do this.



On 19 Mai, 16:30, Lee Bolding [EMAIL PROTECTED] wrote:
 Yes, but with a 1:1 relationship they'll both be the same number. They
 should never be different unless you've manually altered your database.

 But you can use constraints to further enforce this :)

 On 19 May 2008, at 13:31, kayoone wrote:



  but propel objects need their own a primary key, otherwise they wont
  work.
  But i will try if that works, still the profile_id will be different
  from the user_id

  On 19 Mai, 12:21, Lee Bolding [EMAIL PROTECTED] wrote:
  Make the user_profile-sfGuardUser a 1:1 relationship, then you don't
  need to do a join - the profile ID will always be the same as the
  user
  id.

  Realistically, are users ever going to have more than 1 profile?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: sfGuardPlugin DB Layout Question

2008-05-19 Thread Lee Bolding

There's a MUCH simpler way - leave out the id column in  
sf_guard_user_profile, and use a user_id column (foreign key to  
sf_guard_user).

Works for me :)

I end up doing most of my stuff by working with user profiles, because  
that contains the data I need most often - firstname, lastname etc.  
Rarely do I actually need to modfiy the data in sf_guard_user table...  
so it doesn't make sense to be working with user objects directly.

I'm not sure if that's the *correct* way of doing it, but it's  
efficient, and it works for me :)

On 19 May 2008, at 16:08, kayoone wrote:


 mmh...the thing is, i dont want to have the sfGuard schema in my main
 schema because of the problems described above, and
 the relation betweet sfguarduser and the profile table is just set via
 the config, there is no real relationship i guess.
 The getProfile() method of the sfGuardPlugin is looking for the
 profile table name in the config and fetching the profile via
 the foreign key field which is also defined in the config so there is
 no way for me to change that behavior without changing the plugin
 code.

 However i can just use the user_id Foreign key field to make
 relationships to site content since thats also a primary key and we
 have only one profile
 per user, but that wont solve the problem that i have to do extra
 joins to get the username, also $article-getSfGuardUser() wont work
 then either i think.

 I really wonder how other people do this.



 On 19 Mai, 16:30, Lee Bolding [EMAIL PROTECTED] wrote:
 Yes, but with a 1:1 relationship they'll both be the same number.  
 They
 should never be different unless you've manually altered your  
 database.

 But you can use constraints to further enforce this :)

 On 19 May 2008, at 13:31, kayoone wrote:



 but propel objects need their own a primary key, otherwise they wont
 work.
 But i will try if that works, still the profile_id will be different
 from the user_id

 On 19 Mai, 12:21, Lee Bolding [EMAIL PROTECTED] wrote:
 Make the user_profile-sfGuardUser a 1:1 relationship, then you  
 don't
 need to do a join - the profile ID will always be the same as the
 user
 id.

 Realistically, are users ever going to have more than 1 profile?
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Bug in the sfValidatorChoice

2008-05-19 Thread Dmitry Nesteruk
I think you have some bug in the sfValidatorChoice. The validation don't
passes, when the values and text of options are different.
The function doClean of sfValidatorChoice should be:

  protected function doClean($value)
  {
$choices = $this-getOption('choices');
if ($choices instanceof sfCallable)
{
  $choices = $choices-call();
}

//fixed bug
$choices = array_keys($choices);

if (!in_array($value, $choices))
{
  throw new sfValidatorError($this, 'invalid', array('value' =
$value));
}

return $value;
  }

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Setting charset in symfony 1.1

2008-05-19 Thread John Arevalo

Hi list,

i have a DB with LATIN1(iso-8859-1) in production with other
applications, so i can't change it to utf-8.

I'm using symfony 1.1 to develop another app using same DB, i've
configured these changes to charset:

frontend/config/settings.yml

all:
  .settings:
charset:iso-8859-1

databases.yml

all:

-- 
John Arévalo
GNU/Linux User #443701
http://counter.li.org/

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: Setting charset in symfony 1.1

2008-05-19 Thread John Arevalo

Hi list,

i have a DB with LATIN1(iso-8859-1) in production with other
applications, so i can't change it to utf-8.

I'm using symfony 1.1 to develop another app using same DB, i've
configured these changes to charset:

frontend/config/settings.yml

all:
 .settings:
   charset:iso-8859-1

databases.yml

all:
  propel:
param:
   encoding: iso-8859-1

all is working fine except by configure:author task, have é character,
in file appears

@author ArÃ(c)valo

how can i configure this task to iso-8859-1?

Thanks,

PD: excuse me 2 post, sending premature



-- 
John Arévalo
GNU/Linux User #443701
http://counter.li.org/

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Validation problems

2008-05-19 Thread Reynier Perez Mira

Hi,
I'm trying to valídate the data inserted in a form. For that reason I created a 
file called AdicionarLicencias.yml inside the /validate folder in my module. 
This is the content of the file:

/valídate/AdicionarLicencias.yml
fillin:
  enabled: true
fields: 
  nombre:
required: 
  msg: El campo Nombre no se puede dejar vacío
sfStringValidator:
  min: 3
  min_error: El campo Nombre no puede tener menos de 5 carácteres
  max: 150
  max_error: El campo Nombre no puede tener más de 150 carácteres
  dvd:
required: 
  msg: El campo DVD no se puede dejar vacio
sfNumberValidator:
  type: float
  fecha_adq:
required: 
  msg: El campo Fecha de Adquisición no se puede dejar vacio
  fecha_ven:
required: 
  msg: El campo Fecha de Vencimiento no se puede dejar vacio
  sitio:
sfUrlValidator:
  msg: Dirección no valida

Then in my class I have a method called AdicionarLicencias() with this code:
public function executeAdicionarLicencias()
{
if ($this-getRequest()-getMethod() != sfRequest::POST) {
// Some irrelevant operations, for this enviroment, to 
retrieval data from DB
return sfView::SUCCESS;
} else {
// Insert the data and redirect to @listar_licencias 
$this-redirect('@listar_licencias');
}
}

And I have also the function for handle the Error:
public function handleErrorAdicionarLicencias()
{
// Some irrelevant operations, for this enviroment, to retrieval data 
from DB - This are the same as the AdicionarLicencias method before POST 
return sfView::SUCCESS;
}

Al lis good now. If I send the form ,with caused errors, I mean fields empty or 
others cases, to test if validation Works I get this error:

[sfRenderException]
The template /_MainMenu.php does not exist in:
stack trace

* at ()
  in SF_SYMFONY_LIB_DIR/view/sfView.class.php line 463 ...
 460. if (!is_readable($template))
 461. {
 462.   // the template isn't readable
 463.   throw new sfRenderException(sprintf('The template %s 
does not exist in: %s', $template, $this-directory));
 464. }
 465.
 466. // check to see if this is a decorator template



¿Can any tell me or give me any idea why Symfony call __MainMenu.php partial 
when this belong to another module and haven't any relationship with this one?
Cheers and thanks in advance
Ing. Reynier Pérez Mira
Grupo Soporte al Desarrollo - Dirección Técnica IP



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: sfGuardPlugin DB Layout Question

2008-05-19 Thread kayoone

i think i tried that already and that didnt really work because as far
as i know propel objects need their own primary key to work correct.
But ill try that again... I also dont need the user table often, but
when i need a nickname, i need a user table.
Problem is i cant make a relationship between the profile table and eg
the article table because symfony needs a auto increment primary key
for make a FK relationship...so that cant work they way you said !?
how to you connect the user table to a content table ?


On 19 Mai, 17:48, Lee Bolding [EMAIL PROTECTED] wrote:
 There's a MUCH simpler way - leave out the id column in
 sf_guard_user_profile, and use a user_id column (foreign key to
 sf_guard_user).

 Works for me :)

 I end up doing most of my stuff by working with user profiles, because
 that contains the data I need most often - firstname, lastname etc.
 Rarely do I actually need to modfiy the data in sf_guard_user table...
 so it doesn't make sense to be working with user objects directly.

 I'm not sure if that's the *correct* way of doing it, but it's
 efficient, and it works for me :)

 On 19 May 2008, at 16:08, kayoone wrote:



  mmh...the thing is, i dont want to have the sfGuard schema in my main
  schema because of the problems described above, and
  the relation betweet sfguarduser and the profile table is just set via
  the config, there is no real relationship i guess.
  The getProfile() method of the sfGuardPlugin is looking for the
  profile table name in the config and fetching the profile via
  the foreign key field which is also defined in the config so there is
  no way for me to change that behavior without changing the plugin
  code.

  However i can just use the user_id Foreign key field to make
  relationships to site content since thats also a primary key and we
  have only one profile
  per user, but that wont solve the problem that i have to do extra
  joins to get the username, also $article-getSfGuardUser() wont work
  then either i think.

  I really wonder how other people do this.

  On 19 Mai, 16:30, Lee Bolding [EMAIL PROTECTED] wrote:
  Yes, but with a 1:1 relationship they'll both be the same number.
  They
  should never be different unless you've manually altered your
  database.

  But you can use constraints to further enforce this :)

  On 19 May 2008, at 13:31, kayoone wrote:

  but propel objects need their own a primary key, otherwise they wont
  work.
  But i will try if that works, still the profile_id will be different
  from the user_id

  On 19 Mai, 12:21, Lee Bolding [EMAIL PROTECTED] wrote:
  Make the user_profile-sfGuardUser a 1:1 relationship, then you
  don't
  need to do a join - the profile ID will always be the same as the
  user
  id.

  Realistically, are users ever going to have more than 1 profile?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: Breadcrumb best practice

2008-05-19 Thread Balaji Srinivasan

Usually breadcrumbs refer to the full path and NOT the recent history
Balaji

On May 19, 2008, at 10:31 AM, [EMAIL PROTECTED] wrote:


 I may be wrong, but what I call breadcrumb is a list of the recently
 visited page by the visitor (like in wikis, or in sugarCRM).
 And what you call breadcrumb seems to be the full path where the
 user is currently in, what I call rootline.

 What are the official terms ?


 On 19 mai, 14:30, markchicobaby [EMAIL PROTECTED] wrote:
 Ah, I got it.  The Motile breadcrumb is implemented via a helper in
 sfSimpleForumHelper.php

 M

 On May 19, 10:23 pm, markchicobaby [EMAIL PROTECTED] wrote:



 How about Motilee, it also uses bread crumbs, via a slot.

 I can't seem to find any files in the Motilee download resembling  
 the
 above, I was wondering if anyone knows off the top of their head how
 Motile implements their breadcrumbs? (Before I dig too much
 further...)

 Thank you
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Javascript form validation built in?

2008-05-19 Thread Daevid Vincent
I'm curious if there is a standard library or practice for form validation
using JS just as there is for PHP. It is sort of baffling to me as to why
symfony would omit something as useful as this.

 

Seems silly that if symfony knows a form field is required, what kind of
form element it is, what it's name/id is, and even what error message to
display, that it can't plug these into some standard JS functions. In fact
there's even a form_tag() that could be used to automatically stick in the
proper onSubmit handler.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] How do I access a validate .yml setting in my template?

2008-05-19 Thread Daevid Vincent
In my modules\user\validate\register.yml file I have:

 

usernameSizeValidator:

class: sfStringValidator

param:

  min:4

  min_error:  Username must be 4 or more characters

  max:15

  max_error:  Username must be 15 or less characters

 

How can I access the min and max values to display in my registerSuccess.php
page?

 

As in, No spaces minimum 4 characters, maximum 15 characters. Username will
be shown publicly.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: Referer null sometimes...

2008-05-19 Thread Sumedh

Anyone has any idea?

would I have to maintain the value myself in session? :|

On May 19, 11:51 am, Sumedh [EMAIL PROTECTED] wrote:
 Yeah...I am not talking about putting it in browser...

 I am following a link...and getting it correctly sometimes...and null
 sometimes...in the same browser (Firefox)...

 On May 17, 5:51 pm, [EMAIL PROTECTED]

 [EMAIL PROTECTED] wrote:
  And it depends on browsers. Never rely on this value!
  If you need to be sure, track your urls in the users session.

  Michael

  On 17 Mai, 14:46, Tom Haskins-Vaughan [EMAIL PROTECTED]
  wrote:

   I know you've probably thought of this, but the referer will be null if
   you enter the address in the browser's location bar rather than
   following a link.

   Sumedh wrote:
Hi guys...

Facing a weird problem...

I am getting the request-getReferer() as null sometimes...there is no
pattern in the behavior...happening randomly, as far as I saw today...

Any known issues with it?

   --
   Tom Haskins-Vaughan
   Temple Street Media: Design and Development for the Web
   [EMAIL PROTECTED] |www.templestreetmedia.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] fillin:true through code

2008-05-19 Thread Sumedh

Can we set fillin as true through code, if I don't want to use YAML
file for validation?

YAML file is creating a strange problem...when I use it, my
form_remote_tag on the success page (after validation and form
submission) doesn't work!!! the template just goes blank!!!
Don't know what is the connection...

So I am doing validation through code...but repopulating the form
manually is very tedious... :|
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---