1
<h2>Scenario Shift Templates</h2>
2
<p>Shift Templates are templates for when responding staff will be scheduled to work. The times
2
use_javascript('agMain.js');
5
<h2>Shift Templates: <span class="highlightedText"><?php echo $scenarioName ?></span></h2>
7
include_partial('wizard', array('wizardDiv' => $wizardDiv));
9
<p>Shift Templates are templates for when responding staff will be scheduled to work. The times
3
10
entered are relative, and when an event is created time will become specific to that event.</p>
4
<h3>Shift Templates for
5
<span class="highlightedText">
6
<?php echo $scenarioName ?>
11
<?php include_partial('shifttemplateform', array('shifttemplateform' => $shifttemplateform, 'scenario_id' => $scenario_id)) ?>
11
<form action="<?php echo url_for('scenario/shifttemplates?id=' . $scenario_id); ?>" method="post" name="shift_template">
12
<?php include_partial('shifttemplateholder', array('shifttemplateforms' => $shifttemplateforms, 'scenario_id' => $scenario_id)) ?>
13
<div id ="newshifttemplates">
14
<span class="smallLinkButton addShiftTemplate" id="adder">+ Add Shift Template</span> <hr class="inputGray" />
18
function addShiftTemplate(num) {
21
url: '<?php echo url_for('scenario/addshifttemplate?id=' . $scenario_id) . '?num=' ?>' + num,
26
$().ready(function() {
27
$('.addShiftTemplate').click(function() {
28
var passId = '#' + $(this).attr('id');
29
var $poster = $(this);
30
var templates = $('.shiftTemplateCounter').length
31
$(passId).parent().prepend(addShiftTemplate(templates) + '<br \>');
32
$("#shift_template_" + templates + "_staff_resource_type_id").focus();
33
$("#start_time_slider" + templates).slider({
34
orientation: "horizontal",
39
slide: function( event, ui ) {
40
$("#shift_template_" + templates + "_minutes_start_to_facility_activation").val(ui.value);
45
$('.removeShiftTemplate').click(function() {
46
//if there is no id for this record(db_not_exists)
47
var passId = '#' + $(this).attr('id');
48
var $inputs = $('#myForm :input:hidden');
49
//send get/post to call delete
50
$(this).parent().remove();
57
<input type="submit" class="linkButton" value="Save, Generate Shifts and Continue" name="Continue" />