Merge pull request #3 from sebathefox/Multi-language
v.0.5.8 - Multi language
This commit is contained in:
@@ -5,13 +5,50 @@
|
||||
@endsection
|
||||
|
||||
@section("content")
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
|
||||
<main>
|
||||
<h1 class="text-center sde-blue mt-0">Konto</h1>
|
||||
<h4 class="mt-0">Navn: {{ Auth::user()->name_first . " " . Auth::user()->name_last }}</h4>
|
||||
<h4 class="mt-0">Email: {{ Auth::user()->email }}</h4>
|
||||
<h4 class="mt-0">Telefon Nr.: {{ Auth::user()->phone }}</h4>
|
||||
<h1 class="text-center sde-blue mt-0">{{__('msg.konto')}}</h1>
|
||||
<h4 class="mt-0">{{__('msg.navn')}}: {{ Auth::user()->name_first . " " . Auth::user()->name_last }}</h4>
|
||||
<h4 class="mt-0">{{__('msg.email')}}: {{ Auth::user()->email }}</h4>
|
||||
<h4 class="mt-0">{{__('msg.telefon')}} Nr.: {{ Auth::user()->phone }}</h4>
|
||||
{!! session()->get('success#credentialschanged') !!}
|
||||
<a class="btn text-center btn-sde-blue mt-1" href="{{ route("users.accountedit") }}">Rediger Oplysninger</a>
|
||||
<a class="btn text-center btn-sde-blue mt-1" href="{{ route("users.accounteditpass") }}">Ændre Password</a>
|
||||
<a class="btn text-center btn-sde-blue mt-1" href="{{ route("users.accountedit") }}">{{__('msg.redigeroplysninger')}}</a>
|
||||
<a class="btn text-center btn-sde-blue mt-1" href="{{ route("users.accounteditpass") }}">{{__('msg.ændrepassword')}}</a>
|
||||
|
||||
<label for="langu">Sprog / Languages:</label>
|
||||
<select name="langName" id="lang">
|
||||
@if(request()->cookie('languagesSetting') == "dk")
|
||||
<option selected name="langDK" value="dk">Dansk</option>
|
||||
@else
|
||||
<option name="langDK" value="dk">Dansk</option>
|
||||
@endif
|
||||
@if(request()->cookie('languagesSetting') == "en")
|
||||
<option selected name="langEN" value="en">English</option>
|
||||
@else
|
||||
<option name="langEN" value="en">English</option>
|
||||
@endif
|
||||
|
||||
</select>
|
||||
</main>
|
||||
|
||||
<script>
|
||||
$(document).ready(function (){
|
||||
$('#lang').change(function () {
|
||||
$value = $('#lang').find(":selected").val();
|
||||
$.ajax({
|
||||
type: 'get',
|
||||
url: '{{route('users.setLanguages')}}',
|
||||
data: {'lang':$value},
|
||||
success:function (data) {
|
||||
console.log($value);
|
||||
location.reload();
|
||||
},
|
||||
error:function (data) {
|
||||
console.log(data);
|
||||
}
|
||||
});
|
||||
})
|
||||
})
|
||||
</script>
|
||||
|
||||
@endsection
|
||||
|
||||
@@ -6,18 +6,18 @@
|
||||
|
||||
@section("content")
|
||||
<main>
|
||||
<h1 class="text-center sde-blue mt-0">Konto</h1>
|
||||
<h1 class="text-center sde-blue mt-0">{{__('msg.konto')}}</h1>
|
||||
<form method="post" action="{{ route("users.accountupdate", ['user' => Auth::user()]) }}">
|
||||
@csrf
|
||||
@method("put")
|
||||
<span>Navn:</span>
|
||||
<span>{{__('msg.navn')}}:</span>
|
||||
<input type="text" value="{{ Auth::user()->name_first . " " . Auth::user()->name_last }}" disabled>
|
||||
<span>Email:</span>
|
||||
<span>{{__('msg.email')}}:</span>
|
||||
<input type="email" name="email" id="email" value="{{ Auth::user()->email }}" required>
|
||||
<span>Telefon Nr.:</span>
|
||||
<span>{{__('msg.telefon')}} Nr.:</span>
|
||||
<input type="text" name="phone" id="phone" value="{{ Auth::user()->phone }}" required>
|
||||
<button type="submit" class="btn text-center btn-sde-blue mt-1">Rediger</button>
|
||||
<a href="{{ route('users.account') }}" class="btn text-center btn-sde-blue mt-1">Tilbage</a>
|
||||
<button type="submit" class="btn text-center btn-sde-blue mt-1">{{__('msg.rediger')}}</button>
|
||||
<button onclick="window.location.href = '{{ route('users.account') }}';" class="btn text-center btn-sde-blue mt-1">{{__('msg.tilbage')}}</button>
|
||||
</form>
|
||||
</main>
|
||||
@endsection
|
||||
|
||||
@@ -6,29 +6,31 @@
|
||||
|
||||
@section("content")
|
||||
<main>
|
||||
<h1 class="text-center sde-blue mt-0">Konto</h1>
|
||||
<h1 class="text-center sde-blue mt-0">{{__('msg.konto')}}</h1>
|
||||
<form method="post" action="{{ route("users.accountupdate", ['user' => Auth::user()]) }}">
|
||||
@csrf
|
||||
@method("put")
|
||||
<span>Nuværende Password:</span>
|
||||
<span>{{__('msg.nuværendepassword')}}:</span>
|
||||
<div class="input-group text-left">
|
||||
<input type="password" class="form-control" name="oldpassword" id="old" placeholder="******">
|
||||
<span class="fa fa-fw fa-eye field-icon toggle-password" id="fa-old" onclick="show('old', 'fa-old')"></span>
|
||||
</div>
|
||||
<span>Nyt Password:</span>
|
||||
<span>{{__('msg.nytpassword')}}:</span>
|
||||
<div class="input-group text-left">
|
||||
<input type="password" class="form-control" name="password" id="new" placeholder="******" required>
|
||||
<span class="fa fa-fw fa-eye field-icon toggle-password" id="fa-new" onclick="show('new', 'fa-new')"></span>
|
||||
</div>
|
||||
<span>Confirm Password:</span>
|
||||
<span>{{__('msg.confirmpassword')}}:</span>
|
||||
<div class="input-group text-left">
|
||||
<input type="password" class="form-control" name="confirmpassword" id="confirm" placeholder="******" required>
|
||||
<span class="fa fa-fw fa-eye field-icon toggle-password" id="fa-confirm" onclick="show('confirm', 'fa-confirm')"></span>
|
||||
</div>
|
||||
{!! session()->get('error#notsamepass') !!}
|
||||
{!! session()->get('error#oldpass') !!}
|
||||
<button type="submit" class="btn text-center btn-sde-blue mt-1">Rediger</button>
|
||||
<button type="submit" class="btn text-center btn-sde-blue mt-1">{{__('msg.rediger')}}</button>
|
||||
<a href="{{ route('users.account') }}" class="btn text-center btn-sde-blue mt-1">{{__('msg.tilbage')}}</a>
|
||||
</form>
|
||||
|
||||
</main>
|
||||
<style>
|
||||
input {
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
@section('content')
|
||||
<main id="main" style="justify-content: space-between;">
|
||||
<div class="d-flex col block-container mt-2">
|
||||
<a href="{{ route('menu-plans.index') }}" class="block text-center mb-1">Menuplan</a>
|
||||
<a href="{{ route('events.index') }}" class="block text-center mb-1">Aktiviteter</a>
|
||||
<a href="{{ route('washing-reservations.appindex') }}" class="block text-center mb-1">Reservationer</a>
|
||||
<a href="{{ route('contacts.index') }}" class="block text-center mb-1">Kontoret</a>
|
||||
<a href="{{ route('phones.index') }}" class="block text-center mb-1">Vagttelefon</a>
|
||||
<a href="{{ route('guides.index') }}" class="block text-center mb-1">Vejledninger</a>
|
||||
<a href="{{ route('menu-plans.index') }}" class="block text-center mb-1">{{ __('msg.menuplan') }}</a>
|
||||
<a href="{{ route('events.index') }}" class="block text-center mb-1">{{ __('msg.aktiviteter') }}</a>
|
||||
<a href="{{ route('washing-reservations.appindex') }}" class="block text-center mb-1">{{ __('msg.reservationer') }}</a>
|
||||
<a href="{{ route('contacts.index') }}" class="block text-center mb-1">{{ __('msg.kontoret') }}</a>
|
||||
<a href="{{ route('phones.index') }}" class="block text-center mb-1">{{ __('msg.vagttelefon') }}</a>
|
||||
<a href="{{ route('guides.index') }}" class="block text-center mb-1">{{ __('msg.vejledning') }}</a>
|
||||
</div>
|
||||
<div class="row" style="align-self: center; margin: 8px 0 8px 0;">
|
||||
<a href="https://www.facebook.com" target="_blank" class="link">
|
||||
|
||||
Reference in New Issue
Block a user