@extends('header') @section('content') @parent {!! Former::open_for_files()->addClass('warn-on-exit')->rules(array( 'first_name' => 'required', 'last_name' => 'required', 'email' => 'email|required', 'phone' => $user->google_2fa_secret ? 'required' : '' )) !!} {{ Former::populate($account) }} {{ Former::populateField('first_name', $user->first_name) }} {{ Former::populateField('last_name', $user->last_name) }} {{ Former::populateField('email', $user->email) }} {{ Former::populateField('phone', $user->phone) }} {{ Former::populateField('dark_mode', intval($user->dark_mode)) }} {{ Former::populateField('enable_two_factor', $user->google_2fa_secret ? 1 : 0) }} @if (Input::has('affiliate')) {{ Former::populateField('referral_code', true) }} @endif @if (Utils::isAdmin()) @include('accounts.nav', ['selected' => ACCOUNT_USER_DETAILS]) @endif

{!! trans('texts.user_details') !!}

{!! Former::text('first_name') !!} {!! Former::text('last_name') !!} {!! Former::text('email') !!} {!! Former::text('phone') !!}
@if (Utils::isOAuthEnabled()) {!! Former::plaintext('oneclick_login')->value( $user->oauth_provider_id ? $oauthProviderName . ' - ' . link_to('#', trans('texts.disable'), ['onclick' => 'disableSocialLogin()']) : DropdownButton::primary(trans('texts.enable'))->withContents($oauthLoginUrls)->small() )->help('oneclick_login_help') !!} @endif @if ($user->confirmed) @if ($user->google_2fa_secret) {!! Former::checkbox('enable_two_factor') ->help(trans('texts.enable_two_factor_help')) ->text(trans('texts.enable')) ->value(1) !!} @elseif ($user->phone) {!! Former::plaintext('enable_two_factor')->value( Button::primary(trans('texts.enable'))->asLinkTo(url('settings/enable_two_factor'))->small() )->help('enable_two_factor_help') !!} @else {!! Former::plaintext('enable_two_factor') ->value('' . trans('texts.set_phone_for_two_factor') . '') !!} @endif @endif {!! Former::checkbox('dark_mode') ->help(trans('texts.dark_mode_help')) ->text(trans('texts.enable')) ->value(1) !!} @if (Utils::isNinja()) @if ($user->referral_code) {{ Former::setOption('capitalize_translations', false) }} {!! Former::plaintext('referral_code') ->help($referralCounts['free'] . ' ' . trans('texts.free') . ' | ' . $referralCounts['pro'] . ' ' . trans('texts.pro') . '' . Icon::create('question-sign') . ' ') ->value(NINJA_APP_URL . '/invoice_now?rc=' . $user->referral_code) !!} @else {!! Former::checkbox('referral_code') ->help(trans('texts.referral_code_help')) ->text(trans('texts.enable') . ' ' . Icon::create('question-sign') . '') ->value(1) !!} @endif @endif
@if ( ! Auth::user()->is_admin) @include('accounts.partials.notifications') @endif
@if (Auth::user()->confirmed) {!! Button::primary(trans('texts.change_password')) ->appendIcon(Icon::create('lock')) ->large()->withAttributes(['onclick'=>'showChangePassword()']) !!} @elseif (Auth::user()->registered && Utils::isNinja()) {!! Button::primary(trans('texts.resend_confirmation')) ->appendIcon(Icon::create('send')) ->asLinkTo(URL::to('/resend_confirmation'))->large() !!} @endif {!! Button::success(trans('texts.save')) ->submit()->large() ->appendIcon(Icon::create('floppy-disk')) !!}
{!! Former::close() !!} @stop @section('onReady') $('#first_name').focus(); @stop