Skip to content

Commit 1ae4f0f

Browse files
committed
Merge remote-tracking branch 'remotes/dev/1.10' into 1.10
2 parents 010c538 + b8d7c25 commit 1ae4f0f

File tree

35 files changed

+77
-63
lines changed

35 files changed

+77
-63
lines changed

UPGRADE-1.10.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ UPGRADE FROM 1.9 to 1.10
88
- Oro\Bundle\TestFrameworkBundle\Test\Client::startTransaction method was removed, use one from Oro\Bundle\TestFrameworkBundle\Test\WebTestCase class.
99
- Oro\Bundle\TestFrameworkBundle\Test\Client::rollbackTransaction method was removed, use one from Oro\Bundle\TestFrameworkBundle\Test\WebTestCase class.
1010
- `\Oro\Bundle\TestFrameworkBundle\Fixtures\LoadUserData` is deprecated, use `\Oro\Bundle\TestFrameworkBundle\Migrations\Data\ORM\LoadUserData` instead
11-
- No need to load fixtures after test environment setup using `doctrine:fixture:load`
11+
- No need to load fixtures after test environment setup using `doctrine:fixtures:load`
1212

1313
####EntityBundle
1414
- The implementation of `Oro\Bundle\EntityBundle\ORM\EntityAliasResolver` was changed. Now the loaded entity aliases is saved into a cache that gives significant performance gain. Also, from now, you can implement `Oro\Bundle\EntityBundle\Provider\EntityClassProviderInterface` to create aliases for any entities not only for ORM entities.

