Esempio n. 1
0
?>
-remove-sign"></span></a>
        </div>
        <div class="col-sm-6">
          <button onClick="return openModal()" id="saveContBtn" class="btn btn-large btn-success btn-block" type="submit">Save Meet&nbsp;&nbsp;&nbsp;<span class="<?php 
print B_ICON . ' ' . B_ICON;
?>
-floppy-disk"></span></button>
        </div>
      </div>
      <?php 
$deleteConf = new Modal();
$deleteConf->setID('saveCont');
$deleteConf->setBody('Do you wish to save this meet and continue to add notes (continue wizard) or save this meet and return to the View Competitions page?');
$deleteConf->setTitle('Save?');
$deleteConf->setCentre('default', 'Save &amp; Close', 'floppy-disk', 'button', '$(\'#saveOpt\').val(\'back\');document.getElementById(\'comp_add\').submit();');
$deleteConf->setRight('success', 'Save &amp; Continue', 'floppy-save', 'submit', '$(\'#saveOpt\').val(\'cont\');');
print $deleteConf->getModal();
?>
      <input type="hidden" name="saveOpt" value="cont" id="saveOpt" />
    </form>
  </div>
</div>
<script type="text/javascript">
var completion = 0;
function openModal(){
	if(Spry.Widget.Form.validate(document.getElementById("comp_add"))){
		$("#saveCont").modal('show');
	}
	return false;
}
    $delEvt = 10;
} elseif ((int) $_GET['e'] < 5) {
    $delEvt = 2;
} else {
    $delEvt = 5;
}
$addEvt->setBody('<label>How many events do you wish to add?</label><input class="form-control" type="number" value="5" id="addNum"/>');
$addEvt->setTitle('Add Events');
$addEvt->setCentre(B_T_PRIMARY, 'Add One Event', 'plus-sign', 'button', 'addEvt(1)');
$addEvt->setRight(B_T_PRIMARY, 'Add Events', 'plus-sign', 'button', 'addEvt($(\'#addNum\').val())');
print $addEvt->getModal();
$addEvt = new Modal();
$addEvt->setID('delEvt');
$addEvt->setBody('<label>How many events do you wish to remove?</label><input class="form-control" type="number" value="' . $delEvt . '" id="delNum"/>');
$addEvt->setTitle('Remove Events');
$addEvt->setCentre(B_T_FAIL, 'Remove All Events', 'minus-sign', 'button', 'delEvt(' . $_GET['e'] . ')');
$addEvt->setRight(B_T_WARNING, 'Remove Event(s)', 'minus-sign', 'button', 'delEvt($(\'#delNum\').val())');
print $addEvt->getModal();
?>
      <input type="hidden" name="ID" value="<?php 
print $_GET['m'];
?>
"/>
      <input type="hidden" name="saveOpt" value="cont" id="saveOpt" />
    </form>
  </div>
</div>
<script type="text/javascript">
var completion = 0;
function openModal(){
	if(Spry.Widget.Form.validate(document.getElementById("comp_add"))){