function show() { if (!$this->editable) { return; } return parent::show(); }
function show() { echo '<script language="javascript" type="text/javascript"> function xed_window_submit (f) { opener.document.forms[f.elements["form_name"].value].elements[f.elements["field_name"].value].value = xed_get_source ("body"); window.close (); return false; } function xed_window_cancel (f) { window.close (); return false; } </script>'; return parent::show(); }
} else { $val = false; } $w =& $form->createWidget($k, $v); if ($val) { $w->setValue($val); } } $sub =& $form->addWidget('msubmit', 'submit_button'); $b1 =& $sub->getButton(); $b1->setValues(intl_get('Save')); $b2 =& $sub->addbutton('submit_button', intl_get('Cancel')); $b2->extra = 'onclick="window.location.href = \'' . site_prefix() . '/index/usradm-applications-action\'; return false"'; if ($form->invalid($cgi)) { $form->setValues($cgi); echo $form->show(); } else { $vals = $form->getValues(); foreach ($vals as $k => $v) { if ($k == 'appname' || $k == 'submit_button') { continue; } if (isset($v)) { $settings[$k]['value'] = $v; } } loader_import('saf.File'); if (!file_overwrite(getcwd() . '/inc/app/' . $parameters['appname'] . '/conf/settings.ini.php', ini_write($settings))) { die('Error writing to file: inc/app/' . $parameters['appname'] . '/conf/settings.ini.php'); } echo '<p>' . intl_get('Application settings saved.') . ' <a href="' . site_prefix() . '/index/usradm-applications-action">' . intl_get('Continue') . '</a></p>';
function show() { return loader_box('cms/user/preferences/level') . parent::show(); }
function editable($path, $types = array(), $template = '', $remember = array()) { global $loader, $cgi, $intl; $loader->import('saf.MailForm'); $form = new MailForm(); if (!empty($template)) { $form->template = $template; } $res = $this->doc->query($path); $res = array_shift($res); if (!is_object($res)) { $this->error = $this->doc->error; return false; } $row = $res->makeObj(); foreach (get_object_vars($row) as $key => $value) { if ($key == 'attrs') { continue; } if (isset($types[$key])) { $type = $types[$key]; } else { $type = 'text'; } $w =& $form->addWidget($type, $key); $w->setValue($value); } foreach ($remember as $rem) { $w =& $form->addWidget('hidden', $rem); $w->setValue($cgi->{$rem}); } $w =& $form->addWidget('msubmit', 'submit_button'); $b =& $w->getButton(); $b->setValues($intl->get('Update')); $b =& $w->addButton('submit_button', $intl->get('Cancel')); $b->extra = "onclick='window.history.go (-1); return false'"; if ($form->invalid($cgi)) { $form->setValues($cgi); return $form->show(); } else { $form->setValues($cgi); $vals = $form->getValues(); return $vals; } }
function show() { $out = '<h2>' . intl_get('Post a Comment') . '</h2>'; $out .= parent::show(); return $out; }