{t('edit poll',{id:id})}
{#if poll && poll.name}
{t('name')}
patch_poll('name',name)} />
{t('description')}
patch_poll('description',desc)} />
{t('permissions')}
{t('options')}
{t('name')}
{t('description')}
{#each Object.entries(poll.options) as [option_id, option]}
patch_option(option,'name',name)} title={t('clear to remove')} />
patch_option(option,'description',desc)} />
{/each}
{t('add element',{element:t('options')})}
{t('save')}
{t('weights')}
{t('weight')}
{t('description')}
{#each Object.entries(poll.weights) as [weight,descr] (weight)}
patch_weight({[weight]: desc})} />
{/each}
{t('save')}
{/if}