public static function renderFormFieldByType($f, $values) { $value = isset($values[$f['id']]) ? $values[$f['id']] : ''; $attributes = array(); switch ($f['type']) { case 'file': $html = ''; if ($value > 0) { if ($a = Doctrine_Core::getTable('Attachments')->find($value)) { $html = '<br>' . Attachments::getLink($a) . input_hidden_tag('extra_fields_files[' . $f['id'] . ']', $value) . '<br>' . input_checkbox_tag('extra_fields_files_delete[' . $f['id'] . ']', $value) . ' <label for="extra_fields_files_delete_' . $f['id'] . '">' . __('Delete') . '</label>'; $attributes['class'] = ''; } } return input_file_tag('extra_fields[' . $f['id'] . ']', '', $attributes) . $html; break; case 'number': return input_tag('extra_fields[' . $f['id'] . ']', $value, $attributes); break; case 'text': case 'url': $attributes['size'] = '40'; return input_tag('extra_fields[' . $f['id'] . ']', $value, $attributes); break; case 'textarea': return textarea_tag('extra_fields[' . $f['id'] . ']', $value, $attributes); break; case 'textarea_wysiwyg': if (isset($attributes['class'])) { $attributes['class'] .= ' editor'; } else { $attributes['class'] = 'editor'; } return textarea_tag('extra_fields[' . $f['id'] . ']', $value, $attributes); break; case 'date': if (isset($attributes['class'])) { $attributes['class'] .= ' datepicker'; } else { $attributes['class'] = 'datepicker'; } $attributes['size'] = '11'; return input_tag('extra_fields[' . $f['id'] . ']', $value, $attributes); break; case 'date_range': if (isset($attributes['class'])) { $attributes['class'] .= ' datepicker'; } else { $attributes['class'] = 'datepicker'; } $attributes['size'] = '11'; if (strlen($value) > 0) { $value = explode('|', $value); } else { $value = array('', ''); } return __('From') . ': ' . input_tag('extra_fields[' . $f['id'] . '][from]', $value[0], $attributes) . ' ' . __('To') . ': ' . input_tag('extra_fields[' . $f['id'] . '][to]', $value[1], $attributes); break; case 'date_time': if (isset($attributes['class'])) { $attributes['class'] .= ' datetimepicker'; } else { $attributes['class'] = 'datetimepicker'; } $attributes['size'] = '17'; return input_tag('extra_fields[' . $f['id'] . ']', $value, $attributes); break; case 'date_dropdown': $years = range(date('Y') - 100, date('Y') + 20); $w = new sfWidgetFormDate(array('years' => array_combine($years, $years), 'format' => __('Year') . ':%year% ' . __('Month') . ':%month% ' . __('Day') . ':%day%')); return $w->render('extra_fields[' . $f['id'] . ']', $value, $attributes); break; case 'pull_down': $choices = array(); foreach (explode("\n", $f['default_values']) as $v) { $choices[trim($v)] = trim($v); } return select_tag('extra_fields[' . $f['id'] . ']', $value, array('choices' => $choices), $attributes); break; case 'checkbox': $choices = array(); foreach (explode("\n", $f['default_values']) as $v) { $choices[trim($v)] = trim($v); } return '<div id="checkboxesList' . $f['id'] . '" class="checkboxesList">' . select_tag('extra_fields[' . $f['id'] . ']', explode("\n", $value), array('choices' => $choices, 'expanded' => true, 'multiple' => true), $attributes) . '</div>'; break; case 'radiobox': $choices = array(); foreach (explode("\n", $f['default_values']) as $v) { $choices[trim($v)] = trim($v); } return select_tag('extra_fields[' . $f['id'] . ']', $value, array('choices' => $choices, 'expanded' => true), $attributes); break; } }
echo __('No Reports Found'); } if (count($projects_reports) > 0) { echo '<div style="margin-top: 10px;"><b>' . __('Projects Reports') . '</b><div>'; foreach ($projects_reports as $r) { echo input_checkbox_tag('projects_reports[]', $r->getId(), array('checked' => $r->getDisplayOnHome() == 1 ? true : false)) . ' <label for="projects_reports_' . $r->getId() . '">' . $r->getName() . '</label><br>'; } } if (count($user_reports) > 0) { echo '<div style="margin-top: 10px;"><b>' . __('Tasks Reports') . '</b><div>'; foreach ($user_reports as $r) { echo input_checkbox_tag('user_reports[]', $r->getId(), array('checked' => $r->getDisplayOnHome() == 1 ? true : false)) . ' <label for="user_reports_' . $r->getId() . '">' . $r->getName() . '</label><br>'; } } if (count($tickets_reports) > 0) { echo '<div style="margin-top: 10px;"><b>' . __('Tickets Reports') . '</b><div>'; foreach ($tickets_reports as $r) { echo input_checkbox_tag('tickets_reports[]', $r->getId(), array('checked' => $r->getDisplayOnHome() == 1 ? true : false)) . ' <label for="tickets_reports_' . $r->getId() . '">' . $r->getName() . '</label><br>'; } } if (count($discussions_reports) > 0) { echo '<div style="margin-top: 10px;"><b>' . __('Discussions Reports') . '</b><div>'; foreach ($discussions_reports as $r) { echo input_checkbox_tag('discussions_reports[]', $r->getId(), array('checked' => $r->getDisplayOnHome() == 1 ? true : false)) . ' <label for="discussions_reports_' . $r->getId() . '">' . $r->getName() . '</label><br>'; } } if (count($projects_reports) > 0 or count($user_reports) > 0 or count($tickets_reports) > 0 or count($discussions_reports) > 0) { echo '<br>' . submit_tag(__('Update')); } ?> </form>
echo __('Active?'); ?> </th> <th><?php echo __('Sort Order'); ?> </th> </tr> </thead> <tbody> <?php foreach ($extra_fieldss as $extra_fields) { ?> <tr> <td><?php echo input_checkbox_tag('multiple_selected[]', $extra_fields->getId(), array('class' => 'multiple_selected')); ?> </td> <td><?php echo $lc->action_buttons($extra_fields->getId()); ?> </td> <td><?php echo $extra_fields->getId(); ?> </td> <td><?php echo ExtraFields::getTypeNameByKey($extra_fields->getType()); ?> </td> <td><?php
</div></th> <th><div><?php echo __('Created By'); ?> </div></th> </thead> <tbody> <?php foreach ($tickets_list as $tickets) { ?> <tr> <td><?php echo input_checkbox_tag('tickets[]', $tickets['id']); ?> </td> <td><?php echo $tickets['id']; ?> </td> <?php if ($is_filter['status']) { ?> <td><?php echo app::getArrayNameWithBg($tickets, 'TicketsStatus'); ?> </td> <?php
<?php $form->setDefault('email', base64_decode($sf_request->getCookie('remember_user'))); ?> <form name="loginForm" id="loginForm" action="<?php echo url_for('login/index', true); ?> " method="POST"> <table class="contentTable"> <?php echo $form; ?> <tr> <td></td> <td><?php echo input_checkbox_tag('remember_me', 1, array('checked' => $sf_request->getCookie('remember_me'))) . ' <label for="remember_me">' . __('Remember Me') . '</label>'; ?> </td> </tr> <tr> <td colspan="2" style="padding: 7px 0;"> <input type="submit" value="<?php echo __('Login'); ?> " class="btn" /> </td> </tr> <tr> <td colspan="2"><?php echo link_to(__('Password forgotten?'), 'login/restorePassword'); if (sfConfig::get('app_use_ldap_login')) {
?> </label></th> <td><?php echo input_tag('cfg[app_app_short_name]', sfConfig::get('app_app_short_name'), array('size' => '40')); ?> </td> </tr> <tr> <th><label for="cfg_app_app_logo_file"><?php echo __('Logo'); ?> </label></th> <td><?php echo input_file_tag('cfg_app_app_logo_file') . input_hidden_tag('cfg[app_app_logo]', sfConfig::get('app_app_logo'), array('size' => '40')); if (is_file(sfConfig::get('sf_upload_dir') . '/' . sfConfig::get('app_app_logo'))) { echo '<div>' . sfConfig::get('app_app_logo') . '</div>' . input_checkbox_tag('delete_logo') . ' <label for="delete_logo">' . __('Delete') . '</label>'; } echo '<div><i>' . __('Note: logo might be not looks OK in all skins so you should pick one skin or create your own skin.') . '</i></div>'; ?> </td> </tr> </table> <br> <?php $skins_list = array(); $skinsDir = sfConfig::get('sf_web_dir') . '/css/skins/'; if ($handle = opendir($skinsDir)) { while (false !== ($file = readdir($handle))) { if ($file != "." && $file != ".." && is_dir($skinsDir . $file)) {
<?php foreach ($extr_fields as $v) { $checked = false; if ($sf_request->hasParameter('search_by_extrafields')) { $checked = in_array($v->getId(), $sf_request->getParameter('search_by_extrafields')); } echo input_checkbox_tag('search_by_extrafields[]', $v->getId(), array('checked' => $checked)) . ' <label for="search_by_extrafields_' . $v->getId() . '">' . $v->getName() . '</label><br>'; }
<th width="10"><?php echo input_checkbox_tag('check_all_users_' . $rnd, '', array('class' => 'check_all_users')); ?> </th> <th><b><?php echo __('User'); ?> </b></th> </tr> <?php foreach ($users as $id => $name) { ?> <tr> <td><?php echo input_checkbox_tag('projects[team][]', $id, array('class' => 'rnd' . $rnd . ' projects_team', 'checked' => in_array($id, $in_team))); ?> </td> <td><label for="projects_team_<?php echo $id; ?> "><?php echo $name; ?> </label></td> </tr> <?php } ?> </table>