function Reception(options){var self=this;var attachContainer;function construct(){Widget.prototype.constructor.call(self,options);attachContainer=self.element(' #reception-attach-container');self.element().on('keyup',function(){self.checkFields();});self.element(' input[name=confirm_pers_date]').on('change',function(){self.checkFields();});}self.checkFields=function(){var f=self.element(' input[name=f]');var i=self.element(' input[name=i]');var address=self.element(' input[name=address]');var email=self.element(' input[name=email]');var personal=self.element(' input[name=confirm_pers_date]');var captcha=self.element(' input[name=captcha]');var message=self.element(' textarea[name=message]');var button=self.element(' button[type=submit]');if(cleanVal(f)!=''&&cleanVal(i)!=''&&(cleanVal(email)!=''||cleanVal(address)!='')&&cleanVal(captcha)!=''&&personal.prop('checked')&&cleanVal(message)!=''){button.addClass('m-primary').removeAttr('disabled');}else{button.removeClass('m-primary').attr('disabled','disabled');}};self.addFileRow=function(){var sourceRow=attachContainer.find('div:first-child').clone();sourceRow.prependTo(attachContainer);if(sourceRow.not('visible')){sourceRow.show();}};self.dropFileRow=function(target){var totalRows=attachContainer.children('div').length;$J(target).parent('div')[(totalRows>1)?"remove":"hide"]();};function cleanVal(element){return $(element).val().trim();}construct();}Reception.extendsClass(Widget);