Skip to content

Instantly share code, notes, and snippets.

Patrick Campbell PatrickatPaperlessPCS

Block or report user

Report or block PatrickatPaperlessPCS

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@PatrickatPaperlessPCS
PatrickatPaperlessPCS / index.html
Last active Oct 26, 2017
Single Registration Page
View index.html
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
.show {
background-color: #DADFE1;
}
View show.html (raw HTML)
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
.show {
background-color: #DADFE1;
}
.show-container {
View index.html
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>GistRun</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<h1>Hello world!</h1>
<script src="script.js"></script>
View show.html.erb
<% if @document.template.signature_position.exists? %>
<div id="signature" style='position: absolute; left: <%= @document.template.signature_position.left %>px; top: <%= @document.template.signature_position.top %>px; '>
<b style=" background-color: white; ">Electronically signed at: <%= @document.updated_at %></b>
<div style='opacity: 0.8;'>
<canvas class="padShow" width="540" height="100" style="page-break-before: avoid;"></canvas>
</div>
</div>
<script type="text/javascript">
$(function() {
renderSignature(<%= @document.signature.to_json.html_safe %>, 'div#signature');
@PatrickatPaperlessPCS
PatrickatPaperlessPCS / templates.rb
Created Feb 20, 2016
Updated Templates.rb 2/19 1900 CST
View templates.rb
class Template < ActiveRecord::Base
require 'blitline'
has_attached_file :attachment1, default_url: "/images/missing.png"
validates_attachment_content_type :attachment1, content_type: [/image/, "application/pdf"], path: '/templates', url: '/templates'
belongs_to :user
has_one :signature_position
View templates.rb
class Template < ActiveRecord::Base
require 'blitline'
has_attached_file :attachment1, default_url: "/images/missing.png"
validates_attachment_content_type :attachment1, content_type: [/image/, "application/pdf"], path: '/templates', url: '/templates'
belongs_to :user
has_one :signature_position
View javascriptsnippet.html.erb
<script type="text/javascript">
$(document).ready(function(){
var counter = 2;
$(document).click(function () {
if(counter>10){
alert("Only 10 textboxes allow");
You can’t perform that action at this time.