{* General tab — name + description. Loaded lazily via renderGroupEditTab. *}
<form id="puq-grp-general-form">
    <input type="hidden" name="id" id="puq-grp-id" value="{$group.id|default:0}">
    <div class="form-group">
        <label>Name <span class="text-danger">*</span></label>
        <input type="text" name="name" id="puq-grp-name" class="form-control" required maxlength="255" value="{$group.name|escape}">
    </div>
    <div class="form-group">
        <label>Description</label>
        <textarea name="description" id="puq-grp-description" class="form-control" rows="3">{$group.description|escape}</textarea>
    </div>
    <div class="form-group">
        <label style="display:block;margin-bottom:4px;">Group purpose</label>
        {assign var=puq_gtype value=($group.group_type|default:'standard')}
        <label style="font-weight:normal;margin-right:20px;">
            <input type="radio" name="group_type" value="standard" id="puq-grp-type-standard" {if $puq_gtype neq 'vanity'}checked{/if}>
            <strong>Standard hosting</strong>
            <small class="text-muted">— web / mail / dns servers + DNS cluster</small>
        </label>
        <label style="font-weight:normal;">
            <input type="radio" name="group_type" value="vanity" id="puq-grp-type-vanity" {if $puq_gtype eq 'vanity'}checked{/if}>
            <strong>Vanity</strong>
            <small class="text-muted">— sell name.&lt;domain&gt; / name@&lt;domain&gt; on domains you own</small>
        </label>
        <p class="help-block" style="margin-top:6px;">
            Choosing <strong>Vanity</strong> hides the hosting-config tabs and shows the
            <em>Vanity domains</em> tab; web servers are picked per vanity domain there.
            Switching purpose takes effect after you click <strong>Save group</strong>.
        </p>
    </div>
    <div class="form-group" id="puq-grp-reserved-wrap" {if $puq_gtype neq 'vanity'}style="display:none;"{/if}>
        <label><i class="fa fa-ban text-danger"></i> Reserved names <small class="text-muted">— Vanity only</small></label>
        <textarea name="reserved_names" id="puq-grp-reserved-names" class="form-control" rows="8" spellcheck="false"
                  placeholder="admin&#10;support&#10;billing&#10;info&#10;sales&#10;…">{$group.vanity_reserved_names|default:''|escape}</textarea>
        <p class="help-block">
            Names customers may <strong>not</strong> register on this group's vanity domains
            (one per line, or comma-separated; case-insensitive). Enforced on the order form,
            the client setup page, and at provisioning. These are added <em>on top of</em> the
            built-in technical reservations (<code>www</code>, <code>mail</code>, <code>admin</code>,
            <code>ns1</code>, <code>_dmarc</code>, …) — you don't need to repeat those.
        </p>
    </div>
</form>
