diff options
Diffstat (limited to 'uploader/templates/populations/create-population.html')
-rw-r--r-- | uploader/templates/populations/create-population.html | 44 |
1 files changed, 34 insertions, 10 deletions
diff --git a/uploader/templates/populations/create-population.html b/uploader/templates/populations/create-population.html index a27a134..6a96148 100644 --- a/uploader/templates/populations/create-population.html +++ b/uploader/templates/populations/create-population.html @@ -40,15 +40,24 @@ <legend>Create Population</legend> - <div class="form-group"> + {{flash_all_messages()}} + + <div {%if errors.population_fullname%} + class="form-group has-error" + {%else%} + class="form-group" + {%endif%}> <label for="txt-population-fullname" class="form-label">Full Name</label> + {%if errors.population_fullname%} + <small class="form-text text-danger">{{errors.population_fullname}}</small> + {%endif%} <input type="text" id="txt-population-fullname" name="population_fullname" required="required" minLength="3" maxLength="100" - value="{{population_fullname or ''}}" + value="{{error_values.population_fullname or ''}}" class="form-control" /> <small class="form-text text-muted"> <p> @@ -58,15 +67,22 @@ </small> </div> - <div class="form-group"> + <div {%if errors.population_name%} + class="form-group has-error" + {%else%} + class="form-group" + {%endif%}> <label for="txt-population-name" class="form-label">Name</label> + {%if errors.population_name%} + <small class="form-text text-danger">{{errors.population_name}}</small> + {%endif%} <input type="text" id="txt-population-name" name="population_name" required="required" minLength="3" maxLength="30" - value="{{population_name or ''}}" + value="{{error_values.population_name or ''}}" class="form-control" /> <small class="form-text text-muted"> <p> @@ -81,15 +97,23 @@ </small> </div> - <div class="form-group"> + <div {%if errors.population_description%} + class="form-group has-error" + {%else%} + class="form-group" + {%endif%}> <label for="txt-population-description" class="form-label"> Description </label> - <textarea id="txt-population-description" - name="population_description" - required="required" - class="form-control" - rows="5">{{population_description or ''}}</textarea> + {%if errors.population_description%} + <small class="form-text text-danger">{{errors.population_description}}</small> + {%endif%} + <textarea + id="txt-population-description" + name="population_description" + required="required" + class="form-control" + rows="5">{{error_values.population_description or ''}}</textarea> <small class="form-text text-muted"> <p> This is a more detailed description for your population. This is |