Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
civirules
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ayduns
civirules
Commits
40860f6c
Commit
40860f6c
authored
9 years ago
by
jaapjansma
Browse files
Options
Downloads
Patches
Plain Diff
added are you sure to delete screen for deletions of rules
parent
8908e593
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CRM/Civirules/Form/Rule.php
+7
-5
7 additions, 5 deletions
CRM/Civirules/Form/Rule.php
templates/CRM/Civirules/Form/Rule.tpl
+13
-5
13 additions, 5 deletions
templates/CRM/Civirules/Form/Rule.tpl
with
20 additions
and
10 deletions
CRM/Civirules/Form/Rule.php
+
7
−
5
View file @
40860f6c
...
...
@@ -70,13 +70,11 @@ class CRM_Civirules_Form_Rule extends CRM_Core_Form {
$ruleActionAddUrl
=
CRM_Utils_System
::
url
(
'civicrm/civirule/form/rule_action'
,
'reset=1&action=add&rid='
.
$this
->
ruleId
,
TRUE
);
$this
->
assign
(
'ruleConditionAddUrl'
,
$ruleConditionAddUrl
);
$this
->
assign
(
'ruleActionAddUrl'
,
$ruleActionAddUrl
);
$this
->
assign
(
'action'
,
$this
->
_action
);
$this
->
assign
(
'rule'
,
$this
->
rule
);
$session
=
CRM_Core_Session
::
singleton
();
switch
(
$this
->
_action
)
{
case
CRM_Core_Action
::
DELETE
:
CRM_Civirules_BAO_Rule
::
deleteWithId
(
$this
->
ruleId
);
$session
->
setStatus
(
'CiviRule deleted'
,
'Delete'
,
'success'
);
CRM_Utils_System
::
redirect
(
$session
->
readUserContext
());
break
;
case
CRM_Core_Action
::
DISABLE
:
CRM_Civirules_BAO_Rule
::
disable
(
$this
->
ruleId
);
$session
->
setStatus
(
'CiviRule disabled'
,
'Disable'
,
'success'
);
...
...
@@ -107,6 +105,10 @@ class CRM_Civirules_Form_Rule extends CRM_Core_Form {
if
(
$this
->
_action
==
CRM_Core_Action
::
ADD
||
$this
->
_action
==
CRM_Core_Action
::
UPDATE
)
{
$editUrl
=
CRM_Utils_System
::
url
(
'civicrm/civirule/form/rule'
,
'action=update&id='
.
$this
->
ruleId
,
TRUE
);
$session
->
pushUserContext
(
$editUrl
);
}
elseif
(
$this
->
_action
==
CRM_Core_Action
::
DELETE
)
{
CRM_Civirules_BAO_Rule
::
deleteWithId
(
$this
->
ruleId
);
$session
->
setStatus
(
'CiviRule deleted'
,
'Delete'
,
'success'
);
CRM_Utils_System
::
redirect
(
$session
->
readUserContext
());
}
if
(
isset
(
$this
->
_submitValues
[
'rule_event_select'
]))
{
...
...
This diff is collapsed.
Click to expand it.
templates/CRM/Civirules/Form/Rule.tpl
+
13
−
5
View file @
40860f6c
...
...
@@ -2,11 +2,19 @@
{
include
file
=
"CRM/common/formButtons.tpl"
location
=
"top"
}
</div>
{
include
file
=
"CRM/Civirules/Form/RuleBlocks/RuleBlock.tpl"
}
{
include
file
=
"CRM/Civirules/Form/RuleBlocks/EventBlock.tpl"
}
{
if
$action
ne
1
}
{
include
file
=
"CRM/Civirules/Form/RuleBlocks/ConditionBlock.tpl"
}
{
include
file
=
"CRM/Civirules/Form/RuleBlocks/ActionBlock.tpl"
}
{
if
$action
eq
8
}
{* Are you sure to delete form *}
<h3>
{
ts
}
Delete rule
{/
ts
}
</h3>
<div
class=
"crm-block crm-form-block crm-civirule-rule_label-block"
>
<div
class=
"crm-section"
>
{
ts
1
=
$rule
->
label
}
Are you sure to delete rule '%1'?
{/
ts
}
</div>
</div>
{
else
}
{
include
file
=
"CRM/Civirules/Form/RuleBlocks/RuleBlock.tpl"
}
{
include
file
=
"CRM/Civirules/Form/RuleBlocks/EventBlock.tpl"
}
{
if
$action
ne
1
}
{
include
file
=
"CRM/Civirules/Form/RuleBlocks/ConditionBlock.tpl"
}
{
include
file
=
"CRM/Civirules/Form/RuleBlocks/ActionBlock.tpl"
}
{/
if
}
{/
if
}
<div
class=
"crm-submit-buttons"
>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment