Fix isbn restore value

This commit is contained in:
Gabriel Augendre 2018-06-18 18:19:32 +02:00
parent d98ac17eae
commit 712153f425

View file

@ -43,9 +43,10 @@
<div class="form-group"> <div class="form-group">
{% bootstrap_label content=form.isbn.label label_for=form.isbn.auto_id %} {% bootstrap_label content=form.isbn.label label_for=form.isbn.auto_id %}
<div class="input-group"> <div class="input-group">
<input name="isbn" maxlength="20" <input name="{{ form.isbn.name }}" maxlength="20"
class="form-control" class="form-control"
placeholder="{{ form.isbn.label }}" placeholder="{{ form.isbn.label }}"
{% if form.isbn.value != None %} value="{{ form.isbn.value|stringformat:'s' }}"{% endif %}
required="" id="{{ form.isbn.auto_id }}" type="text"> required="" id="{{ form.isbn.auto_id }}" type="text">
<div class="input-group-append"> <div class="input-group-append">
<button class="btn btn-outline-secondary" type="button" id="id_isbn_button"> <button class="btn btn-outline-secondary" type="button" id="id_isbn_button">
@ -89,7 +90,10 @@
<div class="form-row"> <div class="form-row">
<div class="col-12"> <div class="col-12">
<div class="custom-control custom-checkbox"> <div class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" id="{{ form.add_another.auto_id }}"> <input type="checkbox" class="custom-control-input"
{% if form.add_another.initial %}checked="checked"{% endif %}
name="{{ form.add_another.name }}"
id="{{ form.add_another.auto_id }}">
<label class="custom-control-label" <label class="custom-control-label"
for="{{ form.add_another.auto_id }}">{{ form.add_another.label }}</label> for="{{ form.add_another.auto_id }}">{{ form.add_another.label }}</label>
<small class="form-text text-muted"> <small class="form-text text-muted">