Skip to content

Instantly share code, notes, and snippets.

View PatrickatPaperlessPCS's full-sized avatar

Patrick Campbell PatrickatPaperlessPCS

View GitHub Profile
@PatrickatPaperlessPCS
PatrickatPaperlessPCS / index.html
Last active October 26, 2017 18:13
Single Registration Page
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
.show {
background-color: #DADFE1;
}
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
.show {
background-color: #DADFE1;
}
.show-container {
<!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>
<% 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 February 20, 2016 01:24
Updated Templates.rb 2/19 1900 CST
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
@PatrickatPaperlessPCS
PatrickatPaperlessPCS / templates.rb
Created February 19, 2016 22:53
Blitline Templates
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
<script type="text/javascript">
$(document).ready(function(){
var counter = 2;
$(document).click(function () {
if(counter>10){
alert("Only 10 textboxes allow");