src/Oro/Bundle/ActivityBundle/Manager/ActivityManager.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ public function setActivityTargets(ActivityInterface $activityEntity, array $tar
187187
$oldTargetEntities = $activityEntity->getActivityTargetEntities();
188188

189189
foreach ($oldTargetEntities as $oldTargetEntity) {
190-
if (!in_array($oldTargetEntity, $targetEntities)) {
190+
if (!in_array($oldTargetEntity, $targetEntities, true)) {
191191
$this->removeActivityTarget($activityEntity, $oldTargetEntity);
192192
$hasChanges = true;
193193
}

src/Oro/Bundle/CalendarBundle/Resources/config/datagrid.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ datagrid:
173173
data_identifier: event.id
174174
handler: oro_calendar.datagrid.mass_action.handler.delete
175175
options:
176-
entityHint: calendar_events
176+
entityHint: calendar events
177177
entity_pagination: true
178178

179179
widget-base-calendar-event-grid:
@@ -213,7 +213,7 @@ datagrid:
213213
properties:
214214
id: ~
215215
options:
216-
entityHint: calendar_events
216+
entityHint: calendar events
217217

218218
activity-calendar-event-grid:
219219
extends: widget-base-calendar-event-grid
@@ -232,7 +232,7 @@ datagrid:
232232
users-calendar-select-grid-exclude-owner:
233233
acl_resource: oro_user_user_view
234234
options:
235-
entityHint: calendar
235+
entityHint: calendars
236236
source:
237237
type: orm
238238
query:
@@ -391,7 +391,7 @@ datagrid:
391391
icon: trash
392392
link: delete_link
393393
options:
394-
entityHint: calendar_events
394+
entityHint: calendar events
395395
entity_pagination: true
396396

397397
system-calendar-event-grid:
@@ -491,7 +491,7 @@ datagrid:
491491
extended_entity_name: %oro_calendar.calendar_event.entity.class%
492492
acl_resource: oro_calendar_event_view
493493
options:
494-
entityHint: calendar_events
494+
entityHint: calendar events
495495
entity_pagination: true
496496
toolbarOptions:
497497
pageSize:

src/Oro/Bundle/ConfigBundle/Form/Type/FormFieldType.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,7 @@ function (FormEvent $event) {
7474
FormEvents::POST_SUBMIT,
7575
function (FormEvent $event) {
7676
$form = $event->getForm()->getParent();
77-
$data = $event->getForm()->getData();
78-
$disabled = isset($data['use_parent_scope_value']) ? $data['use_parent_scope_value'] : false;
77+
$disabled = $event->getForm()->getData();
7978
FormUtils::replaceField($form, 'value', ['disabled' => $disabled]);
8079
}
8180
);

src/Oro/Bundle/CronBundle/Resources/config/datagrid.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,12 @@ datagrid:
101101
acl_resource: oro_jobs
102102
rowAction: true
103103
options:
104-
entityHint: job
104+
entityHint: jobs
105105

106106
oro-cron-schedules-grid:
107107
acl_resource: oro_cron_schedule_view
108108
options:
109-
entityHint: schedule
109+
entityHint: schedules
110110
source:
111111
type: orm
112112
query:

src/Oro/Bundle/DataAuditBundle/Resources/config/datagrid.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ datagrid:
22
audit-grid:
33
acl_resource: oro_dataaudit_history
44
options:
5-
entityHint: audit
5+
entityHint: audits
66
source:
77
type: orm
88
query:

src/Oro/Bundle/DataGridBundle/Resources/public/js/datagrid/action/delete-mass-action.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,8 @@ define([
135135
this.allowOk = false;
136136
} else if (data.deletable <= data.max_limit) {
137137
if (data.deletable >= data.selected) {
138-
this.confirmMessage = __(this.confirmMessages.selected_message, {selected: data.selected});
138+
var placeholders = {selected: data.selected};
139+
this.confirmMessage = __(this.confirmMessages.selected_message, placeholders, data.selected);
139140
} else {
140141
this.confirmMessage = __(this.confirmMessages.restricted_access_message, {
141142
deletable: data.deletable,

src/Oro/Bundle/DataGridBundle/Resources/public/js/datagrid/cell/multi-select-cell.js

+1
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ define([
6464
'<span class="multiselect-value-wrapper"><span class="value-item">' +
6565
value
6666
.map(function(item) {return choices[item];})
67+
.filter(function(item) {return item;})
6768
.join('</span><span class="value-item">') +
6869
'</span></span>'
6970
) : '';

src/Oro/Bundle/DataGridBundle/Resources/translations/jsmessages.en.yml

+2-4
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"Please select view": "Please select view"
3636
"oro.datagrid.entityHint": "Entity"
3737
"oro.datagrid.no.entities": "No records found"
38-
"oro.datagrid.no.results": "No {{ entityHint }} was found to match your search. Try modifying your search criteria..."
38+
"oro.datagrid.no.results": "No {{ entityHint }} were found to match your search. Try modifying your search criteria..."
3939
"oro.datagrid.no.columns": "No columns configured for this grid"
4040
"oro.datagrid.pagination.label": "Page"
4141
"oro.datagrid.pagination.totalPages": "of {{ totalPages }}"
@@ -106,9 +106,7 @@ oro:
106106
mass_action:
107107
title: Mass Actions
108108
delete:
109-
selected_message: >
110-
You have selected {{ selected }} records.<br/>
111-
Are you sure you want to delete them?
109+
selected_message: You have selected {{ selected }} record.<br/> Are you sure you want to delete it?|You have selected {{ selected }} records.<br/> Are you sure you want to delete them?
112110
max_limit_message: >
113111
The maximum number of records that can be deleted at once is {{ max_limit }}.<br/>
114112
Are you sure you want to delete first {{ max_limit }} records in the selection?

src/Oro/Bundle/DataGridBundle/Resources/translations/messages.en.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"Item deleted": "Item deleted"
22
oro_datagrid:
33
no_data_hint %entityHint%: "No %entityHint% exists."
4-
not_found_hint %entityHint%: "No %entityHint% was found to match your search. Try modifying your search criteria ..."
4+
not_found_hint %entityHint%: "No %entityHint% were found to match your search. Try modifying your search criteria ..."
55
label_add_filter: Manage filters
66
label_loading_mask: "Loading . . ."
77
oro:

src/Oro/Bundle/EmailBundle/Mailer/Processor.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ public function processSend($message, $emailOrigin)
212212
}
213213
$messageId = $message->getId();
214214
if (!$this->mailer->send($message)) {
215-
throw new \Swift_SwiftException('An email was not delivered.');
215+
throw new \Swift_SwiftException('The email was not delivered.');
216216
}
217217

218218
/**

src/Oro/Bundle/EmailBundle/Resources/config/datagrid.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ datagrid:
192192
mailbox: { data_name: eu.origin }
193193
default: { receivedAt: %oro_datagrid.extension.orm_sorter.class%::DIRECTION_DESC }
194194
options:
195-
entityHint: email
195+
entityHint: emails
196196

197197
simplified-email-grid:
198198
extends: base-email-grid
@@ -346,7 +346,7 @@ datagrid:
346346
className: 'email-row-is-readed'
347347
callable: "@oro_email.helper.datagrid.emails->getReadedRowClosure"
348348
options:
349-
entityHint: email
349+
entityHint: emails
350350
toolbarOptions:
351351
hide: true
352352
pagination:
@@ -553,7 +553,7 @@ datagrid:
553553
entity_pagination: true
554554
action_configuration: "@oro_email.emailtemplate.datagrid_helper->getActionConfigurationClosure"
555555
views_list : "@oro_email.emailtemplate.datagrid_view_list"
556-
options: { entityHint: email template }
556+
options: { entityHint: email templates }
557557

558558
base-mailboxes-grid:
559559
source:
@@ -621,7 +621,7 @@ datagrid:
621621
email-for-context-grid:
622622
extends: email-grid
623623
options:
624-
entityHint: email
624+
entityHint: emails
625625
entity_pagination: true
626626
toolbarOptions:
627627
pageSize:

src/Oro/Bundle/EmailBundle/Tests/Unit/Mailer/ProcessorTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ public function invalidModelDataProvider()
173173

174174
/**
175175
* @expectedException \Swift_SwiftException
176-
* @expectedExceptionMessage An email was not delivered.
176+
* @expectedExceptionMessage The email was not delivered.
177177
*/
178178
public function testProcessSendFailException()
179179
{

src/Oro/Bundle/EmbeddedFormBundle/Resources/config/datagrid.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,5 +71,5 @@ datagrid:
7171
icon: trash
7272
link: delete_link
7373
options:
74-
entityHint: embedded form
74+
entityHint: embedded forms
7575
entity_pagination: true

src/Oro/Bundle/EntityBundle/Resources/config/datagrid.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ datagrid:
33
acl_resource: ~
44
options:
55
base_datagrid_class: Oro\Bundle\EntityBundle\Grid\CustomEntityDatagrid
6-
entityHint: entity
6+
entityHint: entities
77
export: true
88
entity_pagination: true
99
source:
@@ -63,7 +63,7 @@ datagrid:
6363
entity-relation-grid:
6464
acl_resource: ~
6565
options:
66-
entityHint: entity
66+
entityHint: entities
6767
routerEnabled: false
6868
rowSelection:
6969
dataField: id

src/Oro/Bundle/EntityConfigBundle/Resources/config/datagrid.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ datagrid:
22
# Entity config entities grid
33
entityconfig-grid:
44
options:
5-
entityHint: entity
5+
entityHint: entities
66
toolbarOptions:
77
pageSize:
88
default_per_page: 100
@@ -130,7 +130,7 @@ datagrid:
130130
# Audit entity log grid
131131
entity-audit-grid:
132132
options:
133-
entityHint: history
133+
entityHint: histories
134134
acl_resource: oro_entityconfig_manage
135135
source:
136136
type: orm

src/Oro/Bundle/EntityExtendBundle/Resources/config/validation.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Oro\Bundle\EntityConfigBundle\Entity\EntityConfigModel:
3131
className:
3232
- NotBlank: ~
3333
- Regex:
34-
pattern: "/^[a-z]+[a-z0-9]*$/i"
34+
pattern: "/^([0-9]+[a-zA-Z]+|[a-zA-Z]+)[0-9a-zA-Z]*$/i"
3535
message: "This value should contain only alphabetic symbols and numbers."
3636
- oro_entity_extend:NotSqlKeyword: {groups: Sql}
3737
- oro_entity_extend:NotPhpKeyword: {groups: Php}

src/Oro/Bundle/FilterBundle/Resources/public/js/filter/choice-filter.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,10 @@ define([
114114
var selectedChoiceLabel = '';
115115
if (!_.isEmpty(this.choices)) {
116116
var foundChoice = _.find(this.choices, function(choice) {
117-
return (choice.value === value.type);
117+
return String(choice.value) === String(value.type);
118118
});
119-
selectedChoiceLabel = foundChoice.label;
119+
foundChoice = foundChoice || _.first(this.choices);
120+
selectedChoiceLabel = _.result(foundChoice, 'label') || '';
120121
}
121122
var $filter = $(this.template({
122123
name: this.name,

src/Oro/Bundle/FormBundle/Form/Type/OroEncodedPasswordType.php

+3
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ public function setDefaultOptions(OptionsResolverInterface $resolver)
6868

6969
$resolver->setDefaults([
7070
'encode' => true,
71+
'attr' => [
72+
'autocomplete' => 'new-password'
73+
]
7174
]);
7275
}
7376

src/Oro/Bundle/FormBundle/Resources/public/js/app/components/select2-autocomplete-component.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,13 @@ define(function(require) {
4343

4444
makeItemTemplate: function(propName, forSelection) {
4545
var labelTpl = '_.escape(' + propName + ')';
46+
var newLabel = __('oro.form.add_new');
4647
if (forSelection) {
4748
labelTpl = 'highlight(' + labelTpl + ')';
49+
newLabel = __('oro.form.new');
4850
}
4951
return '<%= ' + labelTpl + ' %><% if (id === null) { %>' +
50-
'<span class="select2__result-entry-info"> (' + __('oro.form.add_new') + ') </span><% } %>';
52+
'<span class="select2__result-entry-info"> (' + newLabel + ') </span><% } %>';
5153
}
5254
});
5355

Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<%= _.escape(fullName) %><% if (id === null) { %>
22
<span class="select2__result-entry-info">
3-
(<%= _.__('oro.form.add_new') %>)
3+
(<%= _.__('oro.form.new') %>)
44
</span>
55
<% } %>

src/Oro/Bundle/ImapBundle/Form/Type/ConfigurationType.php

+6-2
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,12 @@ public function buildForm(FormBuilderInterface $builder, array $options)
124124
'tooltip' => 'oro.imap.configuration.tooltip',
125125
])
126126
->add('password', 'password', [
127-
'label' => 'oro.imap.configuration.password.label', 'required' => true,
128-
'attr' => ['class' => 'check-connection']
127+
'label' => 'oro.imap.configuration.password.label',
128+
'required' => true,
129+
'attr' => [
130+
'class' => 'check-connection',
131+
'autocomplete' => 'new-password'
132+
]
129133
]);
130134
if ($options['add_check_button']) {
131135
$builder->add('check_connection', 'oro_imap_configuration_check', [

src/Oro/Bundle/IntegrationBundle/Resources/config/datagrid.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ datagrid:
114114
success: oro.integration.delete_sync_integration_window.success
115115
action_configuration: Oro\Bundle\IntegrationBundle\Datagrid\ActionConfiguration::getIsSyncAvailableCondition()
116116
options:
117-
entityHint: channel
117+
entityHint: channels
118118
entity_pagination: true
119119
mass_actions:
120120
delete:

src/Oro/Bundle/LocaleBundle/Resources/config/datagrid.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ datagrid:
22
base-oro-locale-localizations-grid:
33
acl_resource: oro_locale_localization_view
44
options:
5-
entityHint: localization
5+
entityHint: localizations
66
source:
77
type: orm
88
query:

src/Oro/Bundle/NotificationBundle/Resources/config/datagrid.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ datagrid:
8585

8686
email-notification-grid:
8787
options:
88-
entityHint: transactional email
88+
entityHint: transactional emails
8989
entity_pagination: true
9090
acl_resource: oro_notification_emailnotification_view
9191
source:

src/Oro/Bundle/NotificationBundle/Resources/translations/messages.en.yml

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ oro:
1414

1515
form:
1616
choose_event: Choose an event...
17+
recipient_list:
18+
empty: At least one Recipient must be specified.
1719

1820
datagrid:
1921
action:

src/Oro/Bundle/NotificationBundle/Resources/views/EmailNotification/update.html.twig

+1
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@
8181
'subblocks': [{
8282
'title': '',
8383
'data': [
84+
UI.renderHtmlProperty('', '* ' ~ 'oro.notification.form.recipient_list.empty'|trans),
8485
form_widget(form.children.recipientList),
8586
]
8687
}]

src/Oro/Bundle/OrganizationBundle/Resources/config/datagrid.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ datagrid:
22
business-unit-grid:
33
extended_entity_name: %oro_organization.business_unit.entity.class%
44
options:
5-
entityHint: business unit
5+
entityHint: business units
66
entity_pagination: true
77
source:
88
type: orm
@@ -184,7 +184,7 @@ datagrid:
184184
lastName: %oro_datagrid.extension.orm_sorter.class%::DIRECTION_ASC
185185

186186
options:
187-
entityHint: user
187+
entityHint: users
188188
rowSelection:
189189
dataField: id
190190
columnName: hasCurrentBusinessUnit
@@ -195,7 +195,7 @@ datagrid:
195195
bu-view-users-grid:
196196
extends: user-relation-grid
197197
options:
198-
entityHint: user
198+
entityHint: users
199199
acl_resource: oro_business_unit_view
200200
source:
201201
query:

src/Oro/Bundle/ReportBundle/Resources/config/datagrid.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,4 +93,4 @@ datagrid:
9393
launcherOptions:
9494
className: 'no-hash mobile-hide'
9595
options:
96-
entityHint: report
96+
entityHint: reports

src/Oro/Bundle/SegmentBundle/Resources/config/datagrid.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,4 +101,4 @@ datagrid:
101101
launcherOptions:
102102
className: 'no-hash mobile-hide'
103103
options:
104-
entityHint: segment
104+
entityHint: segments

0 commit comments

Comments
 (0)