[symfony-users] Re: Validators and optionnal fields

2007-07-16 Thread Nicolas Perriault

Kiril Angov a écrit :

>   email:
> sfEmailValidator:
>   email_error:  This email address is invalid

Poltergeist, it did not work yesterday evening and now it does. Thank 
you anyway.

++

-- 
Nicolas Perriaulthttp://www.clever-age.com
Clever Age - conseil en architecture technique
GSM: +33 6 60 92 08 67  Tél: +33 1 53 34 66 10

--~--~-~--~~~---~--~~
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: official routing method for 'default' module ?

2007-07-16 Thread Piers Warmers
Hi Davinder,

If you take a look in:

/apps/myapp/config/settings.yml

You'll find the config settings for all those pieces...

all:
   .actions:
 default_module: default
 default_action: index
etc.

- Piers

On 17/07/2007, at 2:28 PM, Davinder Mahal wrote:

>
> Hi everyone,
>
> Quick question:
> What is the correct way to disable the default module for routing?
>
> I basically do not want any user to type in the module with an action
> and view a page.
> default/unavailable
> default/Login
> default/Secure
> default/Disabled
> etc.
>
> These templates should not be displayed unless the application has
> internally called them. I've read this section in the book, and I
> don't see the specific information.
>
> I currently create a routing method as such:
>
> default_module:
>url:  /default/*
>param: { module: default, action: 404error }
>
> It works, but is this the correct way to do so?
>
> Thank you very much for your help.
>
> Davinder
>
> >


--~--~-~--~~~---~--~~
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] official routing method for 'default' module ?

2007-07-16 Thread Davinder Mahal

Hi everyone,

Quick question:
What is the correct way to disable the default module for routing?

I basically do not want any user to type in the module with an action  
and view a page.
default/unavailable
default/Login
default/Secure
default/Disabled
etc.

These templates should not be displayed unless the application has  
internally called them. I've read this section in the book, and I  
don't see the specific information.

I currently create a routing method as such:

default_module:
   url:  /default/*
   param: { module: default, action: 404error }

It works, but is this the correct way to do so?

Thank you very much for your help.

Davinder

--~--~-~--~~~---~--~~
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: Validators and optionnal fields

2007-07-16 Thread Kiril Angov

This will REQUIRE and validate the input:

email:
required:
  msg:   Email is required
sfEmailValidator:
  email_error:  This email address is invalid


This will only validate the input if != ''

email:
sfEmailValidator:
  email_error:  This email address is invalid


Regards,
Kiril

Steve Lianoglou wrote:
>> Maybe a silly question, but how can I use validators on unrequired
>> field? I mean, I have an unrequired email field in a form and I want :
>>
>>   - that if a surfer submit an email and this email is invalid an error
>> will be thrown
>>   - but if he does not provide an email, the validator won't say anything
>> and the form will be submitted as the email field is optionnal
>> 
>
> I don't know what the best answer to this is either -- but if I can
> pass of the validation to be regex based, then I just include the
> empty string as an option
>
> for instance, my pattern would be something like "/^some_pattern$|^$/"
>
> I'm not sure what the right approach is if you need to use something
> else besides an sfRegexValidator, though.
>
> Hopefully someone else can chime in!
> -steve
>
>
> >
>
>   


--~--~-~--~~~---~--~~
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] sfPropelParanoidBehavior

2007-07-16 Thread Mat

Hi all,

Just getting use to symfony and really love it! We are nearing completion on
our first project however I have hit a little issue with the
sfPropelBehaviorplugin and was hoping someone could shed some light on it.
Essentially we have installed the plugin ans all seems fine, when I delete
an object it updates the "deleted_at" column as expected. However when I do
a search the deleted objects still show up. I've tried the solution
suggested in the trac, and replace sfPeerBuilder however this doesn't seem
to have made any difference. I'm currently running symfony 1.0.5 and 1.0.1
of the paranoid behaviour. 

Does anyone have any suggestions on where to starting trying to track this
down, as I've not really looked into the symfony core before.

Thanks in Advance,
Mat


--~--~-~--~~~---~--~~
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] admin generator + partial + validation problems

2007-07-16 Thread Lloyd Leung
I'm having an issue with the admin generator + partial + validation.  I
can't seem to get this running.  I've search the forums to no avail, perhaps
I'm just using the wrong search terms.

I have a form, which requires both an area code, and telephone number.
(555) 555- ext 123, to be on one line.  Where the area code, is an
numeric field, and the remainder a string field.

I have the partial showing up... but I have two issues:
1.) the validation fails
2.) the saving fails, even if I take out the validation.


Any assistance is greatly appreciated.




#edit.yml
methods:
  post:
- "supplier{tel_areacode}"
- "supplier{tel_number}"

fields:
  supplier{tel_areacode}:
required:
  msg: Your area code is required
sfNumberValidator:
  nan_error: Please enter a valid areacode



#generator.yml
generator:
  class:  sfDoctrineAdminGenerator
  param:
model_class:  Supplier
theme:default
edit:
  title: Editing Supplier "%%company%%"
  display:
"Company Info": [company, contact, _phonenumber]
"Notes": [notes]
  fields:
notes: {params: rich=true tinymce_options=height:150,width:600}



 'get',  1 =>   array
(0 => 'tel_areacode',  ),), array (  'size' => 25,  'control_name' =>
'supplier[tel_areacode]',));

echo $value ? $value : ' ';


$value = object_input_tag($supplier, array (  0 => 'get',  1 =>   array
(0 => 'tel_number',  ),), array (  'size' => 25,  'control_name' =>
'supplier[tel_number]',));

echo $value ? $value : ' ';

?>


-- 
--
Lloyd

--~--~-~--~~~---~--~~
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: Validators and optionnal fields

2007-07-16 Thread Steve Lianoglou

> Maybe a silly question, but how can I use validators on unrequired
> field? I mean, I have an unrequired email field in a form and I want :
>
>   - that if a surfer submit an email and this email is invalid an error
> will be thrown
>   - but if he does not provide an email, the validator won't say anything
> and the form will be submitted as the email field is optionnal

I don't know what the best answer to this is either -- but if I can
pass of the validation to be regex based, then I just include the
empty string as an option

for instance, my pattern would be something like "/^some_pattern$|^$/"

I'm not sure what the right approach is if you need to use something
else besides an sfRegexValidator, though.

Hopefully someone else can chime in!
-steve


--~--~-~--~~~---~--~~
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] Validators and optionnal fields

2007-07-16 Thread Nicolas Perriault

Hi,

Maybe a silly question, but how can I use validators on unrequired
field? I mean, I have an unrequired email field in a form and I want :

  - that if a surfer submit an email and this email is invalid an error
will be thrown
  - but if he does not provide an email, the validator won't say anything
and the form will be submitted as the email field is optionnal

I'm a bit tired these days, I guess that's why I'm stuck on such silly
things, but help will be greatly appreciated :)

++

-- 
Nicolas Perriaulthttp://www.clever-age.com
Clever Age - conseil en architecture technique
GSM: +33 6 60 92 08 67  Tél: +33 1 53 34 66 10


--~--~-~--~~~---~--~~
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] propel-init-admin or propel-generate-crud

2007-07-16 Thread Arnaud

Hello,

The application goal is to create  a small website for a member.

Each member has his own website with an administration. But they can
edit only their website and not the others !

With the admin they can change text and picture for exemple.

I don't know if i have  to use the propel-init-admin or the propel-
generate-crud to create the member area (edit text, picture for his
website).

Is it possible with the propel-init-admin to find the member id in the
session to use it in the form ?
Can i limit the functionalities of the generated admin with propel-
init-admin ? (I don't want of create button for the class user for
exemple)


Thanks for the help.

Arnaud.


--~--~-~--~~~---~--~~
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] sfPrototypeWindowPlugin - innerHTML

2007-07-16 Thread [EMAIL PROTECTED]

Hi,
I have several problems with this plugin :
1 - The fact is that I am under Windows (shame on me :) ), so I have
to copy all themes and js under web/sf/sfPrototypeWindowPlugin/... and
I changed sfPrototypeWindowPlugin/../config.php.

I can't use any themes (except default.css), the dialog appears at the
top, and no images appears normally (not at the right place). Do I
forget something ?

2 - My worst problem is that I have to display a div named "login" (I
just want to do the login example : 
http://prototype-window.xilinus.com/samples.html).

But, using the plugin, I just don't know how to write my code :
I want to do this :


Dialog.confirm($('login').innerHTML, {className:"alphacube", width:
400});

With the plugin :
?php echo link_to_prototype_dialog('S\'identifierPop',???
HERE, 'confirm',  array('className' =>
'default','width'=>'300','height'=>'150')); ?>

Can someone tell me ?


--~--~-~--~~~---~--~~
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: Problems with Behaviour Plugins

2007-07-16 Thread Tristan Rivoallan

On 7/16/07, Hamish Guthrie <[EMAIL PROTECTED]> wrote:
>
> Hi Tristan,
>
> What is really strange to me is that I can use the symfony
> propel-init-admin generator as well as the propel-init-crud without any
> problem, it is just the propel-generate-crud that gives me the issue. I
> am now looking at doing an implementation without the frontend generator
> to see if I can get the plugin to work correctly. I am guessing there is
> just an issue with the propel-generate-crud.

looks like a bug in symfony to me too.

--~--~-~--~~~---~--~~
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] Using database function as stored procedures, view, function

2007-07-16 Thread info

Hi guys,

This is my first post at this very helpful mailing list.

I am interested in using some database view and stored procedures
since most of my queries are very complex and would like to have them
pre-compiled at the database server using stored procs. I also have
some complex queries which result is only one value and I use stored
procedure to get do it. The db views are also important since I have a
html table with 10 columns and almost each of the column has a value
that requires complex SQL and instead of using a view I ended up using
lots of propel doSelects.

Is there somebody with experience using such database features. Both
propel and doctrine example are welcome :)

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: Problems with Behaviour Plugins

2007-07-16 Thread Hamish Guthrie

Hi Tristan,

What is really strange to me is that I can use the symfony 
propel-init-admin generator as well as the propel-init-crud without any 
problem, it is just the propel-generate-crud that gives me the issue. I 
am now looking at doing an implementation without the frontend generator 
to see if I can get the plugin to work correctly. I am guessing there is 
just an issue with the propel-generate-crud.

Regards

Hamish

Tristan Rivoallan wrote:
> On 7/16/07, Hamish Guthrie <[EMAIL PROTECTED]> wrote:
> 
>> I am getting the same problem with ALL propel behavior plugins if I
>> attempt to use the modified model with CRUD generation.
>>
>> Any assistance would be appreciated.
> 
> behavior registration occurs in plugin's config.php you can start from
> there in order to discover why the  file is not executed.
> 
> ++
> tristan
> 
> > 
> 
> 


--~--~-~--~~~---~--~~
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 to turn cache off by action or module

2007-07-16 Thread scube

hi,

In the prod env I turned caching on but for my captcha I cant use this
because it wont reload and show the new code.

so I need to turn off caching for an action or the whole module. i
tried with the cache.yml file in the config folder but didn't
succeded. Can someone show me what to fill in the cache.yml to get it
working?

thanks
patrick


--~--~-~--~~~---~--~~
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: sfPokaYokePlugin release

2007-07-16 Thread Alistair Stead
Hi,

Thanks for the suggestions... it sounds like it would be better suited as a
seperate filter that writes the action.yml file dynamicly based on the
app.yml config.

I would not suggest it is a part of the original plugin rather an additional
option... feel free to look at the plugin source in SVN and see if you can
add a new filter.

regards

Ali

On 16/07/07, Lukas Kahwe Smith <[EMAIL PROTECTED]> wrote:
>
>
> Stefan Koopmanschap wrote:
> > Hi
> >
> > Good news about this new release. Let me hit you with a "feature
> > request". I am helping a client get up-to-speed with the Symfony
> > framework and while looking for his "demands", one of them was
> > centralized validation rules. What this means is an app-wide (or maybe
> > even project-wide) yml file in which he can specify certain validation
> > rules (such as the postal_code ... a field called postal_code will
> > always need to be validated in the same way, so why specify the rules
> > in the module?)
> >
> > Do you think sfPokaYokePlugin could easily be adapted to support this?
> > I've yet to look at the plugin code, but this announcement triggered
> > me to ask about this. If it's not that hard, we may just look at doing
> > the changes ourselves and donate them back to the plugin.
>
> This sounds like it could also be a job for ext/filter, as its sort of a
> parameter firewall you can stick in front of your applications.
>
> regards,
> Lukas
>
> >
>

--~--~-~--~~~---~--~~
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: Problems with Behaviour Plugins

2007-07-16 Thread Tristan Rivoallan

On 7/16/07, Hamish Guthrie <[EMAIL PROTECTED]> wrote:

> I am getting the same problem with ALL propel behavior plugins if I
> attempt to use the modified model with CRUD generation.
>
> Any assistance would be appreciated.

behavior registration occurs in plugin's config.php you can start from
there in order to discover why the  file is not executed.

++
tristan

--~--~-~--~~~---~--~~
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: sfPokaYokePlugin release

2007-07-16 Thread Lukas Kahwe Smith

Stefan Koopmanschap wrote:
> Hi
> 
> Good news about this new release. Let me hit you with a "feature
> request". I am helping a client get up-to-speed with the Symfony
> framework and while looking for his "demands", one of them was
> centralized validation rules. What this means is an app-wide (or maybe
> even project-wide) yml file in which he can specify certain validation
> rules (such as the postal_code ... a field called postal_code will
> always need to be validated in the same way, so why specify the rules
> in the module?)
> 
> Do you think sfPokaYokePlugin could easily be adapted to support this?
> I've yet to look at the plugin code, but this announcement triggered
> me to ask about this. If it's not that hard, we may just look at doing
> the changes ourselves and donate them back to the plugin.

This sounds like it could also be a job for ext/filter, as its sort of a 
parameter firewall you can stick in front of your applications.

regards,
Lukas

--~--~-~--~~~---~--~~
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: sfPokaYokePlugin release

2007-07-16 Thread Stefan Koopmanschap

Hi

Good news about this new release. Let me hit you with a "feature
request". I am helping a client get up-to-speed with the Symfony
framework and while looking for his "demands", one of them was
centralized validation rules. What this means is an app-wide (or maybe
even project-wide) yml file in which he can specify certain validation
rules (such as the postal_code ... a field called postal_code will
always need to be validated in the same way, so why specify the rules
in the module?)

Do you think sfPokaYokePlugin could easily be adapted to support this?
I've yet to look at the plugin code, but this announcement triggered
me to ask about this. If it's not that hard, we may just look at doing
the changes ourselves and donate them back to the plugin.

Sincerely,

Stefan

On Jul 15, 1:37 pm, "Alistair Stead" <[EMAIL PROTECTED]>
wrote:
> I have just released a *new* version of *sfPokaYokePlugin* client side
> validation plugin. It previously  looked for validation rules that matched
> the current module/action as the form was displayed. This required you to
> modify your actions and create form that submitted to the same action or
> duplicate you action_name.yml validation rules for the create and update
> actions created by propel-generate-crud.
> sfPokeYoke has now been greatly updated to identify the action the form
> submits to and look for validation rules that match that action. You can now
> also use named routes i.e. '@sfGuard_signin'.
>
> I have also added a number of configuration options that can be added to
> your app.yml file.
>
> This allows you to define the JavaScript events that will trigger the
> validation and also how the errors will be displayed.
>
> I have updated the plugin documentation on the wiki with all the
> configuration options.
>
> http://trac.symfony-project.com/trac/wiki/sfPokaYokePlugin
>
> sfPokaYoke is now more closely matched the server side validation so much so
> that it should be transparent to the user. It uses the same template hooks
> and also integrates the error_prefix and error_suffix values form the
> settings.yml file.
>
> I would really appreciate your feedback! Please let me know if you have
> problems with the plugin or if you have improvement suggestions.
>
> Thanks
>
> Ali


--~--~-~--~~~---~--~~
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: Problems with Behaviour Plugins

2007-07-16 Thread Hamish Guthrie

Tristan Rivoallan wrote:
> hi,
> 
> On 7/14/07, Hamish Guthrie <[EMAIL PROTECTED]> wrote:
> 
>> [sfConfigurationException]
>> Propel behavior "actasnestedset" is not registered
> 
> what version of the plugin are you using
Hi Tristan,

I am not sure where to find a version number - I used the symfony 
plugin-install 
http://plugins.symfony-project.com/sfPropelActAsNestedSetBehaviorPlugin 
command to install it, and I did that on Saturday, so I would assume the 
latest version.

As for symfony version, I installed the stable version (1.0.5) and and I 
also tried with the trunk from SVN.

I am getting the same problem with ALL propel behavior plugins if I 
attempt to use the modified model with CRUD generation.

Any assistance would be appreciated.

--~--~-~--~~~---~--~~
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: Problems with Behaviour Plugins

2007-07-16 Thread Tristan Rivoallan

hi,

On 7/14/07, Hamish Guthrie <[EMAIL PROTECTED]> wrote:

> [sfConfigurationException]
> Propel behavior "actasnestedset" is not registered

what version of the plugin are you using ?

++
tristan

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---