function imageEditor() { JS::loadjQuery(); JS::lib('jquery/jquery.imgareaselect-*'); JS::lib('imgTools'); $size = getimagesize($this->that->path); return Form::quick(false, __('Save'), new Input(__('Filename'), 'filename', $_POST['filename'] ? $_POST['filename'] : $this->that->basename), new Hidden('cropimgx', $_POST['cropimgx']), new Hidden('cropimgy', $_POST['cropimgy']), new Hidden('cropimgw', $_POST['cropimgw']), new Hidden('cropimgh', $_POST['cropimgh']), new Tabber('img', new Tab(__('Cropping'), '<div id="imgcropper"><img style="float: left" id="originalImage" src="?id=' . $this->that->ID . '&w=400" /><div style="clear: both;"></div></div>'), new Tab(__('Resize'), '<div id="imgresize"><div id="resval" style="clear: right;"><input name="resimgx" id="resimgx" size="4" value="' . $size[0] . '" />x<input name="resimgy" id="resimgy" size="4" value="' . $size[1] . '" /></div></div>'), new Tab(__('Rotate'), new Select(__('Specify rotation (CCW)'), 'imgrot', array('0' => __('None'), '90' => '90 °', '180' => '180 °', '270' => '270 °'), $_REQUEST['imgrot'])))); }
/** * (non-PHPdoc) * @see lib/Page#run() */ function run() { if ($this->saveChanges()) { redirect(-1); } $this->setContent('main', Form::quick(false, __('Save'), $this->medit())); global $Templates; $Templates->render(); }
function run() { global $Templates; if ($this->saveChanges()) { } // redirect($_REQUEST['edit']); $this->setContent('main', Form::quick(false, __('Save'), $this->edit())); $Templates->render(); }
/** * Contains actions and pageview-logic * @return void */ function run() { global $Templates, $USER, $CONFIG, $Controller, $DB; if ($this->saveChanges()) { redirect(array('id' => $this->that->ID, 'saved' => 1)); } global $Templates; $this->setContent('main', Form::quick(false, null, $this->editTab())); $Templates->render(); }
function run() { __autoload('Form'); if ($this->saveChanges()) { redirect(array('id' => $this->that->ID)); } global $Templates; $this->setContent('main', Form::quick(false, null, $this->editTab())); $Templates->render(); }
function run() { global $Templates, $CONFIG; if ($this->saveChanges()) { Flash::queue(__('Your changes were saved'), 'confirmation'); redirect($this->that); } $this->setContent('main', Form::quick(false, __('Save'), new Input(__('Page name'), 'name', $this->Name), new Select(__('Group'), 'interesting_groups', $this->that->groups(), $CONFIG->matrikel->interesting_groups, true))); $Templates->render(); }
function run() { __autoload('Form'); if ($this->saveChanges()) { redirect(array('id' => $this->that->ID)); } global $Templates; $this->setContent('header', __('Edit calendar-viewer settings')); $this->setContent('main', Form::quick(false, null, $this->editTab())); $Templates->admin->render(); }
function run() { global $Templates, $CONFIG, $DB, $Controller; $_REQUEST->setType('flash', 'any'); if ($_REQUEST->valid('flash')) { Flash::create($_REQUEST['flash'] . '_flash_1', $_REQUEST['flash']); } $_REQUEST->setType('addToConfig', 'any'); if ($_REQUEST->valid('addToConfig')) { $CONFIG->Frontpage->setType('NewsItems', 'text'); $CONFIG->Frontpage->setDescription('NewsItems', 'Number of news items displayed'); $CONFIG->Frontpage->NewsItems = 5; } $content = ''; $newsNum = $CONFIG->Frontpage->NewsItems; if (!is_numeric($newsNum) || $newsNum < 1 || $newsNum > 30) { $newsNum = 5; } $newsNum = 3; /* Retrive news objects */ if ($newsNum > 0) { $newsObj = Flow::retrieve('News', $newsNum, false, false, false, 0, true); } /* <<< New flowing design >>> */ foreach ($newsObj as $news) { $content .= $news->display('new'); } $mlForm = new Form('mailListForm'); $ml = $mlForm->quick(null, __('Send'), new Input('Email', 'mlmail')); $r = '<div id="intro"> <div class="lcol"><img src="' . $Templates->current->webdir . 'images/intro/IMG_0817.jpg" width="400" alt="Lihkoren" /></div> <div class="rcol"><p>Linköpings Studentsångarförening Lihkören är en manskör som verkar vid Linköpings universitet, under ledning av director musices Hans Lundgren. Kören bildades 1972 av studenter vid dåvarande Linköpings Högskola. Lihkören uttalas som det smakar. Kören framför främst nordisk och europeisk musik, delvis från den traditionella manskörsrepertoaren men även nyskriven musik. Glimten i ögat och den goda kontakten med publiken präglar konserterna.<br>Väl mött.</p></div> <img src="' . $Templates->current->webdir . 'images/rand_top.png" alt="pagesplit" class="pagesplit" /> </div> <div id="fbottom"> <div class="lcol"> <div class="lbox coming"><h1 class="icn-hdr"><span class="icn icn-coming"></span>' . __('Kommande händelser') . '</h1> <p>Kommande händelser i kalendern.</p> </div> <div class="lbox maillist"><h1 class="icn-hdr"><span class="icn icn-mail"></span>' . __('Nyhetsbrev') . '</h1> <p class="pre">Vill du få information om kommande konserter och andra arrangemang med Lihkören?</p> ' . $ml . ' <p>Du kommer då att få ett e-brev som du måste svara på för att bekräfta att du vill att informationen ska skickas till dig</p> </div> </div> <div class="rbox news"><h1 class="icn-hdr"><span class="icn icn-news"></span>' . __('Nyheter') . '</h1>' . $content . '<a href="/flowView?q=News">' . __('View all news') . '</a></div> </div>'; /* dump($Templates->current->webdir); */ $this->setContent('main', $r); $Templates->render(); }
function schematicEditor() { global $DB, $CONFIG, $USER, $Controller; $bookItems = $DB->booking_items->asArray(false, 'id,parent,place', false, false, 'place ASC'); $Controller->get(arrayExtract($bookItems, 'id')); foreach ($bookItems as &$bi) { $bi['item'] = $Controller->{$bi['id']}; } $inflatedBookItems = inflate($bookItems); $content = self::renderItems($inflatedBookItems); if ($this->mayI(EDIT)) { $content .= Form::quick(null, null, new Input(__('Object name'), 'oname'), new Select(__('Parent'), 'oparent', $inflatedBookItems, false, false, __('None'))); } $this->setContent('main', $content); }
function selectLanguage() { global $CONFIG; JS::loadjQuery(false); JS::raw("\$(function(){\$('#" . idfy('user_settings::language') . "').change(function(e){\$(e.target).closest('form').submit();})});"); echo Form::quick(url(null, true), false, new Select(false, 'user_settings::language', google::languages($CONFIG->Site->languages), @$_COOKIE['user_settings::language'], false, __('Choose language'))); }
function calendarForm() { return Form::quick(null, null, new Input(__('Calendar name'), 'calendarname')); }
function attendanceForm() { global $USER; $att = $this->getAttendance(); return Form::quick(false, null, new RadioSet(__('Attending'), 'attending', array('yes' => __('Yes'), 'no' => __('No')), @$att[$USER->ID]['attending']), new Input(__('Comment'), 'comment', @$att[$USER->ID]['comment'])); }
/** * Displays the page form member administration of a group * @param integer $group The group which to edit * @return string */ private function memberTab() { global $DB, $Controller, $USER; $r = ''; $volpre = $this->that->GroupType == 'volpre'; if (!$this->that) { return; } $_REQUEST->setType('nGM', 'anything'); $_REQUEST->setType('keyword', 'string'); $_REQUEST->setType('group_action', '#(copy|reset)_members#'); $_REQUEST->setType('gid', 'numeric'); $_REQUEST->setType('copy_to_group', 'numeric'); $gform = new Form('nGM', url(null, array('edit', 'with', 'adm')), false); $groups = $DB->{'spine,metadata'}->asList(array('spine.class' => 'Group', 'metadata.field' => 'Name', 'metadata.metameta' => $USER->settings['language'], 'spine.id!' => array_merge(array($this->that->ID), $this->that->groups(false, 1))), 'spine.id,metadata.value', false, true, 'metadata.value'); $uform = new Form('findUser', url(null, array('edit', 'with', 'adm')), false); $i = 0; $mem = array('', ''); $count = array(0, 0); $res = $DB->group_members->get(array('group' => $this->that->ID)); while ($row = $DB->fetchAssoc($res)) { $o = $Controller->{$row['user']}; ++$count[is_a($o, 'Group')]; $mem[is_a($o, 'Group')] .= '<li class="' . ($i % 2 ? 'odd' : 'even') . '"><span class="fixed-width">' . $o . '</span><div class="tools">' . ($volpre ? icon('small/add', __('Add user to group'), url(array('add' => $row['user']), array('edit', 'with'))) : icon('small/delete', __('Remove user from group'), url(array('rem' => $row['user']), array('edit', 'with')))) . '</div></li>'; $i++; } if ($volpre) { $r .= '<h1>' . __('Note!') . '</h1>' . __('Non-members are displayed for preselected groups!'); } if (!empty($mem[0])) { $r .= '<h2>' . ($volpre ? __('Non-member users') : __('Member users')) . ' (' . $count[0] . ')' . '</h2><ul class="list">' . $mem[0] . '</ul>'; } if (!empty($mem[1])) { $r .= '<h2>' . __('Subgroups') . ' (' . $count[1] . ')' . '</h2><ul class="list">' . $mem[1] . '</ul>'; } $gp = $this->that->groups(true); if (!empty($gp)) { $r .= '<p><h3>' . __('Additionally, this group is a subgroup to the following groups: ') . '</h3>' . join(', ', $gp) . '</p>'; } $group_actions = ''; if (!empty($mem[0]) || !empty($mem[1])) { $available_groups = $Controller->getClass('Group'); propsort($available_groups, 'Name'); $group_actions = new Formsection(__('Group actions'), Form::quick(url(false, array('edit', 'with')), __('Copy members'), new Hidden('group_action', 'copy_members'), new Li(new Select(__('Copy to group'), 'copy_to_group', $available_groups, false, false, __('Choose group')))), Form::quick(url(false, array('edit', 'with')), __('Reset all memberships'), '<h3>Reset membership</h3>', new Hidden('group_action', 'reset_members'))); } return array($r, new Accordion(__('Users'), $uform->collection(new Set(new Li(new Input(__('Find user'), 'keyword', $_REQUEST['keyword']), new Submit(__('Search'))))) . $this->userSearchResults($volpre), __('Groups'), $gform->collection(new Set(new Li(new Select(__('Choose group'), 'add', $groups, false, false, __('Choose group')), new Submit($volpre ? __('Remove') : __('Add')))))), $group_actions); }
function moveForm() { $menu = $this->getMenu(false, false, false); return Form::quick(false, null, '<h2>' . __('Move page') . '</h2><span id="whichpagetomove">' . new Select(false, 'page', $menu, false, false, true) . '</span>', new RadioSet('.. ' . __('as '), 'where', array('child' => __('Child'), 'below' => __('Below'))), new Select('.. ' . __('to'), 'to', $menu, false, false, true)); }
function run() { global $Templates; $this->setContent('main', Form::quick(false, __('Search'), $this->searchForm()) . $this->result()); $Templates->render(); }
/** * Display the page for creation of a new subfolder * @return void */ function newFolder() { return Form::quick(false, __('Create'), new Formsection(__('New folder'), new Input(__('Folder name'), 'fname'))); }
function confirmationForm() { return Form::quick(null, __('Confirm'), new Hidden('confirm', '1')); }
function edit() { return Form::quick(false, false, new Select(__('Flows'), 'flows', Flow::flows(), $this->that->flows, true), new Input(__('Items per page', 'items', $this->that->flows_per_page, 'numeric'))); }