Sha256: bb9c68b3a0167263ac51bb5fe38492f7110064af055ca2e729e218d000b95ead

Contents?: true

Size: 1.41 KB

Versions: 80

Compression:

Stored size: 1.41 KB

Contents

<h1>Edit Agent</h1>
<%= render :partial => 'caboose_rets/agents/admin_top_nav' %>

<div id='agent_<%= @agent.id %>_hide'         ></div>
<div id='agent_<%= @agent.id %>_assistant_to' ></div>
<div id='agent_<%= @agent.id %>_designation'  ></div>

<p style='clear: both;'><input type='button' value='< Back' onclick="window.location='/admin/agents';" /></p>

<% content_for :caboose_js do %>
<%= javascript_include_tag "caboose/model/all" %>
<script type='text/javascript'>
$(document).ready(function() {
  m = new ModelBinder({
    name: 'Agent',
    id: <%= @agent.id %>,
    update_url: '/admin/agents/<%= @agent.id %>',
    authenticity_token: '<%= form_authenticity_token %>',
    attributes: [
      { name: 'hide'            , nice_name: 'Hide from website'  , type: 'checkbox'  , value: <%= raw @agent.hide                        %>, width: 400 },
      { name: 'assistant_to'    , nice_name: 'Assistant To'       , type: 'select'    , value: <%= raw Caboose.json(@agent.assistant_to)  %>, width: 400, text: <%= raw Caboose.json(@boss ? "#{@boss.first_name} #{@boss.last_name}" : 'empty') %>, options_url: '/admin/agents/assistant-to-options', empty_text: 'Not an assistant' },
      { name: 'designation'     , nice_name: 'Designation'        , type: 'text'      , value: <%= raw Caboose.json(@agent.designation)   %>, width: 400 }
    ]
  });
});
$(window).load(function() {
  var modal = new CabooseModal(800);
});
</script>
<% end %>

Version data entries

80 entries across 80 versions & 1 rubygems

Version Path
caboose-rets-0.1.6 app/views/caboose_rets/agents/admin_edit.html.erb
caboose-rets-0.1.5 app/views/caboose_rets/agents/admin_edit.html.erb
caboose-rets-0.1.4 app/views/caboose_rets/agents/admin_edit.html.erb
caboose-rets-0.1.3 app/views/caboose_rets/agents/admin_edit.html.erb
caboose-rets-0.1.2 app/views/caboose_rets/agents/admin_edit.html.erb
caboose-rets-0.1.1 app/views/caboose_rets/agents/admin_edit.html.erb
caboose-rets-0.0.87 app/views/caboose_rets/agents/admin_edit.html.erb
caboose-rets-0.0.86 app/views/caboose_rets/agents/admin_edit.html.erb
caboose-rets-0.0.85 app/views/caboose_rets/agents/admin_edit.html.erb
caboose-rets-0.0.84 app/views/caboose_rets/agents/admin_edit.html.erb
caboose-rets-0.0.83 app/views/caboose_rets/agents/admin_edit.html.erb
caboose-rets-0.0.82 app/views/caboose_rets/agents/admin_edit.html.erb
caboose-rets-0.0.81 app/views/caboose_rets/agents/admin_edit.html.erb
caboose-rets-0.0.80 app/views/caboose_rets/agents/admin_edit.html.erb
caboose-rets-0.0.79 app/views/caboose_rets/agents/admin_edit.html.erb
caboose-rets-0.0.78 app/views/caboose_rets/agents/admin_edit.html.erb
caboose-rets-0.0.77 app/views/caboose_rets/agents/admin_edit.html.erb
caboose-rets-0.0.76 app/views/caboose_rets/agents/admin_edit.html.erb
caboose-rets-0.0.75 app/views/caboose_rets/agents/admin_edit.html.erb
caboose-rets-0.0.74 app/views/caboose_rets/agents/admin_edit.html.erb