Fixed weird checkbox display

TODO: fix the 500 on the save
This commit is contained in:
snipe 2021-01-12 18:16:42 -08:00
parent 380c6171b7
commit 75a8639a20
2 changed files with 6 additions and 2 deletions

View file

@ -287,7 +287,10 @@ class CustomField extends Model
{
$arr = preg_split("/\\r\\n|\\r|\\n/", $this->field_values);
$result[''] = 'Select '.strtolower($this->format);
if (($this->element!='checkbox') && ($this->element!='checkbox')) {
$result[''] = 'Select '.strtolower($this->format);
}
for ($x = 0; $x < count($arr); $x++) {
$arr_parts = explode('|', $arr[$x]);

View file

@ -21,7 +21,8 @@
<div>
<label>
<input type="checkbox" value="1" name="{{ $field->db_column_name() }}[]" class="minimal" {{ Request::old($field->db_column_name()) != '' ? ' checked="checked"' : '' }}> key: {{ $key }} value: {{ $value }}
<input type="checkbox" value="1" name="{{ $field->db_column_name() }}[]" class="minimal" {{ Request::old($field->db_column_name()) != '' ? ' checked="checked"' : '' }}>
{{ $value }}
</label>
</div>
@endforeach