Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion main/inc/lib/pear/HTML/QuickForm/advmultiselect.php
Original file line number Diff line number Diff line change
Expand Up @@ -773,6 +773,14 @@ public function toHtml()
$leftAll = "<br /><br /><button $attrStrAdd /> <em class='fa fa-backward'></em></button>";
}

$strHtmlAdd = "<div class='d-flex justify-content-center align-items-center' style='height: 100%; padding-top: 100px;'>
<button $attrStrAdd><em class='fa fa-arrow-right'></em></button>
</div>";

$strHtmlRemove = "<div class='d-flex justify-content-center align-items-center' style='padding-top: 10px;'>
<button $attrStrRemove><em class='fa fa-arrow-left'></em></button>
</div>";

// build the select all button with all its attributes
$strHtmlAll = '';

Expand Down Expand Up @@ -925,7 +933,7 @@ public function getElementJs($raw = true, $min = true)
left: \''.$search.'\',
right: \''.$search.'\'
},
fireSearch: function(value) {
fireSearch: function(value) {
return value.length > 2;
}
});
Expand Down
15 changes: 15 additions & 0 deletions main/inc/lib/pear/HTML/QuickForm/select.php
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,21 @@ public function getTemplate($layout)
</div>';
break;
case FormValidator::LAYOUT_HORIZONTAL:
if ($this instanceof HTML_QuickForm_advmultiselect) {
return '
<div class="form-group {error_class}">
<label {label-for} class="col-sm-'.$size[0].' control-label {extra_label_class}">
<!-- BEGIN required --><span class="form_required">*</span><!-- END required -->
{label}
</label>
<div class="col-sm-'.$size[1].'">
{icon}
{element}
<!-- BEGIN error --><span class="help-inline help-block">{error}</span><!-- END error -->
</div>
</div>';
}

return '
<div class="form-group {error_class}">
<label {label-for} class="col-sm-'.$size[0].' control-label {extra_label_class}" >
Expand Down
15 changes: 13 additions & 2 deletions main/lp/lp_subscribe_users.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,15 @@
$userMultiSelect = $formUsers->addElement(
'advmultiselect',
'users',
get_lang('Users'),
null,
$choices
);

$userMultiSelect->setLabel([
get_lang('Users'),
get_lang('NotSubscribed'),
get_lang('Subscribed'),
]);
$formUsers->addButtonSave(get_lang('Save'));

$defaults = [];
Expand Down Expand Up @@ -161,10 +167,15 @@
$groupMultiSelect = $form->addElement(
'advmultiselect',
'groups',
get_lang('Groups'),
null,
$groupChoices
);

$groupMultiSelect->setLabel([
get_lang('Groups'),
get_lang('NotSubscribed'),
get_lang('Subscribed'),
]);
$form->addButtonSave(get_lang('Save'));

// UserGroup
Expand Down
Loading