<commit_before>@if($user)
    {!! BootForm::open()->action('/admin/users/' . $user->id)->put() !!}
    {!! BootForm::bind($user) !!}
@else
    {!! BootForm::open()->action('/admin/users') !!}
@endif

<div class="box-body">
    <div class="row">
        <div class="col-xs-12 col-md-7">
            {!! BootForm::text('First name', 'first_name') !!}
            {!! BootForm::text('Last name', 'last_name') !!}
            {!! BootForm::email('Email', 'email') !!}
            {!! BootForm::password('Password', 'password') !!}
            {!! BootForm::password('Confirm password', 'password_confirmation') !!}

            {!! BootForm::select('Gender', 'gender')->options(['0' => '---', '1' => 'Male', '2' => 'Female'])->addClass('select2') !!}
            {!! BootForm::text('Birthday', 'birthday')->addClass('date') !!}
            {!! BootForm::select('Role', 'role')->options(['0' => 'Member', '1' => 'Moderator', '2' => 'Administrator'])->addClass('select2') !!}
            {!! BootForm::select('Status', 'status')->options(['0' => 'Inactive', '1' => 'Active', '2' => 'Banned'])->addClass('select2') !!}
            {!! BootForm::textarea('Reason for ban', 'banned_reason') !!}
            {!! BootForm::text('Last seen IP', 'ip')->attribute('readonly', 'readonly') !!}
            {!! BootForm::text('Last login', 'last_login')->attribute('readonly', 'readonly') !!}
        </div>
        <div class="col-xs-12 col-md-5">
            <h3 class="text-primary">User settings</h3>
            @foreach($settings as $setting)
                @if($setting->user_editable)
                    {!! BootForm::text($setting->name, 'settings['.$setting->id.']', (!$user) ? $setting->default : $user->settings()->whereUsettingId($setting->id)->first()->value) !!}
                @else
                    @if($value = $user->settings()->whereUsettingId($setting->id)->first()->value)
                    <strong>{{ $setting->name }}</strong>: {{ $value }}
                    @else
                    <strong>{{ $setting->name }}</strong>: {{ $setting->default  }}
                    @endif
                @endif
            @endforeach
        </div>
    </div>
</div>

<div class="box-footer">
    <ul class="list-inline list-unstyled">
        <li>{!! BootForm::submit('Save', 'btn btn-primary') !!}</li>
        <li><a href="{{URL::previous()}}" class="btn btn-default">Cancel</a></li>
    </ul>
</div>
{!! BootForm::close() !!}
<commit_msg>Corrected users' form for user settings.<commit_after>@if($user)
    {!! BootForm::open()->action('/admin/users/' . $user->id)->put() !!}
    {!! BootForm::bind($user) !!}
@else
    {!! BootForm::open()->action('/admin/users') !!}
@endif

<div class="box-body">
    <div class="row">
        <div class="col-xs-12 col-md-7">
            {!! BootForm::text('First name', 'first_name') !!}
            {!! BootForm::text('Last name', 'last_name') !!}
            {!! BootForm::email('Email', 'email') !!}
            {!! BootForm::password('Password', 'password') !!}
            {!! BootForm::password('Confirm password', '<PASSWORD>') !!}

            {!! BootForm::select('Gender', 'gender')->options(['0' => '---', '1' => 'Male', '2' => 'Female'])->addClass('select2') !!}
            {!! BootForm::text('Birthday', 'birthday')->addClass('date') !!}
            {!! BootForm::select('Role', 'role')->options(['0' => 'Member', '1' => 'Moderator', '2' => 'Administrator'])->addClass('select2') !!}
            {!! BootForm::select('Status', 'status')->options(['0' => 'Inactive', '1' => 'Active', '2' => 'Banned'])->addClass('select2') !!}
            {!! BootForm::textarea('Reason for ban', 'banned_reason') !!}
            {!! BootForm::text('Last seen IP', 'ip')->attribute('readonly', 'readonly') !!}
            {!! BootForm::text('Last login', 'last_login')->attribute('readonly', 'readonly') !!}
        </div>
        <div class="col-xs-12 col-md-5">
            <h3 class="text-primary">User settings</h3>
            @foreach($settings as $setting)
                {!! BootForm::text($setting->name, 'settings['.$setting->id.']', (!$user) ? $setting->default : $user->settings()->whereUsettingId($setting->id)->first()->value) !!}
            @endforeach
        </div>
    </div>
</div>

<div class="box-footer">
    <ul class="list-inline list-unstyled">
        <li>{!! BootForm::submit('Save', 'btn btn-primary') !!}</li>
        <li><a href="{{URL::previous()}}" class="btn btn-default">Cancel</a></li>
    </ul>
</div>
{!! BootForm::close() !!}

{'fraction_non_alphanumeric': 0.2614190687361419, 'fraction_numerical': 0.008869179600886918, 'mean_word_length': 2.9397379912663757, 'pattern_counts': {'":': 0, '<': 48, '<?xml version=': 0, '>': 117, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7238038', 'n_tokens_mistral': 1428, 'n_tokens_neox': 1390, 'n_words': 216}