Commit 6d435504 authored by Chris92's avatar Chris92

More work on localization

parent a9ac3595
......@@ -27,6 +27,9 @@ return [
'add' => 'Add',
'yes' => 'Yes',
'no' => 'No',
'role' => 'Role',
'roles' => 'Roles',
'save-changes' => 'Save changes',
// Add/edit servers
'add-new-server' => 'Add New Server',
......@@ -62,12 +65,29 @@ return [
'server-manage-planets-bill-msg' => 'Enter a message for the bill',
'server-manage-planets-bill-create' => 'Create bill',
// User stuff
// User management
'user-server-assignment' => 'Server Assignment',
'user-server-assign' => 'Assign Server',
'user-server-role-assign' => 'Assign Role',
'user-server-role-unassign' => 'Unassign Role',
'user-server-unassign-confirm' => 'Do you really want to revoke access to this server for the user?',
'user-create' => 'Create a User',
'user-mp-login' => 'Maniaplanet Login',
'user-email' => 'E-Mail',
'user-email-placeholder' => 'Valid and working E-Mail address',
'user-password' => 'Password',
'user-password-confirm' => 'Confirm Password',
'user-ui-lang' => 'Default Interface Language',
'user-edit' => 'Editing User',
'user-management' => 'User management',
'user-delete-confirm' => 'Do you really want to delete this user?',
'user-reset-password' => 'Reset your Password',
'user-reset-password-send-link' => 'Send Password Reset Link',
'user-login-remember' => 'Remember me',
'user-login-maniaconnect' => 'Login via ManiaPlanet',
'user-forgot-password' => 'Forgot your password?',
......
......@@ -7,75 +7,76 @@
<div class="ui grid">
<div class="row">
<div class="eight wide column">
<h2 class="ui header">Create a User</h2>
<h2 class="ui header">{{__('messages.user-create')}}</h2>
</div>
<div class="eight wide column right aligned">
<a class="ui black labeled icon button" href="{{ route('users.index') }}"><i
class="reply icon"></i><span>Back</span></a>
class="reply icon"></i><span>{{__('messsages.back')}}</span></a>
</div>
</div>
</div>
{!! Form::open(array('route' => 'users.store','method'=>'POST', "class" => "ui form")) !!}
<div class="required field {{ $errors->first("login", "error") }}">
<label class="label">Maniaplanet login</label>
{!! Form::text('login', null, array('placeholder' => 'Maniaplanet login', "class"=> "form-control")) !!}
{!! $errors->first("login", "<div class='ui pointing red basic label'>:message</div>") !!}
</div>
<div class="two fields">
<div class="required field {{ $errors->first("name", "error") }}">
<label class="label">Name</label>
{!! Form::text('name', null, array('placeholder' => 'Name', "class"=> "input")) !!}
{!! $errors->first("name", "<div class='ui pointing red basic label'>:message</div>") !!}
<div class="required field {{ $errors->first("login", "error") }}">
<label class="label">{{__('messsages.user-mp-login')}}</label>
{!! Form::text('login', null, array('placeholder' => 'Maniaplanet login', "class"=> "form-control")) !!}
{!! $errors->first("login", "<div class='ui pointing red basic label'>:message</div>") !!}
</div>
<div class="two fields">
<div class="required field {{ $errors->first("name", "error") }}">
<label class="label">{{__('messsages.name')}}</label>
{!! Form::text('name', null, array('placeholder' => __('messages.name'), "class"=> "input")) !!}
{!! $errors->first("name", "<div class='ui pointing red basic label'>:message</div>") !!}
</div>
<div class="field">
<label class="label">Email</label>
<p class="control">
{!! Form::text('email', null, array('placeholder' => 'Valid and working email', "class" => "input")) !!}
</p>
<p class="help is-danger">{{ $errors->first("email") }}</p>
<div class="field">
<label class="label">{{__('messsages.user-email')}}</label>
<p class="control">
{!! Form::text('email', null, array('placeholder' => __('messages.user-email-placeholder'), "class" => "input")) !!}
</p>
<p class="help is-danger">{{ $errors->first("email") }}</p>
</div>
</div>
</div>
<div class="two fields">
<div class="field">
<label class="label">Password</label>
<p class="control">
{!! Form::password('password', ['placeholder' => 'Password', "class" => "input"]) !!}
</p>
<p class="help is-danger">{{ $errors->first("password") }}</p>
</div>
<div class="field">
<label class="label">Confirm Password</label>
<p class="control">
{!! Form::password('confirm-password', ['placeholder' => 'Confirm Password', "class" => "input"]) !!}
</p>
<p class="help is-danger">{{ $errors->first("confirm-password") }}</p>
<div class="two fields">
<div class="field">
<label class="label">{{__('messsages.user-password')}}</label>
<p class="control">
{!! Form::password('password', ['placeholder' => __('messages.user-password'), "class" => "input"]) !!}
</p>
<p class="help is-danger">{{ $errors->first("password") }}</p>
</div>
<div class="field">
<label class="label">{{__('messages.user-password-confirm')}}</label>
<p class="control">
{!! Form::password('confirm-password', ['placeholder' => __('messages.user-password-confirm'), "class" => "input"]) !!}
</p>
<p class="help is-danger">{{ $errors->first("confirm-password") }}</p>
</div>
</div>
</div>
<div class="two fields">
<div class="field">
<label class="label">Default Interface Language</label>
<p class="select">
{!! Form::select('locale', $lang, $lang) !!}
</p>
<div class="two fields">
<div class="field">
<label class="label">{{__('messages.user-ui-lang')}}</label>
<p class="select">
{!! Form::select('locale', $lang, $lang) !!}
</p>
</div>
<div class="field">
<label class="label">{{__('messages.role')}}</label>
<p class="select">
{!! Form::select('roles[]', $roles,[], array('class' => 'select')) !!}
</p>
</div>
</div>
<div class="field">
<label class="label">Role</label>
<p class="select">
{!! Form::select('roles[]', $roles,[], array('class' => 'select')) !!}
</p>
<button type="submit" class="ui green icon labeled button"><i class="checkmark icon"></i>{{__('messages.create')}}
</button>
<a class="ui button" href="{{ route('users.index') }}"><span>{{__('messages.cancel')}}</span></a>
</div>
</div>
<div class="field">
<button type="submit" class="ui green icon labeled button"><i class="checkmark icon"></i>Create
</button>
<a class="ui button" href="{{ route('users.index') }}"><span>Cancel</span></a>
{!! Form::close() !!}
</div>
{!! Form::close() !!}
@endsection
......@@ -8,30 +8,30 @@
<div class="ui grid">
<div class="row">
<div class="eight wide column">
<h2 class="ui header">Editing user</h2>
<h2 class="ui header">{{__('messsages.user-edit')}}</h2>
</div>
<div class="eight wide column right aligned">
<a class="ui black labeled icon button" href="{{ route('users.index') }}"><i
class="reply icon"></i><span>Back</span></a>
class="reply icon"></i><span>{{__('messsages.back')}}</span></a>
</div>
</div>
</div>
{!! Form::model($user, ['method' => 'PATCH','route' => ['users.update', $user->id], "class" => "ui form"]) !!}
<div class="required field {{ $errors->first("login", "error") }}">
<label class="label">Maniaplanet login</label>
<label class="label">{{__('messsages.user-mp-login')}}</label>
{!! Form::text('login', null, array('placeholder' => 'Maniaplanet login', "class"=> "form-control")) !!}
{!! $errors->first("login", "<div class='ui pointing red basic label'>:message</div>") !!}
</div>
<div class="two fields">
<div class="required field {{ $errors->first("name", "error") }}">
<label class="label">Name</label>
<label class="label">{{__('messsages.name')}}</label>
{!! Form::text('name', null, array('placeholder' => 'Name', "class"=> "input")) !!}
{!! $errors->first("name", "<div class='ui pointing red basic label'>:message</div>") !!}
</div>
<div class="field">
<label class="label">Email</label>
<label class="label">{{__('messsages.user-email')}}</label>
<p class="control">
{!! Form::text('email', null, array('placeholder' => 'Valid and working email', "class" => "input")) !!}
</p>
......@@ -41,14 +41,14 @@
<div class="two fields">
<div class="field">
<label class="label">Password</label>
<label class="label">{{__('messsages.user-password')}}</label>
<p class="control">
{!! Form::password('password', ['placeholder' => 'Password', "class" => "input"]) !!}
</p>
<p class="help is-danger">{{ $errors->first("password") }}</p>
</div>
<div class="field">
<label class="label">Confirm Password</label>
<label class="label">{{__('messsages.user-password-confirm')}}</label>
<p class="control">
{!! Form::password('confirm-password', ['placeholder' => 'Confirm Password', "class" => "input"]) !!}
</p>
......@@ -58,14 +58,14 @@
<div class="two fields">
<div class="field">
<label class="label">Default Interface Language</label>
<label class="label">{{__('messsages.user-ui-lang')}}</label>
<p class="select">
{!! Form::select('locale', $lang, $lang) !!}
</p>
</div>
<div class="field">
<label class="label">Role</label>
<label class="label">{{__('messsages.role')}}</label>
<p class="select">
{!! Form::select('roles[]', $roles,[], array('class' => 'select')) !!}
</p>
......@@ -73,9 +73,9 @@
</div>
<div class="field">
<button type="submit" class="ui green icon labeled button"><i class="checkmark icon"></i>Save changes
<button type="submit" class="ui green icon labeled button"><i class="checkmark icon"></i>{{__('messsages.save-changes')}}
</button>
<a class="ui button" href="{{ route('users.index') }}"><span>Cancel</span></a>
<a class="ui button" href="{{ route('users.index') }}"><span>{{__('messsages.cancel')}}</span></a>
</div>
{!! Form::close() !!}
......
......@@ -7,12 +7,12 @@
<div class="ui grid">
<div class="row">
<div class="eight wide column">
<h2 class="ui header">User management</h2>
<h2 class="ui header">{{__('messages.user-management')}}</h2>
</div>
<div class="eight wide column right aligned">
@ability('adminserv-master','global-user-create')
<a class="ui green small labeled icon button" href="{{ route('users.create') }}"><i
class="plus icon"></i>Add new User</a>
class="plus icon"></i>{{__('messages.user-create')}}</a>
@endability
</div>
</div>
......@@ -21,11 +21,11 @@
<table class="ui striped table">
<thead>
<tr class="center aligned">
<th class="one wide">No</th>
<th class="four wide">Name</th>
<th class="four wide">Roles</th>
<th class="one wide">Servers</th>
<th class="five wide">Action</th>
<th class="one wide">{{__('messages.number')}}</th>
<th class="four wide">{{__('messsages.name')}}</th>
<th class="four wide">{{__('messsages.roles')}}</th>
<th class="one wide">{{__('messsages.servers')}}</th>
<th class="five wide">{{__('messsages.action')}}</th>
</tr>
</thead>
<tbody>
......@@ -50,12 +50,12 @@
<td>
<!--<a class="ui small blue icon button" href="{{ route('users.show',$user->id) }}">Show</a>-->
@role('adminserv-master')
<a class="ui small grey icon button" href="{{ route('users.servers',$user->id) }}"><i class="cloud icon"></i>Servers</a>
<a class="ui small teal icon button" href="{{ route('users.edit',$user->id) }}"><i class="pencil icon"></i>Edit</a>
<a class="ui small grey icon button" href="{{ route('users.servers',$user->id) }}"><i class="cloud icon"></i>{{__('messsages.servers')}}</a>
<a class="ui small teal icon button" href="{{ route('users.edit',$user->id) }}"><i class="pencil icon"></i>{{__('messsages.edit')}}</a>
{!! Form::open(['method' => 'DELETE','route' => ['users.destroy', $user->id],'style'=>'display:inline']) !!}
<button class="ui small red icon button" type="button" oncLick="doConfirm(this);"
value="Delete"><i
class="remove icon"></i> Delete
class="remove icon"></i> {{__('messsages.delete')}}
</button>
{!! Form::close() !!}
@endrole
......@@ -70,16 +70,16 @@
<div class="ui small confirm modal">
<div class="ui icon header">
<i class="delete icon"></i>
Confirm delete user
{{__('messages.user-delete-confirm')}}
</div>
<div class="actions">
<div class="ui red cancel inverted button">
<i class="remove icon"></i>
No
{{__('messages.no')}}
</div>
<div class="ui green ok inverted button">
<i class="checkmark icon"></i>
Yes
{{__('messages.yes')}}
</div>
</div>
</div>
......
......@@ -38,7 +38,7 @@
<div class="field">
<div class="ui left icon input">
<i class="user icon"></i>
<input type="text" name="email" placeholder="E-mail address"
<input type="text" name="email" placeholder="{{__('messages.user-email')}}"
value="{{ old('email') }}" required
autofocus/>
</div>
......@@ -46,29 +46,29 @@
<div class="field">
<div class="ui left icon input">
<i class="lock icon"></i>
<input type="password" name="password" placeholder="Password" required/>
<input type="password" name="password" placeholder="{{__('messages.user-password')}}" required/>
</div>
</div>
<div class="field">
<div class="ui toggle checkbox">
<input type="checkbox" class="hidden"
name="remember" {{ old('remember') ? 'checked' : '' }} />
<label for="remember">Remember me</label>
<label for="remember">{{__('messages.user-login-remember')}}</label>
</div>
</div>
<div class="ui message">
<div class="ui buttons">
<button type="submit" class="ui button">Login</button>
<button type="submit" class="ui button">{{__('messages.login')}}</button>
<div class="or"></div>
<a class="ui button maniaconnect" href="/login/maniaplanet">Mania Connect</a>
<a class="ui button maniaconnect" href="/login/maniaplanet">{{__('messages.user-login-maniaconnect')}}</a>
</div>
</div>
</div>
</form>
<a class="ui link" href="{{ route('password.request') }}">
Forgot Your Password?
{{__('messages.user-forgot-password')}}
</a>
</div>
</div>
......
......@@ -5,7 +5,7 @@
<div class="row">
<div class="col-md-8 col-md-offset-2">
<div class="panel panel-default">
<div class="panel-heading">Reset Password</div>
<div class="panel-heading">{{__('messages.user-reset-password')}}</div>
<div class="panel-body">
@if (session('status'))
<div class="alert alert-success">
......@@ -17,7 +17,7 @@
{{ csrf_field() }}
<div class="form-group{{ $errors->has('email') ? ' has-error' : '' }}">
<label for="email" class="col-md-4 control-label">E-Mail Address</label>
<label for="email" class="col-md-4 control-label">{{__('messages.user-email')}}</label>
<div class="col-md-6">
<input id="email" type="email" class="form-control" name="email" value="{{ old('email') }}" required>
......@@ -33,7 +33,7 @@
<div class="form-group">
<div class="col-md-6 col-md-offset-4">
<button type="submit" class="btn btn-primary">
Send Password Reset Link
{{__('messages.user-reset-password')}}
</button>
</div>
</div>
......
......@@ -5,7 +5,7 @@
<div class="row">
<div class="col-md-8 col-md-offset-2">
<div class="panel panel-default">
<div class="panel-heading">Reset Password</div>
<div class="panel-heading">{{__('messsages.user-reset-password')}}</div>
<div class="panel-body">
@if (session('status'))
......@@ -20,7 +20,7 @@
<input type="hidden" name="token" value="{{ $token }}">
<div class="form-group{{ $errors->has('email') ? ' has-error' : '' }}">
<label for="email" class="col-md-4 control-label">E-Mail Address</label>
<label for="email" class="col-md-4 control-label">{{__('messages.user-email')}}</label>
<div class="col-md-6">
<input id="email" type="email" class="form-control" name="email" value="{{ $email or old('email') }}" required autofocus>
......@@ -34,7 +34,7 @@
</div>
<div class="form-group{{ $errors->has('password') ? ' has-error' : '' }}">
<label for="password" class="col-md-4 control-label">Password</label>
<label for="password" class="col-md-4 control-label">{{__('messages.user-password')}}</label>
<div class="col-md-6">
<input id="password" type="password" class="form-control" name="password" required>
......@@ -48,7 +48,7 @@
</div>
<div class="form-group{{ $errors->has('password_confirmation') ? ' has-error' : '' }}">
<label for="password-confirm" class="col-md-4 control-label">Confirm Password</label>
<label for="password-confirm" class="col-md-4 control-label">{{__('messages.user-password-confirm')}}</label>
<div class="col-md-6">
<input id="password-confirm" type="password" class="form-control" name="password_confirmation" required>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment