2018-03-04 02:25:42 +00:00
|
|
|
{ form_for(@metacode) do |f| }
|
|
|
|
{ if @metacode.errors.any? }
|
2014-05-17 18:57:03 +00:00
|
|
|
<div id="error_explanation">
|
2018-03-04 02:25:42 +00:00
|
|
|
<h2>{ pluralize(@metacode.errors.count, "error") } prohibited this metacode from being saved:</h2>
|
2014-05-17 18:57:03 +00:00
|
|
|
<ul>
|
2018-03-04 02:25:42 +00:00
|
|
|
{ @metacode.errors.full_messages.each do |msg| }
|
|
|
|
<li>{ msg }</li>
|
|
|
|
{ end }
|
2014-05-17 18:57:03 +00:00
|
|
|
</ul>
|
|
|
|
</div>
|
2018-03-04 02:25:42 +00:00
|
|
|
{ end }
|
2014-05-17 18:57:03 +00:00
|
|
|
|
2018-03-05 17:33:16 +00:00
|
|
|
<div className="field">
|
2018-03-04 02:25:42 +00:00
|
|
|
{ f.label :name }
|
|
|
|
{ f.text_field :name }
|
2018-03-05 17:33:16 +00:00
|
|
|
<div className="clearfloat"></div>
|
2014-05-17 18:57:03 +00:00
|
|
|
</div>
|
2018-03-04 02:25:42 +00:00
|
|
|
{ unless @metacode.new_record? }
|
2018-03-05 17:33:16 +00:00
|
|
|
<div className="field">
|
2018-03-04 02:25:42 +00:00
|
|
|
{ f.label 'Current Icon' }
|
|
|
|
{ image_tag @metacode.icon, width: 96 }
|
2016-02-26 06:04:01 +00:00
|
|
|
</div>
|
2018-03-04 02:25:42 +00:00
|
|
|
{ end }
|
2018-03-05 17:33:16 +00:00
|
|
|
<div className="field">
|
2018-03-04 02:25:42 +00:00
|
|
|
{ if @metacode.new_record? }
|
|
|
|
{ f.label 'Icon' }
|
|
|
|
{ else }
|
|
|
|
{ f.label 'Replace Icon: ' }
|
|
|
|
{ end }
|
|
|
|
{ f.hidden_field :manual_icon, value: nil }
|
|
|
|
{ f.file_field :aws_icon }
|
2018-03-05 17:33:16 +00:00
|
|
|
<div className="clearfloat"></div>
|
2014-05-17 18:57:03 +00:00
|
|
|
</div>
|
2018-03-05 17:33:16 +00:00
|
|
|
<div className="field">
|
2018-03-04 02:25:42 +00:00
|
|
|
{ f.label :color, "Color (hex with # sign)" }
|
|
|
|
{ f.text_field :color }
|
2018-03-05 17:33:16 +00:00
|
|
|
<div className="clearfloat"></div>
|
2014-09-30 02:26:12 +00:00
|
|
|
</div>
|
2018-03-05 17:33:16 +00:00
|
|
|
<div className="actions">
|
|
|
|
{ link_to 'Cancel', metacodes_path, { :className => 'button' } }
|
|
|
|
{ f.submit :className => 'add' }
|
2014-05-17 18:57:03 +00:00
|
|
|
</div>
|
2018-03-04 02:25:42 +00:00
|
|
|
{ end }
|