forked from DGNum/gestioCOF
41 lines
1.3 KiB
HTML
41 lines
1.3 KiB
HTML
{% extends 'kfet/base_form.html' %}
|
|
{% load staticfiles %}
|
|
{% load widget_tweaks %}
|
|
|
|
{% block title %}Permissions - Édition{% endblock %}
|
|
{% block header-title %}Modification des permissions{% endblock %}
|
|
|
|
{% block main %}
|
|
|
|
<form action="" method="post" class="form-horizontal">
|
|
{% csrf_token %}
|
|
<div class="form-group">
|
|
<label for="{{ form.name.id_for_label }}" class="col-sm-2 control-label">{{ form.name.label }}</label>
|
|
<div class="col-sm-10">
|
|
<div class="input-group">
|
|
<span class="input-group-addon">K-Fêt</span>
|
|
{{ form.name|add_class:"form-control" }}
|
|
</div>
|
|
{% if form.name.errors %}
|
|
<span class="help-block">{{ form.name.errors }}</span>
|
|
{% endif %}
|
|
{% if form.name.help_text %}
|
|
<span class="help-block">{{ form.name.help_text }}</span>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
{% include "kfet/form_field_snippet.html" with field=form.permissions %}
|
|
{% include "kfet/form_submit_snippet.html" with value="Enregistrer" %}
|
|
</form>
|
|
|
|
<script type="text/javascript">
|
|
$(document).ready(function() {
|
|
let $name_input = $("#id_name");
|
|
let raw_name = $name_input.val();
|
|
let prefix = "K-Fêt ";
|
|
if (raw_name.startsWith(prefix))
|
|
$name_input.val(raw_name.substring(prefix.length));
|
|
});
|
|
</script>
|
|
|
|
{% endblock %}
|