protected function controlsFieldset()
    {
        return $this->grid->fieldset(function (Fieldset $fieldset) {
                    $fieldset->legend('Sample Module Configuration');

                    $fieldset->control('input:text', 'name')
                            ->label(trans('antares/sample_module::messages.configuration.labels.name'))
                            ->attributes(['placeholder' => trans('antares/sample_module::messages.configuration.placeholders.name')])
                            ->wrapper(['class' => 'w300']);

                    $fieldset->control('input:text', 'url')
                            ->label(trans('antares/sample_module::messages.configuration.labels.url'))
                            ->attributes(['placeholder' => trans('antares/sample_module::messages.configuration.placeholders.url')])
                            ->fieldClass('input-field--group input-field--pre')
                            ->before('<div class="input-field__pre"><span>' . (request()->secure() ? 'https://' : 'http://') . '</span></div>')
                            ->wrapper(['class' => 'w400']);

                    $fieldset->control('select', 'date_format')
                            ->wrapper(['class' => 'w180'])
                            ->label(trans('antares/sample_module::messages.configuration.labels.date_format'))
                            ->options(function() {
                                return app(DateFormat::class)->query()->get()->pluck('format', 'id');
                            });
                    $options = app(Country::class)->query()->get()->pluck('name', 'code');
                    $fieldset->control('select', 'default_country')
                            ->label(trans('antares/sample_module::messages.configuration.labels.country'))
                            ->attributes(['data-flag-select', 'data-selectAR' => true, 'class' => 'w200'])
                            ->fieldClass('input-field--icon')
                            ->prepend('<span class = "input-field__icon"><span class = "flag-icon"></span></span>')
                            ->optionsData(function() use($options) {
                                $codes  = $options->keys()->toArray();
                                $return = [];
                                foreach ($codes as $code) {
                                    array_set($return, $code, ['country' => $code]);
                                }
                                return $return;
                            })
                            ->options($options);
                    $checkbox = $fieldset->control('input:checkbox', 'checkbox')
                            ->label(trans('antares/sample_module::messages.configuration.labels.checkbox'))
                            ->value(1);
                    if (array_get($this->grid->row, 'checkbox')) {
                        $checkbox->checked();
                    }

                    $fieldset->control('ckeditor', 'content')
                            ->label(trans('antares/sample_module::messages.configuration.labels.description'))
                            ->attributes(['scripts' => true, 'class' => 'richtext'])
                            ->name('content');


                    $fieldset->control('button', 'button')
                            ->attributes(['type' => 'submit', 'value' => trans('Submit'), 'class' => 'btn btn--md btn--primary mdl-button mdl-js-button mdl-js-ripple-effect'])
                            ->value(trans('antares/foundation::label.save_changes'));
                });
    }
protected function controlsFieldset()
    {
        return $this->grid->fieldset(function (Fieldset $fieldset) {
                    $fieldset->legend('Sample Module Configuration');

                    $fieldset->control('input:text', 'name')
                            ->label(trans('antares/sample_module::messages.configuration.labels.name'))
                            ->attributes(['placeholder' => trans('antares/sample_module::messages.configuration.placeholders.name')])
                            ->wrapper(['class' => 'w300']);

                    $fieldset->control('input:text', 'url')
                            ->label(trans('antares/sample_module::messages.configuration.labels.url'))
                            ->attributes(['placeholder' => trans('antares/sample_module::messages.configuration.placeholders.url')])
                            ->fieldClass('input-field--group input-field--pre')
                            ->before('<div class="input-field__pre"><span>' . (request()->secure() ? 'https://' : 'http://') . '</span></div>')
                            ->wrapper(['class' => 'w400']);

                    $fieldset->control('select', 'date_format')
                            ->wrapper(['class' => 'w180'])
                            ->label(trans('antares/sample_module::messages.configuration.labels.date_format'))
                            ->options(function() {
                                return app(DateFormat::class)->query()->get()->pluck('format', 'id');
                            });
                    $options = app(Country::class)->query()->get()->pluck('name', 'code');
                    $fieldset->control('select', 'default_country')
                            ->label(trans('antares/sample_module::messages.configuration.labels.country'))
                            ->attributes(['data-flag-select', 'data-selectAR' => true, 'class' => 'w200'])
                            ->fieldClass('input-field--icon')
                            ->prepend('<span class = "input-field__icon"><span class = "flag-icon"></span></span>')
                            ->optionsData(function() use($options) {
                                $codes  = $options->keys()->toArray();
                                $return = [];
                                foreach ($codes as $code) {
                                    array_set($return, $code, ['country' => $code]);
                                }
                                return $return;
                            })
                            ->options($options);
                    $checkbox = $fieldset->control('input:checkbox', 'checkbox')
                            ->label(trans('antares/sample_module::messages.configuration.labels.checkbox'))
                            ->value(1);
                    if (array_get($this->grid->row, 'checkbox')) {
                        $checkbox->checked();
                    }

                    $fieldset->control('ckeditor', 'content')
                            ->label(trans('antares/sample_module::messages.configuration.labels.description'))
                            ->attributes(['scripts' => true, 'class' => 'richtext'])
                            ->name('content');


                    $fieldset->control('button', 'button')
                            ->attributes(['type' => 'submit', 'value' => trans('Submit'), 'class' => 'btn btn--md btn--primary mdl-button mdl-js-button mdl-js-ripple-effect'])
                            ->value(trans('antares/foundation::label.save_changes'));
                });
    }
