<div class="modal" tabindex="-1" role="dialog">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header" ng-show="title">
				<button type="button" class="close" ng-click="$hide()">&times;</button>
				<h4 class="modal-title">{{title}}</h4>
			</div>

			<form name="setVariableForm" role="form" novalidate>
				<div class="modal-body" >
					<div class="form-group">
						<div>
							<label for="variable-name">Variable: {{sfunc.variable.name}}</label>
						</div>

						<div ng-if="0 == sfunc.variable.type">
							<div class="radio">
								<div class="margin-bottom-md">
									<label>
										<input type="radio" name="true" ng-model="sfunc.value" value="1" class="ng-pristine ng-valid" required> True
									</label>
								</div>
								<div class="margin-bottom-md">
									<label>
										<input type="radio" name="false" ng-model="sfunc.value" value="0" class="ng-pristine ng-valid" required> False
									</label>
									</div>
								<div class="margin-bottom-md">
									<label>
										<input type="radio" name="false" ng-model="sfunc.value" value="2" class="ng-pristine ng-valid" required> Invert
									</label>								
								</div>
							</div>
						</div>

						<div ng-if="1 == sfunc.variable.type">
							Value: <input class="form-control" id="var-string-value" type="text" name="varStringValue" placeholder="Enter string" ng-model="sfunc.value" ng-maxlength="256" required>
							<p class="help-block" ng-show="setVariableForm.varStringValue.$error.required && setVariableForm.varStringValue.$dirty">A valid value is required.</p>
							<p class="help-block" ng-show="setVariableForm.varStringValue.$error.maxlength && setVariableForm.varStringValue.$dirty">The value cannot be longer than 256 
						</div>

						<div ng-if="2 == sfunc.variable.type">
							Value: <input class="form-control" id="var-int-value" type="number" name="varIntValue" placeholder="Enter numeric value" ng-model="sfunc.value" min="-2147483648" max="2147483647" ng-maxlength="11" required>
							<p class="help-block" ng-show="setVariableForm.varIntValue.$error.required && setVariableForm.varIntValue.$dirty">A valid value is required.</p>
							<p class="help-block" ng-show="setVariableForm.varIntValue.$error.maxlength && setVariableForm.varIntValue.$dirty">The value cannot be longer than 11 characters.</p>
						</div>

					</div>
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-primary" ng-disabled="setVariableForm.$invalid" ng-click="addStep()">Set</button>
					<button type="button" class="btn btn-danger" ng-click="$hide()">Cancel</button>
				</div>
			</form>
		</div>
	</div>
</div>
