Skip to content

Commit 09e4bb8

Browse files
author
Chris Hunt
committed
Fix required fields and default items and tags to pinned
1 parent 4b8bf51 commit 09e4bb8

2 files changed

Lines changed: 10 additions & 10 deletions

File tree

resources/views/items/form.blade.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
{!! Form::hidden('pinned', '0') !!}
88
<label class="switch">
99
<?php
10-
$checked = false;
11-
if(isset($item->pinned) && (bool)$item->pinned === true) $checked = true;
10+
$checked = true;
11+
if(isset($item->pinned) && (bool)$item->pinned !== true) $checked = false;
1212
$set_checked = ($checked) ? ' checked="checked"' : '';
1313
?>
1414
<input type="checkbox" name="pinned" value="1"<?php echo $set_checked;?> />
@@ -57,17 +57,17 @@
5757
{!! csrf_field() !!}
5858
<div class="input">
5959
<label>{{ __('app.apps.application_name') }} *</label>
60-
{!! Form::text('title', null, array('placeholder' => __('app.apps.title'), 'id' => 'appname', 'class' => 'form-control')) !!}
60+
{!! Form::text('title', null, array('placeholder' => __('app.apps.title'), 'id' => 'appname', 'class' => 'form-control', 'required')) !!}
6161
</div>
6262

6363
<div class="input">
64-
<label>{{ __('app.apps.colour') }} *</label>
64+
<label>{{ __('app.apps.colour') }}</label>
6565
{!! Form::text('colour', $item->colour ?? '#161b1f', array('placeholder' => __('app.apps.hex'), 'id' => 'appcolour', 'class' => 'form-control color-picker set-bg-elem')) !!}
6666
</div>
6767

6868
<div class="input">
69-
<label>{{ strtoupper(__('app.url')) }}</label>
70-
{!! Form::text('url', $item->url ?? null, array('placeholder' => __('app.url'), 'id' => 'appurl', 'class' => 'form-control')) !!}
69+
<label>{{ strtoupper(__('app.url')) }} *</label>
70+
{!! Form::text('url', $item->url ?? null, array('placeholder' => __('app.url'), 'id' => 'appurl', 'class' => 'form-control', 'required')) !!}
7171
<small class="help">Don't forget http(s)://</small>
7272
</div>
7373

resources/views/tags/form.blade.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,22 @@
1111

1212
<div class="input">
1313
<label>{{ __('app.apps.tag_name') }} *</label>
14-
{!! Form::text('title', null, array('placeholder' => __('app.apps.title'), 'class' => 'form-control')) !!}
14+
{!! Form::text('title', null, array('placeholder' => __('app.apps.title'), 'class' => 'form-control', 'required')) !!}
1515
<hr />
1616
<label>{{ __('app.apps.pinned') }}</label>
1717
{!! Form::hidden('pinned', '0') !!}
1818
<label class="switch">
1919
<?php
20-
$checked = false;
21-
if(isset($item->pinned) && (bool)$item->pinned === true) $checked = true;
20+
$checked = true;
21+
if(isset($item->pinned) && (bool)$item->pinned !== true) $checked = false;
2222
$set_checked = ($checked) ? ' checked="checked"' : '';
2323
?>
2424
<input type="checkbox" name="pinned" value="1"<?php echo $set_checked;?> />
2525
<span class="slider round"></span>
2626
</label>
2727
</div>
2828
<div class="input">
29-
<label>{{ __('app.apps.colour') }} *</label>
29+
<label>{{ __('app.apps.colour') }}</label>
3030
{!! Form::text('colour', null, array('placeholder' => __('app.apps.hex'),'class' => 'form-control color-picker')) !!}
3131
<hr />
3232
</div>

0 commit comments

Comments
 (0)