update new offer form
This commit is contained in:
		
							parent
							
								
									eaebcaad57
								
							
						
					
					
						commit
						75142b9347
					
				
					 2 changed files with 16 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -19,3 +19,10 @@ import '@fortawesome/fontawesome-free/js/brands'
 | 
			
		|||
 | 
			
		||||
// Friendly captcha
 | 
			
		||||
import "friendly-challenge/widget";
 | 
			
		||||
 | 
			
		||||
// Dsiplay Filename when uploading
 | 
			
		||||
document.querySelector('.custom-file-input').addEventListener('change',function(e){
 | 
			
		||||
    var fileName = document.getElementById("offering_form_photo").files[0].name;
 | 
			
		||||
    var nextSibling = e.target.nextElementSibling
 | 
			
		||||
    nextSibling.innerText = fileName
 | 
			
		||||
})
 | 
			
		||||
| 
						 | 
				
			
			@ -8,5 +8,12 @@
 | 
			
		|||
    {% endfor %}
 | 
			
		||||
 | 
			
		||||
    <h1 class="mb-3">Add new offering</h1>
 | 
			
		||||
    {{ form(offering_form) }}
 | 
			
		||||
    {{ form_start(offering_form) }}
 | 
			
		||||
        {{ form_row(offering_form.title) }}
 | 
			
		||||
        {{ form_row(offering_form.zipCode) }}
 | 
			
		||||
        {{ form_row(offering_form.description) }}
 | 
			
		||||
        {{ form_row(offering_form.photo, {
 | 
			
		||||
            label: 'Choose file'
 | 
			
		||||
        }) }}
 | 
			
		||||
    {{ form_end(offering_form) }}
 | 
			
		||||
{% endblock %}
 | 
			
		||||
		Reference in a new issue