Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
Core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
927
Issues
927
List
Boards
Labels
Service Desk
Milestones
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Development
Core
Commits
f7083334
Commit
f7083334
authored
Aug 06, 2020
by
Andrew Hunt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Give buttons a value when the submitted value is used to identify them
parent
98da7d67
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
23 additions
and
3 deletions
+23
-3
CRM/Admin/Form/Preferences/Display.php
CRM/Admin/Form/Preferences/Display.php
+4
-1
CRM/Batch/Form/Entry.php
CRM/Batch/Form/Entry.php
+4
-1
CRM/Contact/Form/Task/AddToParentClass.php
CRM/Contact/Form/Task/AddToParentClass.php
+1
-0
CRM/Core/BAO/Mapping.php
CRM/Core/BAO/Mapping.php
+2
-0
CRM/Core/Form.php
CRM/Core/Form.php
+7
-0
CRM/Event/Form/ManageEvent/Fee.php
CRM/Event/Form/ManageEvent/Fee.php
+1
-0
CRM/Profile/Form/Edit.php
CRM/Profile/Form/Edit.php
+4
-1
No files found.
CRM/Admin/Form/Preferences/Display.php
View file @
f7083334
...
...
@@ -54,7 +54,10 @@ class CRM_Admin_Form_Preferences_Display extends CRM_Admin_Form_Preferences {
'xbutton'
,
'ckeditor_config'
,
CRM_Core_Page
::
crmIcon
(
'fa-wrench'
)
.
' '
.
ts
(
'Configure CKEditor'
),
[
'type'
=>
'submit'
]
[
'type'
=>
'submit'
,
'value'
=>
1
,
]
);
$editOptions
=
CRM_Core_OptionGroup
::
values
(
'contact_edit_options'
,
FALSE
,
FALSE
,
FALSE
,
'AND v.filter = 0'
);
...
...
CRM/Batch/Form/Entry.php
View file @
f7083334
...
...
@@ -176,7 +176,10 @@ class CRM_Batch_Form_Entry extends CRM_Core_Form {
$this
->
addElement
(
'xbutton'
,
$forceSave
,
ts
(
'Ignore Mismatch & Process the Batch?'
),
[
'type'
=>
'submit'
]
[
'type'
=>
'submit'
,
'value'
=>
1
,
]
);
$this
->
addButtons
([
...
...
CRM/Contact/Form/Task/AddToParentClass.php
View file @
f7083334
...
...
@@ -68,6 +68,7 @@ class CRM_Contact_Form_Task_AddToParentClass extends CRM_Contact_Form_Task {
$buttonAttrs
=
[
'type'
=>
'submit'
,
'class'
=>
'crm-form-submit'
,
'value'
=>
1
,
];
$this
->
addElement
(
'xbutton'
,
$this
->
getButtonName
(
'refresh'
),
ts
(
'Search'
),
$buttonAttrs
);
$this
->
addElement
(
'xbutton'
,
$this
->
getButtonName
(
'cancel'
),
ts
(
'Cancel'
),
$buttonAttrs
);
...
...
CRM/Core/BAO/Mapping.php
View file @
f7083334
...
...
@@ -322,6 +322,7 @@ class CRM_Core_BAO_Mapping extends CRM_Core_DAO_Mapping {
[
'type'
=>
'submit'
,
'class'
=>
'submit-link'
,
'value'
=>
1
,
]
);
...
...
@@ -559,6 +560,7 @@ class CRM_Core_BAO_Mapping extends CRM_Core_DAO_Mapping {
$form
->
addElement
(
'xbutton'
,
"addMore[
$x
]"
,
ts
(
'Another search field'
),
[
'type'
=>
'submit'
,
'class'
=>
'submit-link'
,
'value'
=>
1
,
]);
}
//end of block for
...
...
CRM/Core/Form.php
View file @
f7083334
...
...
@@ -668,6 +668,13 @@ class CRM_Core_Form extends HTML_QuickForm_Page {
$attrs
=
[
'class'
=>
'crm-form-submit'
]
+
(
array
)
CRM_Utils_Array
::
value
(
'js'
,
$button
);
// A lot of forms use the hacky method of looking at
// `$params['button name']` (dating back to them being inputs with a
// "value" of the button label) rather than looking at
// `$this->controller->getButtonName()`. It makes sense to give buttons a
// value by default as a precaution.
$attrs
[
'value'
]
=
1
;
if
(
!
empty
(
$button
[
'class'
]))
{
$attrs
[
'class'
]
.
=
' '
.
$button
[
'class'
];
}
...
...
CRM/Event/Form/ManageEvent/Fee.php
View file @
f7083334
...
...
@@ -359,6 +359,7 @@ class CRM_Event_Form_ManageEvent_Fee extends CRM_Event_Form_ManageEvent {
[
'type'
=>
'submit'
,
'class'
=>
'crm-form-submit cancel'
,
'value'
=>
1
,
]
);
if
(
Civi
::
settings
()
->
get
(
'deferred_revenue_enabled'
))
{
...
...
CRM/Profile/Form/Edit.php
View file @
f7083334
...
...
@@ -209,7 +209,10 @@ SELECT module,is_reserved
if
((
$this
->
_multiRecord
&
CRM_Core_Action
::
DELETE
)
&&
$this
->
_recordExists
)
{
$this
->
_deleteButtonName
=
$this
->
getButtonName
(
'upload'
,
'delete'
);
$this
->
addElement
(
'xbutton'
,
$this
->
_deleteButtonName
,
ts
(
'Delete'
),
[
'type'
=>
'submit'
]);
$this
->
addElement
(
'xbutton'
,
$this
->
_deleteButtonName
,
ts
(
'Delete'
),
[
'type'
=>
'submit'
,
'value'
=>
1
,
]);
return
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment