Create a gist now

Instantly share code, notes, and snippets.

@miragedeb /Flow VF Page Secret
Last active Apr 19, 2016

What would you like to do?
<apex:page standardController="ObjectName" extensions="ExtensionName">
<script src="https://code.jquery.com/jquery-2.2.3.min.js" integrity="sha256-a23g1Nt4dtEYOj7bR+vTu7+T8VP13humZFBJNIYoEJo=" crossorigin="anonymous"></script>
<style type="text/css">
.FlowPageBlockBtns {
text-align: left !important;
}
</style>
<div id="backdrop" style="
top: 65px;
left: 0px;
height: 100%;
width: 100%;
background-color: rgba(0,0,0,0.2);
z-index: 0;
position: absolute;
"></div>
<flow:interview name="Add_Defenders_to_Object" interview="{!myAutoFlow}" finishLocation="{!nextPage}" >
<script type="text/javascript">
if( jQuery("input[type=checkbox]").length > 0 ) {
jQuery("label[id*=Defenders]")
.append("<br/>")
.append(
jQuery("<input>")
.attr("name", "master")
.attr("type", "checkbox")
.attr("value", "Check/Uncheck All")
.on(
"click",
function() {
jQuery("input[type=checkbox][name!=master]").each(
function(){
jQuery(this).prop(
"checked",
jQuery("input[type=checkbox][name=master]").prop( "checked" )
);
}
);
}
)
);
}
</script>
<apex:param name="vObjID" value="{!Obj.Id}"/>
</flow:interview>
<apex:detail subject="{!Obj.Id}"/>
</apex:page>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment