Version 5.0.14

This commit is contained in:
Neo committed 2025-12-19 19:17:57 -08:00
1 parent 5efe744c5f
commit dbd774b30c
364 files changed
+7048 -1377

No files matched your search

@@ -145,7 +145,9 @@ class Calendar extends Model implements Permissions
'calendar_bitoptions' => array(
'calendar_bitoptions' => array(
'bw_disable_tagging' => 1,
'bw_disable_prefixes' => 2
'bw_disable_prefixes' => 2,
'bw_disable_recurring' => 4,
'bw_hide_overview' => 8
)
)
);
@@ -239,6 +241,8 @@ class Calendar extends Model implements Permissions
$form->add( new YesNo( 'cal_allow_reviews', $this->id ? $this->allow_reviews : FALSE, FALSE, array( 'togglesOn' => array( 'cal_review_moderate' ) ) ) );
$form->add( new YesNo( 'cal_review_moderate', $this->id ? $this->review_moderate : FALSE, FALSE, array(), NULL, NULL, NULL, 'cal_review_moderate' ) );
$form->add( new YesNo( 'cal_allow_anonymous', $this->id ? $this->allow_anonymous : FALSE, FALSE, array(), NULL, NULL, NULL, 'cal_allow_anonymous' ) );
$form->add( new YesNo( 'cal_allow_recurring', $this->id ? !$this->calendar_bitoptions['bw_disable_recurring'] : true, false ) );
$form->add( new YesNo( 'cal_show_overview', $this->id ? !$this->calendar_bitoptions['bw_hide_overview'] : true, false ) );
parent::form( $form );
}
@@ -264,6 +268,13 @@ class Calendar extends Model implements Permissions
unset( $values['cal_title'] );
}
/* These are reversed because we want to default to previous behavior, which means that the bit options would be turned OFF.
However, to the end-user it makes more sense to disable it as opposed to enable */
$values['calendar_bitoptions']['bw_disable_recurring'] = !$values['cal_allow_recurring'];
$values['calendar_bitoptions']['bw_hide_overview'] = !$values['cal_show_overview'];
unset( $values['cal_allow_recurring'] );
unset( $values['cal_show_overview'] );
return $values;
}