Skip to content

Commit

Permalink
Merge pull request mautic#7978 from kuzmany/fix-preferences-center-order
Browse files Browse the repository at this point in the history
Fix preferences center segments ordering
  • Loading branch information
dennisameling authored Mar 19, 2020
2 parents 16b47b7 + 8274b0b commit 1dc0f05
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
12 changes: 6 additions & 6 deletions app/bundles/CoreBundle/Views/Slots/segmentlist.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
<label class="control-label"><?php echo isset($label_text) ? $label_text : $view['translator']->trans('mautic.lead.form.list'); ?></label>
</div>
<?php
$segmentNumber = count($form['lead_lists']->vars['choices']);
for ($i = ($segmentNumber - 1); $i >= 0; --$i) : ?>
<div id="segment-<?php echo $i; ?>" class="text-left">
<?php echo $view['form']->widget($form['lead_lists'][$i]); ?>
<?php echo $view['form']->label($form['lead_lists'][$i]); ?>
foreach ($form['lead_lists'] as $key => $leadList) {
?>
<div id="segment-<?php echo $key; ?>" class="text-left">
<?php echo $view['form']->widget($leadList); ?>
<?php echo $view['form']->label($leadList); ?>
</div>
<?php
endfor;
}
unset($form['lead_lists']);
?>
</div>
Expand Down
13 changes: 7 additions & 6 deletions app/bundles/EmailBundle/Views/Lead/preference_options.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,15 @@ function togglePreferredChannel(channel){
<hr />
<div id="contact-segments"> <div class="text-left"><?php echo $view['form']->label($form['lead_lists']); ?></div>
<?php
$segmentNumber = count($form['lead_lists']->vars['choices']);
for ($i = ($segmentNumber - 1); $i >= 0; --$i): ?>
<div id="segment-<?php echo $i; ?>" class="text-left">
<?php echo $view['form']->widget($form['lead_lists'][$i]); ?>
<?php echo $view['form']->label($form['lead_lists'][$i]); ?>
foreach ($form['lead_lists'] as $key=>$leadList) {
?>
<div id="segment-<?php echo $key; ?>" class="text-left">
<?php echo $view['form']->widget($leadList); ?>
<?php echo $view['form']->label($leadList); ?>
</div>
<?php
endfor;
}

unset($form['lead_lists']);
?>
</div>
Expand Down

0 comments on commit 1dc0f05

Please sign in to comment.