aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2015-02-09 15:57:22 -0800
committerfriendica <info@friendica.com>2015-02-09 15:57:22 -0800
commited810a360f9a52e1e57ea95723d46b68eb586f69 (patch)
tree40f173bb07d789002ce74c5cd20b1c7893ae7953 /mod
parent0e74ebc6a9f6ef6f8348a68d9ecee98795edd56b (diff)
downloadvolse-hubzilla-ed810a360f9a52e1e57ea95723d46b68eb586f69.tar.gz
volse-hubzilla-ed810a360f9a52e1e57ea95723d46b68eb586f69.tar.bz2
volse-hubzilla-ed810a360f9a52e1e57ea95723d46b68eb586f69.zip
event form - provide map ability for location field and add preview ability
Diffstat (limited to 'mod')
-rwxr-xr-xmod/events.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/mod/events.php b/mod/events.php
index 10affd4ec..144b9dd5e 100755
--- a/mod/events.php
+++ b/mod/events.php
@@ -8,6 +8,8 @@ require_once('include/items.php');
function events_post(&$a) {
+ logger('post: ' . print_r($_REQUEST,true));
+
if(! local_channel())
return;
@@ -178,6 +180,12 @@ function events_post(&$a) {
$datarray['created'] = $created;
$datarray['edited'] = $edited;
+ if(intval($_REQUEST['preview'])) {
+ $html = format_event_html($datarray);
+ echo $html;
+ killme();
+ }
+
$event = event_store_event($datarray);
@@ -597,6 +605,7 @@ function events_content(&$a) {
'$t_orig' => $t_orig,
'$sh_text' => t('Share this event'),
'$sh_checked' => $sh_checked,
+ '$preview' => t('Preview'),
'$permissions' => t('Permissions'),
'$acl' => (($orig_event['event_xchan']) ? '' : populate_acl(((x($orig_event)) ? $orig_event : $perm_defaults),false)),
'$submit' => t('Submit')