<%- include('partials/head',{title:brand.name,subtitle:'Brand identity, bank transfer details and payment providers'}) %>
<div class="panel"><h2>Brand details</h2><form method="post" enctype="multipart/form-data" class="formgrid"><label>Brand name<input name="name" value="<%=brand.name%>" required></label><label>Legal name<input name="legal_name" value="<%=brand.legal_name||''%>"></label><label>Code<input name="code" value="<%=brand.code%>" required></label><label>Invoice prefix<input name="invoice_prefix" value="<%=brand.invoice_prefix%>" required></label><label>Default currency<select name="default_currency"><option>GBP</option><option <%=brand.default_currency==='USD'?'selected':''%>>USD</option></select></label><label>Logo<input type="file" name="logo" accept="image/*"></label><label>Email<input name="email" value="<%=brand.email||''%>"></label><label>Phone<input name="phone" value="<%=brand.phone||''%>"></label><label>Website<input name="website" value="<%=brand.website||''%>"></label><label>Company no.<input name="company_number" value="<%=brand.company_number||''%>"></label><label>Tax/VAT no.<input name="tax_number" value="<%=brand.tax_number||''%>"></label><label class="span2">Address<textarea name="address"><%=brand.address||''%></textarea></label><h3 class="span2">Bank transfer details</h3><label>Bank name<input name="bank_name" value="<%=brand.bank_name||''%>"></label><label>Account name<input name="bank_account_name" value="<%=brand.bank_account_name||''%>"></label><label>Account number<input name="bank_account_number" value="<%=brand.bank_account_number||''%>"></label><label>Sort code<input name="bank_sort_code" value="<%=brand.bank_sort_code||''%>"></label><label>IBAN<input name="iban" value="<%=brand.iban||''%>"></label><label>SWIFT/BIC<input name="swift" value="<%=brand.swift||''%>"></label><label class="span2">Invoice terms<textarea name="terms"><%=brand.terms||''%></textarea></label><label class="check"><input type="checkbox" name="active" <%=brand.active?'checked':''%>> Active</label><div class="span2"><button class="primary">Save brand</button></div></form></div>
<div class="panel"><h2>Payment providers</h2><div class="providergrid"><form method="post" action="/brands/<%=brand.id%>/merchant" class="provider"><input type="hidden" name="provider" value="stripe"><h3>Stripe</h3><input name="label" value="Default"><select name="environment"><option value="sandbox">Test</option><option value="live">Live</option></select><input name="secret_key" placeholder="Secret key"><input name="webhook_secret" placeholder="Webhook secret"><label class="check"><input type="checkbox" name="enabled"> Enabled</label><button>Save Stripe</button></form><form method="post" action="/brands/<%=brand.id%>/merchant" class="provider"><input type="hidden" name="provider" value="paypal"><h3>PayPal</h3><input name="label" value="Default"><select name="environment"><option value="sandbox">Sandbox</option><option value="live">Live</option></select><input name="client_id" placeholder="Client ID"><input name="client_secret" placeholder="Client secret"><input name="webhook_id" placeholder="Webhook ID"><label class="check"><input type="checkbox" name="enabled"> Enabled</label><button>Save PayPal</button></form><form method="post" action="/brands/<%=brand.id%>/merchant" class="provider"><input type="hidden" name="provider" value="square"><h3>Square</h3><input name="label" value="Default"><select name="environment"><option value="sandbox">Sandbox</option><option value="live">Live</option></select><input name="access_token" placeholder="Access token"><input name="location_id" placeholder="Location ID"><input name="webhook_signature_key" placeholder="Webhook signature key"><label class="check"><input type="checkbox" name="enabled"> Enabled</label><button>Save Square</button></form></div><div class="mini"><% merchants.forEach(m=>{ %><span><b><%=m.provider%></b> · <%=m.label%> · <%=m.environment%> · <%=m.enabled?'Enabled':'Disabled'%></span><% }) %></div></div><%- include('partials/foot') %>
