$co_template) {
$co_template_choices[$co_template_id] = $co_template['contract_template_name'] . ' - ' . contractTypeLabel($co_template['contract_template_type']) . ', ' . strtolower(contractTermLabel($co_template['contract_template_term_months']));
} ?>
= settingsSelect('template_id', $co_template_pick, $co_template_choices, ['id' => 'coTemplate', 'icon' => 'fa-file-contract', 'label' => 'Template', 'required' => true,
'help' => 'Its rates, net terms, SLAs, support hours and terms - change them on the contract afterwards if this client\'s differ.']) ?>
= settingsInput('start', date('Y-m-d'), ['id' => 'coContractStart', 'icon' => 'fa-calendar-day', 'type' => 'date', 'label' => 'From', 'required' => true, 'max' => '2999-12-31']) ?>
= settingsSelect('owner_id', (string) intval($session_user_id), ['0' => '- Nobody -'] + $co_agents, ['id' => 'coContractOwner', 'icon' => 'fa-user-tie', 'label' => 'Looked after by']) ?>
= settingsSwitch('send', $co_signers ? '1' : '', ['id' => 'coContractSend', 'label' => 'Send it to them to sign', 'disabled' => !$co_signers, 'data' => ['gs-reveal' => 'coContractSendTo'],
'help' => $co_signers ? 'A draft until you have countersigned it, then active from the day above.' : 'Nobody here has an email address yet - add them on People, or send it from the contract later.']) ?>
= settingsSelect('signer_id', (string) array_key_first($co_signers), $co_signers, ['id' => 'coContractSigner', 'icon' => 'fa-signature', 'label' => 'To']) ?>
= settingsTextarea('note', '', ['id' => 'coContractNote', 'label' => 'A note with it', 'rows' => 2, 'maxlength' => 2000, 'placeholder' => 'Looking forward to working with you.']) ?>