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
18 changes: 0 additions & 18 deletions resources/macros/macros.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,24 +86,6 @@
return $select;
});

Form::macro('digit_separator', function ($name = 'digit_separator', $selected = null, $class = null) {
$formats = [
'1,234.56',
'1.234,56',
];

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>';

return $select;
});

/**
* Barcode macro
* Generates the dropdown menu of available 1D barcodes
Expand Down
7 changes: 6 additions & 1 deletion resources/views/settings/localization.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,12 @@ class="form-control select2-container"
id="default_currency"
>

{!! Form::digit_separator('digit_separator', old('digit_separator', $setting->digit_separator), 'select2') !!}
<x-input.select
name="digit_separator"
:options="['1,234.56', '1.234,56']"
:selected="old('digit_separator', $setting->digit_separator)"
style="min-width:120px"
/>

{!! $errors->first('default_currency', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
</div>
Expand Down
Loading