Skip to content

Commit

Permalink
[ADD] TextareaMini type Field.
Browse files Browse the repository at this point in the history
  • Loading branch information
Seiger committed Dec 18, 2024
1 parent 9eb12ea commit e3b52a7
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/sSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ class sSettings
{
const TYPE_TEXT = 'Text';
const TYPE_TEXTAREA = 'Textarea';
const TYPE_TEXTAREA_MINI = 'TextareaMini';
const TYPE_IMAGE = 'Image';
const TYPE_CHECKBOX = 'Checkbox';

Expand Down
2 changes: 1 addition & 1 deletion views/partials/checkboxType.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
@else
<span>@lang('sSettings::global.no_title')</span>
@endif
<small class="form-text text-muted">[(sset_{{$field['name']}})]</small>
<small class="form-text text-muted">@{{evo()->getConfig('sset_{!!$field['name']!!}', 0)}}</small>
</label>
<div class="col-7 col-md-9 col-lg-10">
<input type="checkbox" id="publishedcheck_{{$field['name']}}" class="form-checkbox form-control"
Expand Down
2 changes: 1 addition & 1 deletion views/partials/imageType.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
@else
<span>@lang('sSettings::global.no_title')</span>
@endif
<small class="form-text text-muted">[(sset_{{$field['name']}})]</small>
<small class="form-text text-muted">@{{evo()->getConfig('sset_{!!$field['name']!!}', '')}}</small>
</label>
<div class="col-7 col-md-9 col-lg-10">
<input type="text" id="{{$field['name']}}" class="form-control" name="sset_{{$field['name']}}" value="{{evo()->getConfig('sset_'.$field['name'], '')}}" onchange="documentDirty=true;" style="width: 90%">
Expand Down
2 changes: 1 addition & 1 deletion views/partials/textType.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
@else
<span>@lang('sSettings::global.no_title')</span>
@endif
<small class="form-text text-muted">[(sset_{{$field['name']}})]</small>
<small class="form-text text-muted">@{{evo()->getConfig('sset_{!!$field['name']!!}', '')}}</small>
</label>
<div class="col-7 col-md-9 col-lg-10">
<input class="form-control" type="text" id="{{$field['name']}}" name="sset_{{$field['name']}}" value="{{evo()->getConfig('sset_'.$field['name'], '')}}" onchange="documentDirty=true;" maxlength="255">
Expand Down
2 changes: 1 addition & 1 deletion views/partials/textareaType.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
@else
<span>@lang('sSettings::global.no_title')</span>
@endif
<small class="form-text text-muted">[(sset_{{$field['name']}})]</small>
<small class="form-text text-muted">@{!!evo()->getConfig('sset_{{$field['name']}}', '')!!}</small>
</label>
<div class="col-7 col-md-9 col-lg-10">
<textarea class="form-control" id="{{$field['name']}}" name="sset_{{$field['name']}}" cols="30" rows="10" onchange="documentDirty=true;">{{evo()->getConfig('sset_'.$field['name'], '')}}</textarea>
Expand Down
15 changes: 15 additions & 0 deletions views/partials/textareaminiType.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<div class="row form-row form-element-input">
<label class="control-label col-5 col-md-3 col-lg-2">
@if(trim($field['label']))
<span>@lang($field['label'])</span>
@else
<span>@lang('sSettings::global.no_title')</span>
@endif
<small class="form-text text-muted">@{!!evo()->getConfig('sset_{{$field['name']}}', '')!!}</small>
</label>
<div class="col-7 col-md-9 col-lg-10">
<textarea class="form-control" id="{{$field['name']}}" name="sset_{{$field['name']}}" cols="30" rows="3" onchange="documentDirty=true;">{{evo()->getConfig('sset_'.$field['name'], '')}}</textarea>
<small class="form-text text-muted">@lang($field['description'])</small>
</div>
</div>
<div class="split my-1"></div>

0 comments on commit e3b52a7

Please sign in to comment.