-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
is_public does not work #13
Comments
This property is used to check if user allowed to create/edit public event/content in a space or not. public function rules()
{
return array(
array('title, start_time, end_time, all_day', 'required'),
...
array('is_public', 'checkVisibility'), //add this array to fix issue
array('all_day, recur, recur_type, recur_interval', 'numerical', 'integerOnly' => true),
...
);
} and add a function for this rule to work in same class /**
* Checks if current user can create public event
*
*/
public function checkVisibility()
{
if (get_class($this->content->container) == 'Space') {
if (!$this->content->container->canShare() && $this->is_public == 1) {
$this->addError('is_public', Yii::t('base', 'You cannot create public visible content for this space!'));
}
}
} There is other way too but will require editing 2 files controller and view file. |
There is a property called like the title of this issue which does not save and... I don´t know what is it for... :)
The text was updated successfully, but these errors were encountered: