Adding dirname attribute in text field.
Cleaning code by using CodeSniffer.