% if c.visual.allow_custom_hooks_settings: ${h.form(url('admin_settings_hooks'), method='post')}

${_('Custom Global Mercurial Hooks')}

${_('Hooks can be used to trigger actions on certain events such as push / pull. They can trigger Python functions or external applications.')} %for hook in c.custom_hooks:
<% input_id = hook.ui_key.replace('.', '_') %>
${h.hidden('hook_ui_key',hook.ui_key,id='hook_ui_key_'+input_id)} ${h.hidden('hook_ui_value',hook.ui_value,id='hook_ui_value_'+input_id)} ${h.text('hook_ui_value_new',hook.ui_value,id=input_id,size=50,class_='form-control')}
%endfor
${h.text('new_hook_ui_value',size=50,class_='form-control')}
${h.submit('save',_('Save'),class_="btn btn-default")}
${h.end_form()}

${_('Git Hooks')}

${h.HTML(_('Kallithea has no support for custom Git hooks. Kallithea will use Git post-receive hooks internally. Installation of these hooks is managed in %s.')) % (h.literal('''%s''') % (h.url('admin_settings_mapping'), _('Remap and Rescan')))}
% else:

${_('Custom Hooks are not enabled')}

% endif