Skip to content

Instantly share code, notes, and snippets.

View kmelkon's full-sized avatar
👨‍💻

Karam Malkon kmelkon

👨‍💻
View GitHub Profile
@kmelkon
kmelkon / show.html.erb
Created August 21, 2013 13:38
3 radio button form
<div class="deals-wrapper">
<% @deals.each do |d| %>
<div class="deal">
<ul>
<li><%= d.value %></li>
<li><%= d.background %></li>
</ul>
<div class="add-task arrow_box hide">
<%= form_for ([@company, @task]), :remote => true do |f| %>
<%= f.label :description %>
<%= f.text_field :description, :class => "input-width bottom-border" %>
<%= f.label :task_category_id, "Choose a category" %>
<%= f.collection_select(:task_category_id, TaskCategory.all, :id, :task_category) %>
<%= f.label :due_date %>
<%= f.select :due_date_word, ['Today', 'Tomorrow', 'Next Week']%>
$(function(){
$('.inline').colorbox({
inline:true,
width:"50%",
});
$(".contact-card:even").addClass("pull-left");
<%= form_for [@company, @deal], :remote=> true, :id => "form" do |f| %>
<%= f.label :background %>
<%= f.text_area :background, :class => "input-width bottom-border" %>
<%= f.label :value %>
<%= f.text_field :value, :class => "input-width bottom-border" %>
<%= f.submit "Add this Deal", class: "btn submit-deals" %>
<% end %>
<div class="container">
<div class="content pull-left">
<%= form_for(@deal, :url => {:action => "create"}) do |f| %>
<%= f.label :background %>
<%= f.text_area :background, :class => "input-width bottom-border" %>
<%= f.label :value %>
<%= f.text_field :value, :class => "input-width bottom-border" %>
$('.deals-wrapper').append('<%= escape_javascript(render :partial => "deals/deal") %>');
$(':input')
.not(':button, :submit')
.val('');
$(".deal:even").addClass("background-gray deal-padding");
$('.deals-wrapper').append('<%= escape_javascript(render :partial => "deals/deal") %>');
$(':input')
.not(':button, :submit')
.val('');
$(".deal:even").addClass("background-gray deal-padding");
<div class="content pull-left">
<h2><%= @company.name %></h2>
<%= link_to "edit company", edit_company_path %>
<div class="margin-bottom">
<% for phone in @company.phone_numbers %>
<li><%= phone.number %> (<%= phone.place %>)</li>
<% end %>
</div>
<ul class="nav nav-tabs margin-top" id="company-tab">
$('.x').append('<%= escape_javascript(render :partial => "contacts/contact_card") %>');
$('.field-clear').val('');
$.colorbox.close();
$(".contact-card:even").addClass("pull-left");
$(".contact-card:odd").addClass("pull-right");
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// the compiled file.
//
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD