You are here: Almanac » Event

Event

In Time

For more information on content organization within the Almanac web, see TopicClassification.

Code - Visible only to AdminGroup.
You can modify the options for creating new topics of this type by changing the parameters to RenderTopicCreator. See that topic for more info.
%STARTSECTION{"new"}%%ADDTOZONE{"head" topic="%WEB%.%TOPIC%" section="styles"}%%ADDTOZONE{"script" requires="JQUERYPLUGIN" topic="%WEB%.%TOPIC%" section="js"}%<noautolink>
<form name='createNewEvent' action='%SCRIPTURL{save}%/%WEB%/' method='post' >
<input type='hidden' name='onlywikiname' value='on' /> 
<input type='hidden' name='onlynewtopic' value='on' /> 
<input type='hidden' name='templatetopic' value='EventTemplate' />
<input type='hidden' name='TopicType' value='%TOPIC%' />
<input type='hidden' name='formtemplate' value='EventForm' />
<input type='hidden' name='action' value='form'/>
<input type='hidden' name='redirectto' value='%BASEWEB%.%BASETOPIC%' />
<input type="hidden" id="eventTopic" name="topic" size="60" class="jqWikiWord {source:'input[name=TopicTitle]', initial:'EventDefaultName', prefix:'Event'}" value='EventDefaultName' />
<input type='hidden' name='t' value='%GMTIME{"$epoch"}%'/>
<div class='foswikiFormSteps '><div class='foswikiFormStep'><h3>Event Data</h3><div id='eventEditFormTable'><table class='foswikiFormTable' summary='Topic data'><tbody>
%STARTSECTION{"formelements"}%%RENDERFOREDIT{%IF{"defined SOURCE" then="topic=$quot%SOURCE%$quot" else="form=$quot%TOPIC%Form$quot"}% 
   fields="TopicTitle, Details" 
   format="<tr class='$attrs'><th><span title='$description'>$title</span></th><td align='left'>$edit $mandatory</td></tr>" 
   separator=" $n" 
}%
%RENDERFOREDIT{%IF{"defined SOURCE" then="topic=$quot%SOURCE%$quot" else="form=$quot%TOPIC%Form$quot"}% 
   fields="Date" 
   format="<tr class='$attrs'><th><span title='$description'>$title</span></th><td align='left'>$edit    <input type='checkbox' name='Attributes' value='Reference' %IF{"'%BASETOPIC%'/Attributes~'Reference*'" then=" checked='checked'"}%> Reference Date <img src='%ICONURLPATH{help}%' title='Check if you want to be able to have other events reference this event.' style='color:green;'></td></tr>" 
   separator=" $n" 
}%
%RENDERFOREDIT{%IF{"defined SOURCE" then="topic=$quot%SOURCE%$quot" else="form=$quot%TOPIC%Form$quot"}% 
   fields="RelativeTo, OffsetAmount, OffsetUnit" 
   header="<tr><th>Relative</th><td><input class='toggle foswikiCheckbox' type='checkbox' name='Attributes' value='Relative' %IF{"'%BASETOPIC%'/Attributes~'*Relative*'" then=" checked='checked'"}%> <img src='%ICONURLPATH{help}%' title='Check to schedule event relative to a reference event .'> <div class='Relative' style='display:none;'>"
   footer="</div></td></tr>"
   format="<span class='fieldTitle' title='$description'>$title</span> $edit " 
   OffsetAmount_title="Offset" 
   OffsetUnit_title="Unit" 
   separator="  " 
}%
%RENDERFOREDIT{%IF{"defined SOURCE" then="topic=$quot%SOURCE%$quot" else="form=$quot%TOPIC%Form$quot"}% 
   fields="RepeatFrequency, RepeatCount, EndDate" 
   header="<tr><th>Repeating</th><td><input class='toggle' type='checkbox' name='Attributes' value='Repeating' %IF{"'%BASETOPIC%'/Attributes~'*Repeating'" then=" checked='checked'"}%> <img src='%ICONURLPATH{help}%' title='Check to make event repeating.'> <div class='Repeating' style='display:none;'>"
   footer="<input type='hidden' name='Attributes' value='' /></div></td></tr>"
   format="<span class='fieldTitle' title='$description'>$title</span> $edit " 
   RepeatFrequency_title="Frequency" 
   RepeatCount_title="Count" 
   EndDate_format="<em>or</em> <span class='fieldTitle' title='$description'>$title</span> $edit" 
   separator="  " 
}%
%ENDSECTION{"formelements"}%
<tr><th></th><td>%BUTTON{" Create Event " type="submit"}% </td></tr></table></div></div></div>
</form></noautolink>
%JQREQUIRE{"metadata,wikiword,validate"}%
%ENDSECTION{"new"}%

|  *Event Title:* | <input type='text' id='TopicTitle' name='TopicTitle' size='40' > | Enter short title for event. e.g. Start lettuce starts.  |
| *&nbsp;* | <input type='submit' value=' Post Event ' > ||

   footer="%IF{"defined SOURCE" then="$percntINCLUDE{\"%WEB%.%TOPIC%\" section=\"formdef\" literal=\"on\" warn=\"off\"}$percnt</tbody></table></div></div>"}%"

%STARTSECTION{"styles"}%
<style type="text/css" media="all">
div#eventEditFormTable td,
div#eventEditFormTable th {
    border-style: solid;
    border-width: 0 0 1px;
    padding: 0.5em 10px 0.5em 20px;
    vertical-align: middle;
    border-color: #EEEEEE;
}
div#eventEditFormTable th {
    text-align: right;
    font-weight: bold;
    width: 10em;
}
</style>
%ENDSECTION{"styles"}%

%STARTSECTION{"js"}%
<script type="text/javascript">
jQuery(function($) { 
  function toggleElem(target) {
     if(target.is(':checked')){
       $('div.' + target.val()).css('display','inline-block');
     } else {
       $('div.' + target.val()).css('display','none');
     }
     if($('div.Relative').css('display') == 'inline-block') {
       $('tr.startdate').hide();
     } else {
       $('tr.startdate').show();
    }
  }
  $('#eventEditFormTable :input.toggle:checkbox').click(function(){
     toggleElem($(this));
  });
  $('#eventEditFormTable :input.toggle:checkbox').each(function(index ) {
     toggleElem($(this));
  });
  $('tr.M input').addClass('required');
});
</script>
%ENDSECTION{"js"}%

%STARTSECTION{"formdef"}%
<th>Form definition</th><td><a rel="nofollow" target="EventForm" href="%SCRIPTURLPATH{view}%/Almanac/EventForm" title="Details in separate window">Almanac.EventForm</a> <input name="action_replaceform" value="Replace form..." class="foswikiChangeFormButton foswikiButton" type="submit"></td>
%ENDSECTION{"formdef"}%

This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Middle Fork Home Wiki? Send feedback
Syndicate this site RSS