Skip to content

Commit

Permalink
Smaller fixes for app settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Kovah committed Jan 30, 2019
1 parent b61e9cb commit f1a2a4d
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 10 deletions.
8 changes: 6 additions & 2 deletions resources/lang/en/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,16 @@
'app_settings' => 'Application Settings',

'timezone' => 'Timezone',
'private_default' => 'Private Links by default',
'private_default_help' => 'Enabling this will make all new links private by default',
'date_format' => 'Date Format',
'time_format' => 'Time Format',
'listitem_count' => 'Number of Items in Lists',

'private_default' => 'Private Links by default',
'private_default_help' => 'Enabling this will make all new links private by default',

'notes_private_default' => 'Private Notes by default',
'notes_private_default_help' => 'Enabling this will make all new notes private by default',

'sharing' => 'Link Sharing',
'sharing_help' => 'Enable all services you want to display for links, to be able to share them easily with one click.',
'sharing_toggle' => 'Toggle all on/off',
Expand Down
24 changes: 17 additions & 7 deletions resources/views/actions/settings/partials/app-settings.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
@lang('settings.timezone')
</label>
<select id="timezone" name="timezone"
class="custom-select{{ $errors->has('timezone') ? ' is-invalid' : '' }}">
class="{{ $errors->has('timezone') ? ' is-invalid' : '' }}">
@foreach(timezone_identifiers_list() as $key => $zone)
<option value="{{ $zone }}"
@if($user->settings()->get('timezone') === $zone) selected @endif>
Expand All @@ -32,10 +32,10 @@ class="custom-select{{ $errors->has('timezone') ? ' is-invalid' : '' }}">

</div>
<div class="col">

</div>
</div>

<div class="row">
<div class="col">

Expand All @@ -59,7 +59,7 @@ class="custom-select{{ $errors->has('private_default') ? ' is-invalid' : '' }}">
</p>
@endif
</div>

</div>
<div class="col">

Expand All @@ -69,10 +69,12 @@ class="custom-select{{ $errors->has('private_default') ? ' is-invalid' : '' }}">
</label>
<select id="notes_private_default" name="notes_private_default"
class="custom-select{{ $errors->has('notes_private_default') ? ' is-invalid' : '' }}">
<option value="0" @if($user->settings()->get('notes_private_default') === '0') selected @endif>
<option value="0"
@if($user->settings()->get('notes_private_default') === '0') selected @endif>
@lang('linkace.no')
</option>
<option value="1" @if($user->settings()->get('notes_private_default') === '1') selected @endif>
<option value="1"
@if($user->settings()->get('notes_private_default') === '1') selected @endif>
@lang('linkace.yes')
</option>
</select>
Expand All @@ -83,7 +85,7 @@ class="custom-select{{ $errors->has('notes_private_default') ? ' is-invalid' : '
</p>
@endif
</div>

</div>
</div>

Expand Down Expand Up @@ -172,3 +174,11 @@ class="custom-select{{ $errors->has('listitem_count') ? ' is-invalid' : '' }}">

</div>
</div>

@push('scripts')
<script>
$('#timezone').selectize({
create: false,
});
</script>
@endpush
2 changes: 1 addition & 1 deletion resources/views/dashboard.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<form action="{{ route('links.store') }}" method="POST">
@csrf

<input type="hidden" name="is_private" value="{{ usersettings('private_default') }}">
<input type="hidden" name="is_private" value="{{ usersettings('private_default') ?: 0 }}">

<div class="input-group">
<input type="text" id="url" name="url" required
Expand Down

0 comments on commit f1a2a4d

Please sign in to comment.