]> git.mxchange.org Git - friendica.git/commitdiff
change event behaviour so that title is required but description is not
authorfriendica <info@friendica.com>
Tue, 26 Jun 2012 04:20:08 +0000 (21:20 -0700)
committerfriendica <info@friendica.com>
Tue, 26 Jun 2012 04:20:08 +0000 (21:20 -0700)
include/bbcode.php
mod/events.php
view/theme/duepuntozero/style.css

index effdd0be892be702f42bce5195b07fdf15f373d5..c64d5d03666d7b0b7f779d35cca3ec47538ac438 100644 (file)
@@ -302,8 +302,8 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true) {
                $sub = format_event_html($ev);
 
                $Text = preg_replace("/\[event\-summary\](.*?)\[\/event\-summary\]/ism",'',$Text);
-               $Text = preg_replace("/\[event\-description\](.*?)\[\/event\-description\]/ism",$sub,$Text);
-               $Text = preg_replace("/\[event\-start\](.*?)\[\/event\-start\]/ism",'',$Text);
+               $Text = preg_replace("/\[event\-description\](.*?)\[\/event\-description\]/ism",'',$Text);
+               $Text = preg_replace("/\[event\-start\](.*?)\[\/event\-start\]/ism",$sub,$Text); 
                $Text = preg_replace("/\[event\-finish\](.*?)\[\/event\-finish\]/ism",'',$Text);
                $Text = preg_replace("/\[event\-location\](.*?)\[\/event\-location\]/ism",'',$Text);
                $Text = preg_replace("/\[event\-adjust\](.*?)\[\/event\-adjust\]/ism",'',$Text);
index e7b95d27ad8c6e4debfd72f4c858526ec6391a52..4a6d3f100e974e5b4ff9bfe73fcf8510bcbb12a3 100755 (executable)
@@ -62,8 +62,8 @@ function events_post(&$a) {
        $location = escape_tags(trim($_POST['location']));
        $type     = 'event';
 
-       if((! $desc) || (! $start)) {
-               notice( t('Event description and start time are required.') . EOL);
+       if((! $summary) || (! $start)) {
+               notice( t('Event title and start time are required.') . EOL);
                goaway($a->get_baseurl() . '/events/new');
        }
 
@@ -412,9 +412,9 @@ function events_content(&$a) {
                        '$uri' => $uri,
        
                        '$title' => t('Event details'),
-                       '$desc' => sprintf( t('Format is %s %s. Starting date and Description are required.'),$dateformat,$timeformat),
+                       '$desc' => sprintf( t('Format is %s %s. Starting date and Title are required.'),$dateformat,$timeformat),
                        
-                       '$s_text' => t('Event Starts:') . ' <span class="required">*</span> ',
+                       '$s_text' => t('Event Starts:') . ' <span class="required" title="' . t('Required') . '">*</span>',
                        '$s_dsel' => datesel($f,'start',$syear+5,$syear,false,$syear,$smonth,$sday),
                        '$s_tsel' => timesel('start',$shour,$sminute),
                        '$n_text' => t('Finish date/time is not known or not relevant'),
@@ -424,11 +424,11 @@ function events_content(&$a) {
                        '$f_tsel' => timesel('finish',$fhour,$fminute),
                        '$a_text' => t('Adjust for viewer timezone'),
                        '$a_checked' => $a_checked,
-                       '$d_text' => t('Description:') . ' <span class="required">*</span>',
+                       '$d_text' => t('Description:')
                        '$d_orig' => $d_orig,
                        '$l_text' => t('Location:'),
                        '$l_orig' => $l_orig,
-                       '$t_text' => t('Title:'),
+                       '$t_text' => t('Title:') . ' <span class="required" title="' . t('Required') . '">*</span>',
                        '$t_orig' => $t_orig,
                        '$sh_text' => t('Share this event'),
                        '$sh_checked' => $sh_checked,
index 41c747045effe58bb8f7ff3cbbf10b9cdf723649..997c6d315af52b6534143710ad82d0eb9e6a4f9e 100644 (file)
@@ -2421,6 +2421,30 @@ aside input[type='text'] {
        font-size: 20px;
 }
 
+#event-summary-text {
+       margin-top: 15px;
+}
+
+#event-share-checkbox {
+       float: left;
+       margin-top: 10px;
+}
+
+#event-share-text {
+       float: left;
+       margin-top: 10px;
+       margin-left: 5px;
+}
+
+#event-share-break {
+       clear: both;
+       margin-bottom: 10px;
+}
+
+#event-summary {
+       width: 400px;
+}
+
 .vevent {
        border: 1px solid #CCCCCC;
 }