Commit 2f1fd9b0 authored by Matthias Larisch's avatar Matthias Larisch

Replace more Func/ViewUtils

parent a9f385be
......@@ -14,9 +14,15 @@ class XhrDialog
private $onclose;
private $onopen;
private $classnames;
private $v_utils;
private $func;
public function __construct($title = false)
{
global $g_view_utils;
$this->v_utils = $g_view_utils;
global $g_func;
$this->func = $g_func;
$this->id = 'd-' . uniqid();
$this->buttons = array();
$this->options = array();
......@@ -135,7 +141,7 @@ class XhrDialog
{
$in_id = $this->id . '-' . $id;
$this->addContent(v_input_wrapper($this->func->s($id . '-desc'), '
$this->addContent($this->v_utils->v_input_wrapper($this->func->s($id . '-desc'), '
<span id="' . $in_id . '"><i class="fa fa-image"></i> ' . $this->func->s($id . '-choose') . '</span>
<input class="input" type="hidden" name="filename" id="' . $in_id . '-filename" value="" />
<div class="attach-preview" style="float:right;">
......
......@@ -48,7 +48,7 @@ class ApplicationControl extends Control
$this->func->addBread('Bewerbung von ' . $application['name'], '');
$this->func->addContent($this->view->application($application));
$this->func->addContent(v_field(
$this->func->addContent($this->v_utils->v_field(
$this->wallposts('application', $application['id']),
'Status-Notizen'
));
......
......@@ -107,7 +107,7 @@ class BasketView extends View
}
}
} else {
$page->addSectionRight(v_info('Für detailierte Infos musst Du Dich einloggen!', 'Hinweis!') . '<div>
$page->addSectionRight($this->v_utils->v_info('Für detailierte Infos musst Du Dich einloggen!', 'Hinweis!') . '<div>
<a class="button button-big" href="#" onclick="ajreq(\'login\',{app:\'login\'});return false;">Einloggen</a>
</div>', false, array('wrapper' => false));
}
......
......@@ -47,7 +47,7 @@ class BlogControl extends Control
$out .= $this->view->newsListItem($n);
}
$this->func->addContent(v_field($out, $this->func->s('news')));
$this->func->addContent($this->v_utils->v_field($out, $this->func->s('news')));
$this->func->addContent($this->view->pager($page));
} elseif ($page > 1) {
$this->func->go('/?page=blog');
......@@ -76,7 +76,7 @@ class BlogControl extends Control
$this->func->info($this->func->s('blog_entry_empty'));
}
$this->func->addContent(v_field(v_menu(array(
$this->func->addContent($this->v_utils->v_field($this->v_utils->v_menu(array(
array(
'href' => '/?page=blog&sub=add',
'name' => $this->func->s('new_article')
......@@ -94,7 +94,7 @@ class BlogControl extends Control
$this->func->addTitle($post['name']);
$this->func->addBread($post['name'], '/?page=blog&post=' . (int)$post['id']);
$this->func->addContent($this->view->topbar($post['name'], $this->func->niceDate($post['time_ts'])));
$this->func->addContent(v_field($post['body'], $post['name'], array('class' => 'ui-padding')));
$this->func->addContent($this->v_utils->v_field($post['body'], $post['name'], array('class' => 'ui-padding')));
}
}
}
......@@ -120,7 +120,7 @@ class BlogControl extends Control
$this->func->addContent($this->view->blog_entry_form($bezirke, true));
$this->func->addContent(v_field(v_menu(array(
$this->func->addContent($this->v_utils->v_field($this->v_utils->v_menu(array(
$this->func->pageLink('blog', 'back_to_overview')
)), $this->func->s('actions')), CNT_LEFT);
} else {
......@@ -159,7 +159,7 @@ class BlogControl extends Control
$this->func->addContent($this->view->blog_entry_form($bezirke));
$this->func->addContent(v_field(v_menu(array(
$this->func->addContent($this->v_utils->v_field($this->v_utils->v_menu(array(
$this->func->pageLink('blog', 'back_to_overview')
)), $this->func->s('actions')), CNT_LEFT);
} else {
......
......@@ -75,7 +75,7 @@ class BlogView extends View
} else {
$title = $this->func->s('edit_article');
global $g_data;
$this->func->addContent(v_field(
$this->func->addContent($this->v_utils->v_field(
v_activeSwitcher('blog_entry', $_GET['id'], $g_data['active']),
'Status',
array('class' => 'ui-padding')
......@@ -98,7 +98,7 @@ class BlogView extends View
$title,
array('class' => 'ui-padding')
),
v_field(v_form_tinymce('body', array('nowrapper' => true, 'public_content' => true)), 'Inhalt')
v_field($this->v_utils->v_form_tinymce('body', array('nowrapper' => true, 'public_content' => true)), 'Inhalt')
));
}
}
......@@ -33,7 +33,7 @@ class ContentControl extends Control
$this->func->addContent($this->content_form());
$this->func->addContent(v_field(v_menu(array(
$this->func->addContent($this->v_utils->v_field($this->v_utils->v_menu(array(
$this->func->pageLink('content', 'back_to_overview')
)), $this->func->s('actions')), CNT_RIGHT);
} elseif ($id = $this->func->getActionId('delete')) {
......@@ -52,7 +52,7 @@ class ContentControl extends Control
$this->func->addContent($this->content_form());
$this->func->addContent(v_field(v_menu(array(
$this->func->addContent($this->v_utils->v_field($this->v_utils->v_menu(array(
$this->func->pageLink('content', 'back_to_overview')
)), $this->func->s('actions')), CNT_RIGHT);
} elseif ($id = $this->func->getActionId('view')) {
......@@ -83,12 +83,12 @@ class ContentControl extends Control
array('name' => $this->func->s('actions'), 'sort' => false, 'width' => 50)
), $rows);
$this->func->addContent(v_field($table, 'Öffentliche Webseiten bearbeiten'));
$this->func->addContent($this->v_utils->v_field($table, 'Öffentliche Webseiten bearbeiten'));
} else {
$this->func->info($this->func->s('content_empty'));
}
$this->func->addContent(v_field(v_menu(array(
$this->func->addContent($this->v_utils->v_field($this->v_utils->v_menu(array(
array('href' => '/?page=content&a=neu', 'name' => $this->func->s('neu_content'))
)), 'Aktionen'), CNT_RIGHT);
}
......@@ -251,7 +251,7 @@ class ContentControl extends Control
$title,
array('class' => 'ui-padding')
),
v_field(v_form_tinymce('body', array('filemanager' => true, 'public_content' => true, 'nowrapper' => true)), 'Inhalt')
v_field($this->v_utils->v_form_tinymce('body', array('filemanager' => true, 'public_content' => true, 'nowrapper' => true)), 'Inhalt')
), array('submit' => $this->func->s('save')));
}
......
......@@ -227,16 +227,6 @@ class EmailControl extends Control
{
$out = '';
/*
* [0] => Array
(
[id] => 4
[name] => asdas
[message] => <p>asdasf</p>
[zeit] => 2013-09-03 22:12:59
[anz] => 1
)
*/
$recip = $this->model->qCol('
SELECT CONCAT(fs.name," ",fs.nachname)
FROM `' . PREFIX . 'email_status` e,
......
......@@ -40,7 +40,7 @@ class EventControl extends Control
if ($event['invites']) {
$this->func->addContent($this->view->invites($event['invites']), CNT_RIGHT);
}
$this->func->addContent(v_field($this->wallposts('event', $event['id']), 'Pinnwand'));
$this->func->addContent($this->v_utils->v_field($this->wallposts('event', $event['id']), 'Pinnwand'));
} elseif (!isset($_GET['sub'])) {
$this->func->go('/?page=dashboard');
}
......
......@@ -140,7 +140,7 @@ class EventView extends View
$public_el = $this->v_utils->v_input_wrapper('Ist die Veranstaltung öffentlich?', '<label><input id="public" type="checkbox" name="public" value="1"' . $chk . ' /> Ja die Veranstaltung ist Öffentlich</label>');
}
return $this->v_utils->v_field(v_form('eventsss', array(
return $this->v_utils->v_field($this->v_utils->v_form('eventsss', array(
$public_el,
$bezirkchoose,
v_form_text('name', array('required' => true)),
......@@ -208,7 +208,7 @@ class EventView extends View
);
}
return v_field($this->menu($menu), '<i class="fa fa-gear"></i> ' . $this->func->s('event_options'));
return $this->v_utils->v_field($this->menu($menu), '<i class="fa fa-gear"></i> ' . $this->func->s('event_options'));
}
public function eventTop($event)
......@@ -253,27 +253,27 @@ class EventView extends View
$icons = $this->fsIcons($invites['accepted']);
if (!$this->func->isMob() && count($invites['accepted']) > 20) {
$icons = v_scroller($icons, 200);
$icons = $this->v_utils->v_scroller($icons, 200);
}
$out .= v_field($icons, '' . count($invites['accepted']) . ' sind dabei');
$out .= $this->v_utils->v_field($icons, '' . count($invites['accepted']) . ' sind dabei');
}
if (!empty($invites['maybe'])) {
$icons = $this->fsIcons($invites['maybe']);
if (!$this->func->isMob() && count($invites['maybe']) > 20) {
$icons = v_scroller($icons, 200);
$icons = $this->v_utils->v_scroller($icons, 200);
}
$out .= v_field($icons, '' . count($invites['maybe']) . ' kommen vielleicht');
$out .= $this->v_utils->v_field($icons, '' . count($invites['maybe']) . ' kommen vielleicht');
}
if (!empty($invites['invited'])) {
$icons = $this->fsIcons($invites['invited']);
if (!$this->func->isMob() && count($invites['invited']) > 20) {
$icons = v_scroller($icons, 200);
$icons = $this->v_utils->v_scroller($icons, 200);
}
$out .= v_field($icons, '' . count($invites['invited']) . ' Einladungen');
$out .= $this->v_utils->v_field($icons, '' . count($invites['invited']) . ' Einladungen');
}
return $out;
......@@ -281,6 +281,6 @@ class EventView extends View
public function event($event)
{
return v_field('<p>' . nl2br($this->func->autolink($event['description'])) . '</p>', 'Beschreibung', array('class' => 'ui-padding'));
return $this->v_utils->v_field('<p>' . nl2br($this->func->autolink($event['description'])) . '</p>', 'Beschreibung', array('class' => 'ui-padding'));
}
}
......@@ -37,7 +37,7 @@ class EventXhr extends Control
if ($this->model->setInviteStatus($_GET['id'], 1)) {
$dialog = new XhrDialog();
$dialog->setTitle('Einladung');
$dialog->addContent(v_info('Lieben Dank! Du hast die Einladung angenommen.'));
$dialog->addContent($this->v_utils->v_info('Lieben Dank! Du hast die Einladung angenommen.'));
$dialog->addButton('Zum Event', 'goTo(\'/?page=event&id=' . (int)$_GET['id'] . '\');');
$dialog->addAbortButton();
......@@ -50,7 +50,7 @@ class EventXhr extends Control
if ($this->model->setInviteStatus($_GET['id'], 2)) {
$dialog = new XhrDialog();
$dialog->setTitle('Einladung');
$dialog->addContent(v_info('Lieben Dank! Schön, dass Du vielleicht dabei bist.'));
$dialog->addContent($this->v_utils->v_info('Lieben Dank! Schön, dass Du vielleicht dabei bist.'));
$dialog->addButton('Zum Event', 'goTo(\'/?page=event&id=' . (int)$_GET['id'] . '\');');
$dialog->addAbortButton();
......
......@@ -114,7 +114,7 @@ class FairTeilerControl extends Control
if ($fairteiler = $this->model->listFairteiler($this->bezirk_id)) {
$this->func->addContent($this->view->listFairteiler($fairteiler));
} else {
$this->func->addContent(v_info($this->func->s('no_fairteiler_available')));
$this->func->addContent($this->v_utils->v_info($this->func->s('no_fairteiler_available')));
}
$this->func->addContent($this->view->ftOptions($this->bezirk_id), CNT_RIGHT);
}
......@@ -191,7 +191,7 @@ class FairTeilerControl extends Control
$this->func->addContent(
$this->view->fairteilerHead() . '
<div>
' . v_info('Beachte, dass Deine Beiträge auf der Fair-Teiler Pinnwand öffentlich einsehbar sind.', 'Hinweis!') . '
' . $this->v_utils->v_info('Beachte, dass Deine Beiträge auf der Fair-Teiler Pinnwand öffentlich einsehbar sind.', 'Hinweis!') . '
</div>
<div class="ui-widget ui-widget-content ui-corner-all margin-bottom">
' . $this->wallposts('fairteiler', $this->fairteiler['id']) . '
......@@ -240,7 +240,7 @@ class FairTeilerControl extends Control
}
$this->func->addContent($this->view->fairteilerForm());
$this->func->addContent(v_menu(array(
$this->func->addContent($this->v_utils->v_menu(array(
array('name' => $this->func->s('back'), 'href' => '/?page=fairteiler&bid=' . (int)$this->bezirk_id . '')
), $this->func->s('options')), CNT_RIGHT);
}
......
......@@ -26,7 +26,7 @@ class FairTeilerView extends View
public function loginToFollow()
{
return v_field(
return $this->v_utils->v_field(
v_info('Wenn Du Dich einloggst kannst Du Dich benachrichtigen lassen bei Updates zu diesem FairTeiler')
. $this->menu(array(array('name' => 'jetzt einloggen', 'click' => 'login();'))),
false
......@@ -49,7 +49,7 @@ class FairTeilerView extends View
$content = '<div class="ft-head ui-corner-bottom"' . $style . '></div>';
return v_field($content, $this->fairteiler['name']);
return $this->v_utils->v_field($content, $this->fairteiler['name']);
}
public function checkFairteiler($ft)
......@@ -85,24 +85,24 @@ class FairTeilerView extends View
*/
$content = '';
if ($ft['pic']) {
$content .= v_input_wrapper('Foto', '<img src="' . $ft['pic']['head'] . '" alt="' . $ft['name'] . '" />');
$content .= $this->v_utils->v_input_wrapper('Foto', '<img src="' . $ft['pic']['head'] . '" alt="' . $ft['name'] . '" />');
}
$content .= v_input_wrapper('Adresse', '
$content .= $this->v_utils->v_input_wrapper('Adresse', '
' . $ft['anschrift'] . '<br />
' . $ft['plz'] . ' ' . $ft['ort']);
$content .= v_input_wrapper('Beschreibung', $ft['desc']);
$content .= $this->v_utils->v_input_wrapper('Beschreibung', $ft['desc']);
$content .= v_input_wrapper('Hinzugefügt am', date('d.m.Y', $ft['time_ts']));
$content .= v_input_wrapper('Hinzugefügt von', '<a href="#" onclick="profile(' . (int)$ft['fs_id'] . ');">' . $ft['fs_name'] . ' ' . $ft['fs_nachname'] . '</a>');
$content .= $this->v_utils->v_input_wrapper('Hinzugefügt am', date('d.m.Y', $ft['time_ts']));
$content .= $this->v_utils->v_input_wrapper('Hinzugefügt von', '<a href="#" onclick="profile(' . (int)$ft['fs_id'] . ');">' . $ft['fs_name'] . ' ' . $ft['fs_nachname'] . '</a>');
return v_field($content, $ft['name'] . ' freischalten', array('class' => 'ui-padding'));
return $this->v_utils->v_field($content, $ft['name'] . ' freischalten', array('class' => 'ui-padding'));
}
public function address()
{
return v_field(
return $this->v_utils->v_field(
v_input_wrapper('Anschrift', $this->fairteiler['anschrift']) .
v_input_wrapper('PLZ / Ort', $this->fairteiler['plz'] . ' ' . $this->fairteiler['ort']),
'Adresse',
......@@ -123,7 +123,7 @@ class FairTeilerView extends View
$this->func->setEditData($data);
$title = $this->func->sv('edit_fairteiler_name', $this->fairteiler['name']);
$tagselect = v_form_tagselect('bfoodsaver', array('data' => $data['bfoodsaver_values']));
$tagselect = $this->v_utils->v_form_tagselect('bfoodsaver', array('data' => $data['bfoodsaver_values']));
$this->func->addJs('
$("#fairteiler-form").submit(function(ev){
if($("#bfoodsaver input[type=\'hidden\']").length == 0)
......@@ -135,7 +135,7 @@ class FairTeilerView extends View
');
}
return v_field(v_form('fairteiler', array(
return $this->v_utils->v_field($this->v_utils->v_form('fairteiler', array(
v_form_select('bezirk_id', array('values' => $this->bezirke, 'required' => true)),
v_form_text('name', array('required' => true)),
v_form_textarea('desc', array('desc' => $this->func->s('desc_desc'), 'required' => true)),
......@@ -151,7 +151,7 @@ class FairTeilerView extends View
public function options($items)
{
return v_menu($items, 'Optionen');
return $this->v_utils->v_menu($items, 'Optionen');
}
public function followHidden()
......@@ -182,7 +182,7 @@ class FairTeilerView extends View
return '
<div id="follow-hidden">
' . v_form_radio('infotype', array('desc' => $this->func->s('infotype_desc'), 'values' => array(
' . $this->v_utils->v_form_radio('infotype', array('desc' => $this->func->s('infotype_desc'), 'values' => array(
array('id' => 1, 'name' => $this->func->s('infotype_email')),
array('id' => 2, 'name' => $this->func->s('infotype_alert'))
))) . '
......@@ -195,10 +195,10 @@ class FairTeilerView extends View
$out = '';
if (!empty($this->follower['verantwortlich'])) {
$out .= v_field($this->fsAvatarList($this->follower['verantwortlich'], array('scroller' => false)), 'verantwortliche Foodsaver');
$out .= $this->v_utils->v_field($this->fsAvatarList($this->follower['verantwortlich'], array('scroller' => false)), 'verantwortliche Foodsaver');
}
if (!empty($this->follower['follow'])) {
$out .= v_field($this->fsAvatarList($this->follower['follow']), $this->func->s('follower'));
$out .= $this->v_utils->v_field($this->fsAvatarList($this->follower['follow']), $this->func->s('follower'));
}
return $out;
......@@ -206,7 +206,7 @@ class FairTeilerView extends View
public function desc()
{
return v_field('<p>' . nl2br($this->fairteiler['desc'] . '</p>'), $this->func->s('desc'), array('class' => 'ui-padding'));
return $this->v_utils->v_field('<p>' . nl2br($this->fairteiler['desc'] . '</p>'), $this->func->s('desc'), array('class' => 'ui-padding'));
}
public function listFairteiler($bezirke)
......@@ -234,7 +234,7 @@ class FairTeilerView extends View
$out .= '
</ul>';
$content .= v_field($out, count($bezirk['fairteiler']) . ' Fair-Teiler in ' . $bezirk['name']);
$content .= $this->v_utils->v_field($out, count($bezirk['fairteiler']) . ' Fair-Teiler in ' . $bezirk['name']);
}
if ($this->bezirk_id > 0) {
......@@ -255,7 +255,7 @@ class FairTeilerView extends View
$items[] = array('name' => 'Fair-Teiler vorschlagen', 'href' => '/?page=fairteiler&bid=' . (int)$bezirk_id . '&sub=addFt');
}
return v_menu($items, 'Optionen');
return $this->v_utils->v_menu($items, 'Optionen');
}
public function publicFairteilerMap($fairteiler)
......
......@@ -69,7 +69,7 @@ class FoodsaverControl extends Control
$this->func->addContent(picture_box(), CNT_RIGHT);
$this->func->addContent(v_field(v_menu(array(
$this->func->addContent($this->v_utils->v_field($this->v_utils->v_menu(array(
$this->func->pageLink('foodsaver', 'back_to_overview')
)), $this->func->s('actions')), CNT_RIGHT);
......@@ -78,7 +78,7 @@ class FoodsaverControl extends Control
}
}
} else {
$this->func->addContent(v_info('Du hast leider keine Berechtigung für diesen Bezirk'));
$this->func->addContent($this->v_utils->v_info('Du hast leider keine Berechtigung für diesen Bezirk'));
}
}
......@@ -133,7 +133,7 @@ function foodsaver_form($title = 'Foodsaver')
$position = '';
if (S::may('orga')) {
$position = v_form_text('position');
$position = $this->v_utils->v_form_text('position');
$options = array(
'values' => array(
array('id' => 1, 'name' => 'ist im Bundesweiten Orgateam dabei')
......@@ -144,8 +144,8 @@ function foodsaver_form($title = 'Foodsaver')
$options['checkall'] = true;
}
$orga = v_form_checkbox('orgateam', $options);
$orga .= v_form_select('rolle', array(
$orga = $this->v_utils->v_form_checkbox('orgateam', $options);
$orga .= $this->v_utils->v_form_select('rolle', array(
'values' => array(
array('id' => 0, 'name' => 'Foodsharer/in'),
array('id' => 1, 'name' => 'Foodsaver/in (FS)'),
......@@ -193,9 +193,9 @@ function foodsaver_form($title = 'Foodsaver')
$bezirk = $db->getBezirk($g_data['bezirk_id']);
}
$bezirkchoose = v_bezirkChooser('bezirk_id', $bezirk);
$bezirkchoose = $this->v_utils->v_bezirkChooser('bezirk_id', $bezirk);
return v_quickform($title, array(
return $this->v_utils->v_quickform($title, array(
$bezirkchoose,
$orga,
v_form_text('name', array('required' => true)),
......@@ -230,13 +230,13 @@ function picture_box()
$photo = $db->getPhoto($_GET['id']);
if (!(file_exists('images/thumb_crop_' . $photo))) {
$p_cnt = v_photo_edit('img/portrait.png', (int)$_GET['id']);
$p_cnt = $this->v_utils->v_photo_edit('img/portrait.png', (int)$_GET['id']);
} else {
$p_cnt = v_photo_edit('images/thumb_crop_' . $photo, (int)$_GET['id']);
//$p_cnt = v_photo_edit('img/portrait.png');
$p_cnt = $this->v_utils->v_photo_edit('images/thumb_crop_' . $photo, (int)$_GET['id']);
//$p_cnt = $this->v_utils->v_photo_edit('img/portrait.png');
}
return v_field($p_cnt, 'Dein Foto');
return $this->v_utils->v_field($p_cnt, 'Dein Foto');
}
function u_delete_account()
......@@ -264,13 +264,13 @@ function u_delete_account()
<div style="text-align:center;margin-bottom:10px;">
<span id="delete-account">' . $this->func->s('delete_now') . '</span>
</div>
' . v_info($this->func->s('posible_restore_account'), $this->func->s('reference'));
' . $this->v_utils->v_info($this->func->s('posible_restore_account'), $this->func->s('reference'));
$this->func->addHidden('
<div id="delete-account-confirm">
' . v_info($this->func->s('delete_account_confirm_msg')) . '
' . $this->v_utils->v_info($this->func->s('delete_account_confirm_msg')) . '
</div>
');
return v_field($content, $this->func->s('delete_account'), array('class' => 'ui-padding'));
return $this->v_utils->v_field($content, $this->func->s('delete_account'), array('class' => 'ui-padding'));
}
......@@ -8,16 +8,16 @@ class FoodsaverView extends View
{
public function addFoodsaver($bezirk)
{
$cnt = v_form_tagselect('search_name', array('required' => true, 'xhr' => 'recip'));
$cnt = $this->v_utils->v_form_tagselect('search_name', array('required' => true, 'xhr' => 'recip'));
$cnt .= v_input_wrapper('', '<span class="button" onclick="fsapp.addFoodsaver();">' . $this->func->s('add') . '</span>');
$cnt .= $this->v_utils->v_input_wrapper('', '<span class="button" onclick="fsapp.addFoodsaver();">' . $this->func->s('add') . '</span>');
$cnt .= '
<div id="appdata" style="display:none">
<input type="hidden" name="bid" class="bid" value="' . $bezirk['id'] . '" />
</div>';
return v_field(
return $this->v_utils->v_field(
$cnt,
'Foodsaver hinzufügen',
......@@ -30,17 +30,17 @@ class FoodsaverView extends View
if ($foodsaver === false) {
return '<div id="fsform"></div>';
} else {
$cnt = v_input_wrapper('Foto', '<a class="avatarlink corner-all" href="#" onclick="profile(' . (int)$foodsaver['id'] . ');return false;"><img style="display:none;" class="corner-all" src="' . $this->func->img($foodsaver['photo'], 'med') . '" /></a>');
$cnt .= v_input_wrapper('Name', $foodsaver['name'] . ' ' . $foodsaver['nachname']);
$cnt .= v_input_wrapper('Rolle', $this->func->s('rolle_' . $foodsaver['rolle'] . '_' . $foodsaver['geschlecht']));
$cnt = $this->v_utils->v_input_wrapper('Foto', '<a class="avatarlink corner-all" href="#" onclick="profile(' . (int)$foodsaver['id'] . ');return false;"><img style="display:none;" class="corner-all" src="' . $this->func->img($foodsaver['photo'], 'med') . '" /></a>');
$cnt .= $this->v_utils->v_input_wrapper('Name', $foodsaver['name'] . ' ' . $foodsaver['nachname']);
$cnt .= $this->v_utils->v_input_wrapper('Rolle', $this->func->s('rolle_' . $foodsaver['rolle'] . '_' . $foodsaver['geschlecht']));
$cnt .= v_input_wrapper('Letzter Login', $foodsaver['last_login']);
$cnt .= $this->v_utils->v_input_wrapper('Letzter Login', $foodsaver['last_login']);
$cnt .= v_input_wrapper('Optionen', '
$cnt .= $this->v_utils->v_input_wrapper('Optionen', '
<span class="button" onclick="fsapp.delfromBezirk(' . $foodsaver['id'] . ');">Aus Bezirk löschen</span>
');
return v_field($cnt, $foodsaver['name'], array('class' => 'ui-padding'));
return $this->v_utils->v_field($cnt, $foodsaver['name'], array('class' => 'ui-padding'));
}
}
......
......@@ -8,7 +8,7 @@ class GeoCleanView extends View
{
public function rightmenu()
{
return v_menu(array(
return $this->v_utils->v_menu(array(
array(
'name' => 'Alle durchprobieren',
'click' => 'u_goAll();return false;'
......@@ -30,9 +30,9 @@ class GeoCleanView extends View
array('cnt' => '<a href="/?page=foodsaver&a=edit&id=' . $fs['id'] . '" class="button">' . $this->func->s('edit') . '</a> <a href="#" onclick="u_getGeo(' . (int)$fs['id'] . ');return false;" class="button">Koordinaten ermitteln</a>')
);
$this->func->addHidden('
' . v_form_hidden('fs' . $fs['id'] . 'anschrift', $fs['anschrift']) . '
' . v_form_hidden('fs' . $fs['id'] . 'plz', $fs['plz']) . '
' . v_form_hidden('fs' . $fs['id'] . 'stadt', $fs['stadt']) . '
' . $this->v_utils->v_form_hidden('fs' . $fs['id'] . 'anschrift', $fs['anschrift']) . '
' . $this->v_utils->v_form_hidden('fs' . $fs['id'] . 'plz', $fs['plz']) . '
' . $this->v_utils->v_form_hidden('fs' . $fs['id'] . 'stadt', $fs['stadt']) . '
');
}
......@@ -62,7 +62,7 @@ class GeoCleanView extends View
];
}
$out = v_tablesorter([
$out = $this->v_utils->v_tablesorter([
['name' => $this->func->s('name')],
['name' => $this->func->s('fs_count'), 'width' => 120]
], $rows, ['pager' => true]);
......
......@@ -26,7 +26,7 @@ class LoginControl extends Control
$this->func->addBread('Newsletter Abmeldung');
if (isset($_GET['e']) && $this->func->validEmail($_GET['e'])) {
$this->model->update('UPDATE `' . PREFIX . "foodsaver` SET newsletter=0 WHERE email='" . $this->model->safe($_GET['e']) . "'");
$this->func->addContent(v_info('Du wirst nun keine weiteren Newsletter von uns erhalten', 'Erfolg!'));
$this->func->addContent($this->v_utils->v_info('Du wirst nun keine weiteren Newsletter von uns erhalten', 'Erfolg!'));
file_put_contents('../unsubscribe.txt', $_GET['e'] . "\n", FILE_APPEND);
}
}
......
......@@ -9,7 +9,7 @@ class LoginView extends View
{
public function loginForm()
{
return v_form_text('email_adress') .
return $this->v_utils->v_form_text('email_adress') .
v_form_passwd('password') .
v_form_hidden('ismob', '0') .
'<p>
......@@ -102,7 +102,7 @@ class LoginView extends View
<h3>' . $this->func->s('contact_info') . '</h3>
<div class="element-wrapper">
<input placeholder="' . $this->func->s('login_phone') . '" type="text" value="" id="login_phone" name="login_phone" class="input text value" />
' . v_info($this->func->s('login_phone_info')) . '
' . $this->v_utils->v_info($this->func->s('login_phone_info')) . '
</div>
<div class="element-wrapper">
<input placeholder="' . $this->func->s('login_location') . '" type="text" value="" id="login_location" name="login_location" class="input text value" />
......@@ -146,7 +146,7 @@ class LoginView extends View
<div style="clear:both;"></div>
</div>
<div id="joinloader" style="display:none;"><span class="fa fa-circle-o-notch fa-spin"></span></div>
<div id="joinready" style="display:none">' . v_success($this->func->s('check_mail'), $this->func->s('join_success')) . '</div>';
<div id="joinready" style="display:none">' . $this->v_utils->v_success($this->func->s('check_mail'), $this->func->s('join_success')) . '</div>';
}
public function passwordRequest()
......@@ -157,32 +157,32 @@ class LoginView extends View
$mail = $_GET['m'];
}
$cnt = v_info('Bitte trage hier Deine E-Mail-Adresse ein, mit welcher Du auf foodsharing.de angemeldet bist!');
$cnt = $this->v_utils->v_info('Bitte trage hier Deine E-Mail-Adresse ein, mit welcher Du auf foodsharing.de angemeldet bist!');
$cnt .= '
<form name="passReset" method="post" class="contact-form" action="' . $_SERVER['REQUEST_URI'] . '">
' . v_form_text('email', array('value' => $mail)) . '
' . v_form_submit($this->func->s('send'), 'submitted') . '
' . $this->v_utils->v_form_text('email', array('value' => $mail)) . '
' . $this->v_utils->v_form_submit($this->func->s('send'), 'submitted') . '
</form>';
return v_field($cnt, 'Passwort zurücksetzen', array('class' => 'ui-padding'));
return $this->v_utils->v_field($cnt, 'Passwort zurücksetzen', array('class' => 'ui-padding'));
} else {
return v_field(v_info('Du bist angemeldet als ' . S::user('name'), 'Du bist angemeldet'), array('class' => 'ui-padding'));
return $this->v_utils->v_field($this->v_utils->v_info('Du bist angemeldet als ' . S::user('name'), 'Du bist angemeldet'), array('class' => 'ui-padding'));
}
}
public function newPasswordForm($key)
{
$key = preg_replace('/[^0-9a-zA-Z]/', '', $key);
$cnt = v_info('Jetzt kannst Du Dein Passwort ändern.');
$cnt = $this->v_utils->v_info('Jetzt kannst Du Dein Passwort ändern.');
$cnt .= '
<form name="newPass" method="post" class="contact-form">
<input type="hidden" name="k" value="' . $key . '" />
' . v_form_passwd('pass1') . '
' . v_form_passwd('pass2') . '
' . v_form_submit($this->func->s('save'), 'submitted') . '
' . $this->v_utils->v_form_passwd('pass1') . '
' . $this->v_utils->v_form_passwd('pass2') . '
' . $this->v_utils->v_form_submit($this->func->s('save'), 'submitted') . '
</form>';
return v_field($cnt, 'Neues Passwort setzen', array('class' => 'ui-padding'));
return $this->v_utils->v_field($cnt, 'Neues Passwort setzen', array('class' => 'ui-padding'));
}
}
......@@ -205,7 +205,7 @@ class LoginXhr extends Control
$this->fillMemcacheUserVars();
$menu = $this->func->getMenu();
$msgbar = v_msgBar();
$msgbar = $this->v_utils->v_msgBar();
return array(
'status' => 1,
......
......@@ -52,12 +52,12 @@ class MailboxView extends View
' . $lat_js . '
');
return v_field('<div id="mailfolder"></div><input type="hidden" id="mbh-mailbox" value="" /><input type="hidden" id="mbh-folder" value="" /><input type="hidden" id="mbh-type" value="" />', 'Mailboxen');
return $this->v_utils->v_field('<div id="mailfolder"></div><input type="hidden" id="mbh-mailbox" value="" /><input type="hidden" id="mbh-folder" value="" /><input type="hidden" id="mbh-type" value="" />', 'Mailboxen');
}
public function manageMemberBox($box)
{
return v_quickform($box['name'] . '@' . DEFAULT_HOST, array(
return $this->v_utils->v_quickform($box['name'] . '@' . DEFAULT_HOST, array(
v_form_tagselect('foodsaver_' . $box['id'], array('label' => $this->func->s('mailbox_member'), 'xhr' => 'foodsaver')),
v_input_wrapper($this->func->s('email_name'), '<input type="text" value="' . $box['email_name'] . '" name="email_name" class="input text value">'),
v_form_hidden('mbid', $box['id'])
......@@ -66,21 +66,21 @@ class MailboxView extends View