No, following is the add.ctp:
echo $this->Form->input('name');
$Selected =0;
if($role != 'admin' && $role != 'prog-admin')
{
$Selected = $this->resortId;
}
echo $this->Form->input('user_id', ['title'=>'Promotion Resort/Program','options' => $resorts, 'selected'=>$Selected]);
echo $this->Form->input('start_date');
echo $this->Form->input('end_date');
echo $this->Form->input('passes_allowed');
echo 'Use Shift and/or Control to select as many dealers as needed.';
echo $this->Form->input('users._ids', ['title'=>'Associated Dealers','options' => $dealers]);
On Thu, Sep 4, 2014 at 4:20 AM, José Lorenzo <jose.zap@gmail.com> wrote:
Are you creating the second control with javascript?
On Wednesday, September 3, 2014 11:09:19 PM UTC+2, heavyKevy wrote:I have promotions owned by a userand associated with other users.The Add screen gives a Select control for selecting the owner and a multi-select for selecting the associated users.In PromotionsTable::public function initialize(array $config) {$this->table('promotions');$this->displayField('name');$this->primaryKey('id');$this->belongsTo('Users', ['foreignKey' => 'user_id',]);$this->belongsToMany('Users', ['foreignKey' => 'promotion_id','targetForeignKey' => 'user_id','joinTable' => 'promotions_users',]);}Data saves fine if the security component is not loaded...black holes the request otherwise...Is this a bug or is this by design?--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to a topic in the Google Groups "CakePHP" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cake-php/yVBlSRaGTGI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment