= settingsInput('name', '', ['id' => 'coPersonName', 'icon' => 'fa-user', 'label' => 'Name', 'required' => true, 'maxlength' => 200, 'placeholder' => 'First and last name']) ?>
= settingsInput('title', '', ['id' => 'coPersonTitle', 'icon' => 'fa-id-badge', 'label' => 'Job title', 'maxlength' => 200, 'placeholder' => 'Office manager']) ?>
= settingsInput('email', '', ['id' => 'coPersonEmail', 'icon' => 'fa-envelope', 'type' => 'email', 'label' => 'Email', 'maxlength' => 200, 'placeholder' => 'name@example.com']) ?>
= settingsSelect('location', (string) array_key_first($co_locations), ['0' => '- None -'] + $co_locations, ['id' => 'coPersonLocation', 'icon' => 'fa-map-marker-alt', 'label' => 'Where they work']) ?>
['Primary contact', !$co_has_primary, 'Who you go to first - the client\'s overview and its portal show them'],
'billing' => ['Billing', false, 'Gets the invoices, quotes and statements'],
'technical' => ['Technical', false, 'Who to call about technical things'],
'important' => ['Important', false, 'Kept at the top of the contacts']] as $co_flag => [$co_flag_label, $co_flag_on, $co_flag_title]) { ?>
>
= settingsSwitch('portal', '', ['id' => 'coPersonPortal', 'label' => 'Give them client portal access', 'disabled' => !$co_portal_mail,
'help' => $co_portal_mail ? 'They are emailed a link to set their own password, good for ' . PORTAL_INVITE_LINK_DAYS . ' days - the email never has the password in it. They need an email address.'
: 'Mail isn\'t set up, so the email with their link can\'t go - give them access from their contact page once it is.']) ?>