add the opt-in button for emails #244

This commit is contained in:
Nabeel Shahzad
2018-09-20 10:00:23 -05:00
parent aebb517791
commit fbcaa382f4
9 changed files with 47 additions and 11 deletions

View File

@@ -45,6 +45,8 @@ return [
'rightsreserved' => 'All Rights Reserved',
'active' => 'Active',
'inactive' => 'Inactive',
'yes' => 'Yes',
'no' => 'No',
'days' => [
'mon' => 'Monday',
'tues' => 'Tuesday',

View File

@@ -15,4 +15,6 @@ return [
'editprofile' => 'Edit Profile',
'edityourprofile' => 'Edit Your Profile',
'transferhours' => 'Transferred Hours',
'opt-in' => 'Opt-In',
'opt-in-descrip' => 'Yes, include me on non-administrative emails',
];

View File

@@ -45,6 +45,8 @@ return [
'rightsreserved' => 'Todos los derechos reservados',
'active' => 'Activo',
'inactive' => 'Inactivo',
'yes' => 'Sí',
'no' => 'No',
'days' => [
'mon' => 'lunes',
'tues' => 'martes',

View File

@@ -14,4 +14,6 @@ return [
'updateprofile' => 'Actualizar perfil',
'editprofile' => 'Editar perfil',
'edityourprofile' => 'Editar tu perfil',
'opt-in' => 'Optar En',
'opt-in-descrip' => 'Sí, incluirme en correos electrónicos no administrativos',
];

View File

@@ -45,6 +45,8 @@ return [
'rightsreserved' => 'Tutti i Diritti Riservati',
'active' => 'Attivo',
'inactive' => 'Inattivo',
'yes' => 'Sì',
'no' => 'No',
'days' => [
'mon' => 'Lunedì',
'tues' => 'Martedì',

View File

@@ -14,4 +14,6 @@ return [
'editprofile' => 'Modifica Profilo',
'edityourprofile' => 'Modifica Il Tuo Profilo',
'transferhours' => 'Ore trasferite',
'opt-in' => 'Partecipa',
'opt-in-descrip' => 'Sì, includimi nelle e-mail non amministrative',
];

View File

@@ -111,6 +111,10 @@
<td>Last Login</td>
<td>{{ show_datetime($user->updated_at) }}</td>
</tr>
<tr>
<td>@lang('profile.opt-in')</td>
<td>{{ $user->opt_in ? __('common.yes') : __('common.no') }}</td>
</tr>
</table>
</div>
</div>

View File

@@ -93,18 +93,34 @@
@endif
</td>
</tr>
<td>@lang('profile.avatar')</td>
<td>
<div class="input-group form-group-no-border{{ $errors->has('avatar') ? ' has-danger' : '' }}">
{{ Form::file('avatar', null) }}
</div>
<p class="small">@lang('profile.avatarresize', ['width' => config('phpvms.avatar.width'), 'height' => config('phpvms.avatar.height')])</p>
@if ($errors->has('avatar'))
<p class="text-danger">{{ $errors->first('avatar') }}</p>
@endif
</td>
<tr>
<td>@lang('profile.avatar')</td>
<td>
<div class="input-group form-group-no-border{{ $errors->has('avatar') ? ' has-danger' : '' }}">
{{ Form::file('avatar', null) }}
</div>
<p class="small">@lang('profile.avatarresize', [
'width' => config('phpvms.avatar.width'),
'height' => config('phpvms.avatar.height')])
</p>
@if ($errors->has('avatar'))
<p class="text-danger">{{ $errors->first('avatar') }}</p>
@endif
</td>
</tr>
<tr>
<td>@lang('profile.opt-in')</td>
<td>
<div class="input-group form-group-no-border">
{{ Form::hidden('opt_in', 0, false) }}
{{ Form::checkbox('opt_in', 1, null) }}
</div>
<p class="small">@lang('profile.opt-in-descrip')
</p>
</td>
</tr>
</table>
</table>
<div style="width: 100%; text-align: right; padding-top: 20px;">
{{ Form::submit(__('profile.updateprofile'), ['class' => 'btn btn-primary']) }}

View File

@@ -85,6 +85,10 @@
<td>@lang('common.timezone')</td>
<td>{{ $user->timezone }}</td>
</tr>
<tr>
<td>@lang('profile.opt-in')</td>
<td>{{ $user->opt_in ? __('common.yes') : __('common.no') }}</td>
</tr>
</table>
</div>
</div>