Created
November 16, 2017 22:12
-
-
Save gabemartinez/1a9f97ef118216e7a4d360572b3d51ea to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="https://code.jquery.com/jquery-3.2.1.js" integrity="sha256-DZAnKJ/6XZ9si04Hgrsxu/8s717jcIzLy3oi35EouyE=" crossorigin="anonymous"></script> | |
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js" integrity="sha256-T0Vest3yCU7pafRw9r+settMBX6JkKN06dqBnpQ8d30=" crossorigin="anonymous"></script> | |
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"> | |
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> | |
<?php | |
if(isset($_POST)){ | |
$awards = $_POST['awards_fields']; | |
print_r($awards); | |
} | |
?> | |
<form method='post' id='surveyform' name='myform'> | |
<legend> Awards, recognition, media coverage </legend> | |
<!--Awards, recognition, media coverage --> | |
<fieldset> | |
<div > | |
<div class='row'> | |
<div class='control-group' id='fields'> | |
<label class='control-label checkBoxLabel' for='field1'>Please seperate each award by a semicolon</label> | |
<div class='media-controls'> | |
<fieldset class='reward'> | |
<div class='entry input-group col-xs-3'> | |
<input class='form-control' name='awards_fields[]' type='text' placeholder='Enter Award, Recognition, or Media Coverage Name' /> | |
<span class='input-group-btn'> | |
<button class='btn btn-success btn-add-award' type='button'> | |
<span class='glyphicon glyphicon-plus'></span> | |
</button> | |
</fieldset> | |
</span> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
</fieldset> | |
<button name='Submission' type='submit' value='Updated' style='width: 200px; height: 40px' formnovalidate>Save as Draft</button> | |
<button name='Submission' type='submit' value='Approve' style='width: 200px; height: 40px' id='submit'>Complete Survey</button> | |
<!--<input class='btn-success' id='submit' type='submit' value='Submit'>--> | |
<br/> | |
<br/> | |
<br/> | |
<br/> | |
<br/> | |
<script> | |
$( document ).ready(function() { | |
//logic for award addition | |
$(function() | |
{ | |
$(document).on('click', '.btn-add-award', function(e) | |
{ | |
e.preventDefault(); | |
var controlForm = $('.media-controls fieldset:first'), | |
currentEntry = $(this).parents('.entry:first'), | |
newEntry = $(currentEntry.clone()).appendTo(controlForm); | |
newEntry.find('input').val(''); | |
controlForm.find('.entry:not(:last) .btn-add-award') | |
.removeClass('btn-add-award').addClass('btn-remove') | |
.removeClass('btn-success').addClass('btn-danger') | |
.html('<span class="glyphicon glyphicon-minus"></span>'); | |
}).on('click', '.btn-remove', function(e) | |
{ | |
$(this).parents('.entry:first').remove(); | |
e.preventDefault(); | |
return false; | |
}); | |
}); | |
}); | |
</script> | |
</form> | |
<style> | |
a { | |
color: #8C1D40; | |
} | |
a button { | |
color: black; | |
} | |
label, input, textarea, select { | |
display: block; | |
width: 400px; | |
margin-left: 45px; | |
} | |
.col-sm-3 { | |
width: 75% !important; | |
} | |
textarea { | |
height: 100px; | |
} | |
fieldset { | |
margin-top: 40px; | |
/*margin: 25px 40px;*/ | |
} | |
.accordionFieldset { | |
margin-top: 10px; | |
/* | |
max-height: 1000px;*/ | |
} | |
.locationAccordion { | |
min-height: 300px; | |
} | |
input, select { | |
padding: 5px 0; | |
} | |
.checkBox { | |
margin-left: 45px !important; | |
width: 30px; | |
display: inline-block; | |
} | |
.checkBoxLabel { | |
margin-left: 10px; | |
margin-top: 0px; | |
} | |
.checkBoxText { | |
display: inline-block; | |
} | |
.subAccordion { | |
margin-left: 60px; | |
} | |
.helpBox1 { | |
position: relative; | |
left: 900px; | |
bottom: 300px; | |
height: 300px; | |
width: 500px; | |
background-color: #989898; | |
display: none; | |
position: fixed; | |
text-align: center; | |
color: white; | |
border-radius: 25px; | |
} | |
.helpBox1 p { | |
margin: auto; | |
} | |
button.accordion { | |
background-color: none; | |
cursor: pointer; | |
padding: 18px; | |
width: 100%; | |
border: none; | |
text-align: left; | |
outline: none; | |
font-size: 15px; | |
transition: 0.4s; | |
} | |
button.accordion.active, button.accordion:hover { | |
background-color: white; | |
} | |
div.panel { | |
padding: 0 18px; | |
background-color: white; | |
max-height: 0; | |
overflow: hidden; | |
transition: max-height 0.6s ease-out; | |
} | |
.entry:not(:first-of-type) | |
{ | |
margin-top: 10px; | |
} | |
.glyphicon | |
{ | |
font-size: 20px; | |
} | |
label { | |
width: 400px; | |
} | |
.row { | |
margin-left: 0px !important; | |
} | |
fieldset { | |
overflow: hidden | |
} | |
.some-class { | |
float: left; | |
clear: none; | |
} | |
.labelForPartner { | |
float: left; | |
clear: none; | |
display: block; | |
padding: 2px 1em 0 0; | |
} | |
input[type=radio], | |
input.radio { | |
/*float: left;*/ | |
clear: none; | |
margin: 2px 0 0 2px; | |
} | |
#partnerInvolvement { | |
font-weight: normal; | |
} | |
#ex1Slider .slider-selection { | |
background: #BABABA; | |
} | |
.facultyStaffLabel { | |
width: auto; | |
display: inline; | |
margin: auto -5px; | |
} | |
.required { | |
display: inline; | |
color: red; | |
margin: auto 0px; | |
} | |
#hiddenBox { | |
display: none; | |
} | |
.notQuiteRight { | |
border-color: orange; | |
} | |
.perfect { | |
border-color: green; | |
} | |
.errorMessageHide { | |
display: none; | |
color: red; | |
} | |
.errorMessage { | |
color: red; | |
} | |
.goalsToolTipHide { | |
/*display: none;*/ | |
} | |
.toolTipFadeIn{ | |
} | |
.toolTipCustom { | |
margin: 0; | |
background-color: white; | |
height: 300px; | |
width: 300px; | |
position: fixed; | |
top: 250px; | |
left: 900px; | |
border-radius: 5px; | |
border-color: maroon; | |
border-width: medium; | |
border-style: solid; | |
display: none; | |
text-align: center; | |
padding: 3px; | |
} | |
.panel { | |
box-shadow: none !important; | |
margin-bottom: 0 !important; | |
} | |
.modeOfEngagementFocus { | |
z-index: 100; | |
} | |
.skinny { | |
margin-top: 20px; | |
} | |
.input-group-btn{ | |
position: relative; | |
left: 50px; | |
bottom: 19px; | |
} | |
.text-height{ | |
padding-top: 10px; | |
} | |
.no-left { | |
margin-left: 0 !important; | |
} | |
.slider-label{ | |
width: 800px; | |
margin-left: 63px; | |
} | |
.explanation-label { | |
margin-left: 14px !important; | |
} | |
.explanation-box { | |
width: 928px; | |
height: 171px; | |
} | |
</style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment