/** * Get edit file form. * * @param SplFileInfo $file * @return Curry_Form */ protected function getEditForm(SplFileInfo $file) { $content = file_get_contents($file->getPathname()); $eol = Helper::getStringEol($content); $form = new Curry_Form(array('action' => url('', $_GET), 'method' => 'post', 'class' => 'ctrlsave ajaxsubmit', 'elements' => array('eol' => array('hidden', array('value' => urlencode($eol))), 'content' => array('codeMirror', array('label' => 'Content', 'value' => $content, 'cols' => 40, 'rows' => 25)), 'save' => array('submit', array('class' => 'btn btn-large', 'label' => 'Save'))))); return $form; }