-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 <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 & Close', 'floppy-disk', 'button', '$(\'#saveOpt\').val(\'back\');document.getElementById(\'comp_add\').submit();'); $deleteConf->setRight('success', 'Save & 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; } var title = new Spry.Widget.ValidationTextField("s_title", "none", {validateOn:["blur"]});
-floppy-disk"></span></button> </div> </div> <input type="hidden" name="meet" id="e_meet" value=""/> <input type="hidden" name="series" id="e_series" value=""/> <input type="hidden" name="text" id="e_text" value=""/> <input type="hidden" name="ID" value="<?php print $_GET['m']; ?> "/> <?php $deleteConf = new Modal(); $deleteConf->setID('saveCont'); $deleteConf->setBody('Do you wish to save this meet\'s results service settings?'); $deleteConf->setTitle('Save?'); $deleteConf->setRight('success', 'Finish', 'floppy-disk', 'submit'); print $deleteConf->getModal(); ?> </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; } var meet = new Spry.Widget.ValidationSelect("s_meet", {validateOn:["blur", "change"], invalidValue:"*"}); var series = new Spry.Widget.ValidationTextField("s_series", "none", {validateOn:["blur", "change"]});
} 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"))){ $("#saveCont").modal('show');
private function _ConfModal($mode, $icon, $type, $action, $auth = false, $conf = false, $prompt = '', $cust = false) { $mod_id = substr(crc32(microtime()), 1, 6); if ($prompt == '') { $prompt = '<p>Are you sure you want to ' . $mode . ' the following ' . $type . ':</p>'; } $mod_content = $prompt . PHP_EOL; $mod_content .= '<ul id="' . $mode . '_' . $type . '"></ul>' . PHP_EOL; $mod_form = new Form($mode . '_f', $action, 'post', 'application/x-www-form-urlencoded', $mode . '_' . $type . '(); return false;'); $mod_form->setColumns(4, 8); $mod_form->addHiddenField($type, '', $type . '_to_' . $mode); if ($auth) { $mod_form->addPasswordField('Your Password', 'pwd', '', array('t' => 'Your password to confirm the operation', 'p' => 'Your Password'), array('t' => 'password', 'r' => true)); } if ($conf) { $mod_form->addButtonGroup('Are you sure?', 'conf', array(array('i' => 'confY' . $mod_id, 's' => B_T_SUCCESS, 'v' => 1, 'l' => 'Yes', 'c' => false), array('i' => 'confN' . $mod_id, 's' => B_T_FAIL, 'v' => 0, 'l' => 'No', 'c' => true)), array('t' => 'Are you sure you wish to perform this action?')); } $mod_form->build(); $mod_content .= $mod_form->getForm(); $mod = new Modal(); $mod->setID($mode); $mod->setTitle(ucfirst($mode) . ' ' . ucfirst($type) . '?'); $mod->setBody($mod_content); $mod->setLeft('default', 'Cancel', 'remove-sign', 'button', '$(\'#' . $mode . '\').modal(\'hide\')'); $mod->setRight('danger', 'OK', $icon, 'button', $mode . '_' . $type . '(this)'); $mod->create(); $this->comps[] = $mod->getModal(); $this->_addConfModalScript($mode, $type, $cust); }
?> " class="btn btn-large btn-danger btn-block" >Delete Compeition <span class="<?php print B_ICON . ' ' . B_ICON; ?> -trash"></span></button> </div> </div> </div> </div> <?php $deleteConf = new Modal(); $deleteConf->setID('delConf'); $deleteConf->setBody('Are you sure you wish to delete this competition?<br />All data associated with this competition will be lost.'); $deleteConf->setTitle('Delete Competition?'); $deleteConf->setLeft('default', 'Cancel', 'remove-sign'); $deleteConf->setRight('danger', 'Delete', 'trash', 'submit'); print $deleteConf->getModal(); ?> </form> </div> </div> <script type="text/javascript"> $("#recaptcha_response_field").attr("tabindex","<?php print $recaptchaTab; ?> "); function openModal(){ if(Spry.Widget.Form.validate(document.getElementById("remove"))){ $("#delConf").modal('show'); }