Skip to content

A free open source IT asset/license management system

Merge branch 'develop' into 17204-replace-form-digit-separator

Marcus Moore23885f516659
diff --cc resources/macros/macros.php
index d356c52605,b23661dcf9..0c3628fe26
--- a/resources/macros/macros.php
+++ b/resources/macros/macros.php
@@@ -86,15 -86,17 +86,15 @@@ Form::macro('time_display_format', func
return $select;
});
-Form::macro('digit_separator', function ($name = 'digit_separator', $selected = null, $class = null) {
+Form::macro('name_display_format', function ($name = 'name_display_format', $selected = null, $class = null) {
$formats = [
- '1,234.56',
- '1.234,56',
+ 'first_last' => trans('general.firstname_lastname_display'),
+ 'last_first' => trans('general.lastname_firstname_display'),
];
- $select = '<select name="'.$name.'" class="'.$class.'" style="width: 100%" aria-label="'.$name.'">';
- foreach ($formats as $format) {
- }
- $select = '<select name="'.$name.'" class="'.$class.'" style="min-width:120px">';
- foreach ($formats as $format_inner) {
- $select .= '<option value="'.$format_inner.'"'.($selected == $format_inner ? ' selected="selected"' : '').'>'.$format_inner.'</option> ';
++ $select = '<select name="' . $name . '" class="' . $class . '" style="width: 100%" aria-label="' . $name . '">';
+ foreach ($formats as $format => $label) {
- $select .= '<option value="'.$format.'"'.($selected == $format ? ' selected="selected" role="option" aria-selected="true"' : ' aria-selected="false"').'>'.$label.'</option> '."\n";
++ $select .= '<option value="' . $format . '"' . ($selected == $format ? ' selected="selected" role="option" aria-selected="true"' : ' aria-selected="false"') . '>' . $label . '</option> ' . "\n";
}
$select .= '</select>';