* @package transfer * @link https://www.zentao.net */ namespace zin; $this->app->loadLang('file'); set::title($lang->transfer->exportTemplate); form ( set::target('_self'), on::submit('setDownloading'), formGroup ( set::label($lang->transfer->num), set::name('num'), set::type('number'), set::value(10), ), formGroup ( set::label($lang->file->extension), set::name('fileType'), set::value('xlsx'), set::control('picker'), set::items(array('xlsx' => 'xlsx', 'xls' => 'xls')), ), set::actions(array('submit')), ); js ( << -1) return true; // Opera don't support, omit it. $.cookie.set('downloading', 0); time = setInterval(function() { if($.cookie.get('downloading') == 1) { $('.modal .modal-actions .close')[0].click(); $.cookie.set('downloading', null); clearInterval(time); } }, 300); return true; } JAVASCRIPT ); render('modalDialog');