Skip to content
This repository has been archived by the owner on Sep 13, 2024. It is now read-only.

Commit

Permalink
Moved repeats events to pre save and pre delete actions (#17138)
Browse files Browse the repository at this point in the history
* Moved repeats events to pre save and pre delete actions
  • Loading branch information
konadrian authored Jun 23, 2023
1 parent d5cf611 commit 0a1e922
Show file tree
Hide file tree
Showing 22 changed files with 433 additions and 256 deletions.
3 changes: 3 additions & 0 deletions install/install_schema/data.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3574,6 +3574,9 @@ insert into `vtiger_eventhandlers`(`eventhandler_id`,`event_name`,`handler_clas
insert into `vtiger_eventhandlers`(`eventhandler_id`,`event_name`,`handler_class`,`is_active`,`include_modules`,`exclude_modules`,`priority`,`owner_id`,`privileges`) values (106,'EditViewPreSave','Reservations_DuplicateChecker_Handler',1,'Reservations','',5,84,1);
insert into `vtiger_eventhandlers`(`eventhandler_id`,`event_name`,`handler_class`,`is_active`,`include_modules`,`exclude_modules`,`priority`,`owner_id`,`privileges`) values (107,'EntityAfterLinkForSource','ModTracker_ModTrackerHandler_Handler',1,'','',8,32,0);
insert into `vtiger_eventhandlers`(`eventhandler_id`,`event_name`,`handler_class`,`is_active`,`include_modules`,`exclude_modules`,`priority`,`owner_id`,`privileges`) values (108,'EntityAfterUnLinkForSource','ModTracker_ModTrackerHandler_Handler',1,'','',8,32,0);
insert into `vtiger_eventhandlers`(`eventhandler_id`,`event_name`,`handler_class`,`is_active`,`include_modules`,`exclude_modules`,`priority`,`owner_id`,`privileges`) values (109,'EditViewPreSave','Calendar_RepeatEvents_Handler',1,'Calendar','',5,9,1);
insert into `vtiger_eventhandlers`(`eventhandler_id`,`event_name`,`handler_class`,`is_active`,`include_modules`,`exclude_modules`,`priority`,`owner_id`,`privileges`) values (110,'PreDelete','Calendar_RepeatEvents_Handler',1,'Calendar','',5,9,1);
insert into `vtiger_eventhandlers`(`eventhandler_id`,`event_name`,`handler_class`,`is_active`,`include_modules`,`exclude_modules`,`priority`,`owner_id`,`privileges`) values (111,'PreStateChange','Calendar_RepeatEvents_Handler',1,'Calendar','',5,9,1);

/*Data for the table `vtiger_expectedresponse` */

Expand Down
2 changes: 1 addition & 1 deletion install/install_schema/scheme.sql
Original file line number Diff line number Diff line change
Expand Up @@ -6394,7 +6394,7 @@ CREATE TABLE `vtiger_eventhandlers` (
`privileges` tinyint(1) DEFAULT 1,
PRIMARY KEY (`eventhandler_id`),
KEY `event_name_class` (`event_name`,`handler_class`)
) ENGINE=InnoDB AUTO_INCREMENT=109 DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=112 DEFAULT CHARSET=utf8;

/*Table structure for table `vtiger_expectedresponse` */

Expand Down
37 changes: 37 additions & 0 deletions layouts/basic/modules/Calendar/Modals/RepeatEvents.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{*<!-- {[The file is published on the basis of YetiForce Public License 5.0 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} -->*}
{strip}
<!-- tpl-Calendar-RepeatEvents -->
<div class="modal-body">
<div class="col-12 px-0 mb-3 form-row m-0">
<div class="col-12 col-lg-4 px-0">
<button class="btn btn-primary btn-sm js-repeat-events-mode" data-value="2">
{App\Language::translate('LBL_UPDATE_THIS_EVENT', $MODULE_NAME)}
</button>
</div>
<div class="col-12 col-lg-8 px-0">
{App\Language::translate('LBL_UPDATE_THIS_EVENT_DESCRIPTION', $MODULE_NAME)}
</div>
</div>
<div class="col-12 px-0 mb-3 form-row m-0">
<div class="col-12 col-lg-4 px-0">
<button class="btn btn-primary btn-sm js-repeat-events-mode" data-value="3">
{App\Language::translate('LBL_UPDATE_FUTURE_EVENTS', $MODULE_NAME)}
</button>
</div>
<div class="col-12 col-lg-8 px-0">
{App\Language::translate('LBL_UPDATE_FUTURE_EVENTS_DESCRIPTION', $MODULE_NAME)}
</div>
</div>
<div class="col-12 px-0 mb-3 form-row m-0">
<div class="col-12 col-lg-4 px-0">
<button class="btn btn-primary btn-sm js-repeat-events-mode" type="button" data-value="1">
{App\Language::translate('LBL_UPDATE_ALL_EVENTS', $MODULE_NAME)}
</button>
</div>
<div class="col-12 col-lg-8 px-0">
{App\Language::translate('LBL_UPDATE_ALL_EVENTS_DESCRIPTION', $MODULE_NAME)}
</div>
</div>
</div>
<!-- /tpl-Calendar-RepeatEvents -->
{/strip}
38 changes: 38 additions & 0 deletions layouts/basic/modules/Calendar/Modals/RepeatEventsDelete.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{*<!-- {[The file is published on the basis of YetiForce Public License 5.0 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} -->*}
{strip}
<!-- tpl-Calendar-RepeatEventsDelete -->
<div class="modal-body">
<input name="delete-url" type="hidden" data-url="{$DELETE_URL}">
<div class="col-12 px-0 mb-3 form-row m-0">
<div class="col-12 col-lg-4 px-0">
<button class="btn btn-primary btn-sm js-repeat-events-mode" data-value="2">
{App\Language::translate('LBL_DELETE_THIS_EVENT', $MODULE_NAME)}
</button>
</div>
<div class="col-12 col-lg-8 px-0">
{App\Language::translate('LBL_DELETE_THIS_EVENT_DESCRIPTION', $MODULE_NAME)}
</div>
</div>
<div class="col-12 px-0 mb-3 form-row m-0">
<div class="col-12 col-lg-4 px-0">
<button class="btn btn-primary btn-sm js-repeat-events-mode" data-value="3">
{App\Language::translate('LBL_DELETE_FUTURE_EVENTS', $MODULE_NAME)}
</button>
</div>
<div class="col-12 col-lg-8 px-0">
{App\Language::translate('LBL_DELETE_FUTURE_EVENTS_DESCRIPTION', $MODULE_NAME)}
</div>
</div>
<div class="col-12 px-0 mb-3 form-row m-0">
<div class="col-12 col-lg-4 px-0">
<button class="btn btn-primary btn-sm js-repeat-events-mode" type="button" data-value="1">
{App\Language::translate('LBL_DELETE_ALL_EVENTS', $MODULE_NAME)}
</button>
</div>
<div class="col-12 col-lg-8 px-0">
{App\Language::translate('LBL_DELETE_ALL_EVENTS_DESCRIPTION', $MODULE_NAME)}
</div>
</div>
</div>
<!-- /tpl-Calendar-RepeatEventsDelete -->
{/strip}
64 changes: 0 additions & 64 deletions layouts/basic/modules/Vtiger/Detail/Field/Recurrence.tpl

This file was deleted.

Loading

0 comments on commit 0a1e922

Please sign in to comment.