@extends('layouts.main') @section('breadcrumb') @if ($account->id) @else @endif @endsection @section('content') @if ($account->id)

Edit an account

@else

Create an account

@endif {!! Form::model($account, [ 'route' => $account->id ? ['admin.account.update', $account->id] : ['admin.account.store'], 'method' => $account->id ? 'put' : 'post' ]) !!}
{!! Form::text('username', $account->username, ['placeholder' => 'Username', 'required' => 'required']); !!} {!! Form::label('username', 'Username') !!}
@if (config('app.admins_manage_multi_domains')) {!! Form::text('domain', $account->domain ?? config('app.sip_domain'), ['placeholder' => 'domain.com', 'required' => 'required']); !!} @else {!! Form::text('domain', $account->domain ?? config('app.sip_domain'), ['placeholder' => 'domain.com', 'disabled']); !!} @endif {!! Form::label('domain', 'Domain') !!}
{!! Form::password('password', ['placeholder' => 'Password', 'required']); !!} {!! Form::label('password', ($account->id) ? 'Password (fill to change)' : 'Password') !!}
{!! Form::checkbox('password_sha256', 'checked', $account->sha256Password) !!} {!! Form::label('password_sha256', 'Use a SHA-256 encrypted password') !!}
{!! Form::email('email', $account->email, ['placeholder' => 'Email']); !!} {!! Form::label('email', 'Email') !!}
{!! Form::text('display_name', $account->display_name, ['placeholder' => 'John Doe']); !!} {!! Form::label('display_name', 'Display Name') !!}
{!! Form::text('phone', $account->phone, ['placeholder' => '+12123123']); !!} {!! Form::label('phone', 'Phone') !!}
{!! Form::select('dtmf_protocol', $protocols, $account->dtmf_protocol); !!} {!! Form::label('dtmf_protocol', 'DTMF Protocol') !!}

{!! Form::submit(($account->id) ? 'Update' : 'Create', ['class' => 'btn oppose']) !!}
{!! Form::close() !!} @endsection