protected function controlsFieldset ( ) { return $ this -> grid -> fieldset ( function ( Fieldset $ fieldset ) { $ fieldset -> legend ( 'Sample Module Configuration' ) ; $ fieldset -> control ( 'input:text' , 'name' ) -> label ( trans ( 'antares/sample_module::messages.configuration.labels.name' ) ) -> attributes ( [ 'placeholder' => trans ( 'antares/sample_module::messages.configuration.placeholders.name' ) ] ) -> wrapper ( [ 'class' => 'w300' ] ) ; $ fieldset -> control ( 'input:text' , 'url' ) -> label ( trans ( 'antares/sample_module::messages.configuration.labels.url' ) ) -> attributes ( [ 'placeholder' => trans ( 'antares/sample_module::messages.configuration.placeholders.url' ) ] ) -> fieldClass ( 'input-field--group input-field--pre' ) -> before ( '<div class="input-field__pre"><span>' . ( request ( ) -> secure ( ) ? 'https://' : 'http://' ) . '</span></div>' ) -> wrapper ( [ 'class' => 'w400' ] ) ; $ fieldset -> control ( 'select' , 'date_format' ) -> wrapper ( [ 'class' => 'w180' ] ) -> label ( trans ( 'antares/sample_module::messages.configuration.labels.date_format' ) ) -> options ( function ( ) { return app ( DateFormat :: class ) -> query ( ) -> get ( ) -> pluck ( 'format' , 'id' ) ; } ) ; $ options = app ( Country :: class ) -> query ( ) -> get ( ) -> pluck ( 'name' , 'code' ) ; $ fieldset -> control ( 'select' , 'default_country' ) -> label ( trans ( 'antares/sample_module::messages.configuration.labels.country' ) ) -> attributes ( [ 'data-flag-select' , 'data-selectAR' => true , 'class' => 'w200' ] ) -> fieldClass ( 'input-field--icon' ) -> prepend ( '<span class = "input-field__icon"><span class = "flag-icon"></span></span>' ) -> optionsData ( function ( ) use ( $ options ) { $ codes = $ options -> keys ( ) -> toArray ( ) ; $ return = [ ] ; foreach ( $ codes as $ code ) { array_set ( $ return , $ code , [ 'country' => $ code ] ) ; } return $ return ; } ) -> options ( $ options ) ; $ checkbox = $ fieldset -> control ( 'input:checkbox' , 'checkbox' ) -> label ( trans ( 'antares/sample_module::messages.configuration.labels.checkbox' ) ) -> value ( 1 ) ; if ( array_get ( $ this -> grid -> row , 'checkbox' ) ) { $ checkbox -> checked ( ) ; } $ fieldset -> control ( 'ckeditor' , 'content' ) -> label ( trans ( 'antares/sample_module::messages.configuration.labels.description' ) ) -> attributes ( [ 'scripts' => true , 'class' => 'richtext' ] ) -> name ( 'content' ) ; $ fieldset -> control ( 'button' , 'button' ) -> attributes ( [ 'type' => 'submit' , 'value' => trans ( 'Submit' ) , 'class' => 'btn btn--md btn--primary mdl-button mdl-js-button mdl-js-ripple-effect' ] ) -> value ( trans ( 'antares/foundation::label.save_changes' ) ) ; } ) ; }
creates main controls fieldset

@return \Antares\Html\Form\Fieldset
creates main controls fieldset