Commit 3e5847a15ff8358c8ccbb2d7f61d13dd1e01a726
1 parent
8c701d03
Exists in
master
and in
2 other branches
Modified bulletin form.html to display the new field
Showing
1 changed file
with
42 additions
and
0 deletions
Show diff stats
bulletin/templates/bulletin/_form.html
... | ... | @@ -69,6 +69,7 @@ |
69 | 69 | </div> |
70 | 70 | |
71 | 71 | <div class="form-group{% if form.has_error %} has-error {% endif %} is-fileinput"> |
72 | + <h4>{% trans "Bulletin Data" %}</h4><hr> | |
72 | 73 | <label for="{{ form.file_content.auto_id }}">{{ form.file_content.label }} <span>*</span></label> |
73 | 74 | <a href="{% url 'bulletin:download_file' file=goal_file %}"> {% trans "Click to download a xls file with the data of the goals" %}</a> |
74 | 75 | {% render_field form.file_content class='file-selector' %} |
... | ... | @@ -110,6 +111,47 @@ |
110 | 111 | {% endif %} |
111 | 112 | </div> |
112 | 113 | |
114 | + <div class="form-group{% if form.has_error %} has-error {% endif %} is-fileinput"> | |
115 | + <label for="{{ form.indicators.auto_id }}">{{ form.indicators.label }} <span>*</span></label> | |
116 | + {% render_field form.indicators class='file-selector' %} | |
117 | + | |
118 | + <div class="input-group common-file-input"> | |
119 | + <input type="text" readonly="" class="form-control" placeholder="{% trans 'Choose your file...' %}"> | |
120 | + <span class="input-group-btn input-group-sm"> | |
121 | + <button type="button" class="btn btn-fab btn-fab-mini"> | |
122 | + <i class="material-icons">attach_file</i> | |
123 | + </button> | |
124 | + </span> | |
125 | + </div> | |
126 | + | |
127 | + <div class="filedrag"> | |
128 | + {% if bulletin %} | |
129 | + <i class="fa fa-file-archive-o"></i> <br /> | |
130 | + | |
131 | + <small>{{ bulletin.filename }}</small> | |
132 | + {% else %} | |
133 | + {% trans 'Click or drop the .xls file with the indicators data' %}<br /> | |
134 | + | |
135 | + <small>{% trans 'The file could not exceed 1MB.' %}</small> | |
136 | + {% endif %} | |
137 | + </div> | |
138 | + | |
139 | + <span id="helpBlock" class="help-block">{{ form.indicators.help_text }}</span> | |
140 | + | |
141 | + {% if form.indicators.errors %} | |
142 | + <div class="alert alert-danger alert-dismissible" role="alert"> | |
143 | + <button type="button" class="close" data-dismiss="alert" aria-label="Close"> | |
144 | + <span aria-hidden="true">×</span> | |
145 | + </button> | |
146 | + <ul> | |
147 | + {% for error in form.indicators.errors %} | |
148 | + <li>{{ error }}</li> | |
149 | + {% endfor %} | |
150 | + </ul> | |
151 | + </div> | |
152 | + {% endif %} | |
153 | + </div> | |
154 | + | |
113 | 155 | |
114 | 156 | |
115 | 157 | <div class="form-group{% if form.has_error %} has-error {% endif %} is-fileinput"> | ... | ... |