def admin_update
      return if !user_is_allowed('products', 'edit')
      
      resp = Caboose::StdClass.new
      ip = ModificationValueInputField.find(params[:id])    
      
      save = true    
      params.each do |name,value|
        case name                        
          when 'sort_order'    then ip.sort_order     = value 
          when 'name'          then ip.name           = value
          when 'description'   then ip.description    = value
          when 'field_type'    then ip.field_type     = value
          when 'default_value' then ip.default_value  = value                                              
          when 'width'         then ip.width          = value
          when 'height'        then ip.height         = value
          when 'options'       then ip.options        = value
          when 'options_url'   then ip.options_url    = value
        end
      end
      resp.success = save && ip.save
      render :json => resp
    end
def admin_update
      return if !user_is_allowed('products', 'edit')
      
      resp = Caboose::StdClass.new
      ip = ModificationValueInputField.find(params[:id])    
      
      save = true    
      params.each do |name,value|
        case name                        
          when 'sort_order'    then ip.sort_order     = value 
          when 'name'          then ip.name           = value
          when 'description'   then ip.description    = value
          when 'field_type'    then ip.field_type     = value
          when 'default_value' then ip.default_value  = value                                              
          when 'width'         then ip.width          = value
          when 'height'        then ip.height         = value
          when 'options'       then ip.options        = value
          when 'options_url'   then ip.options_url    = value
        end
      end
      resp.success = save && ip.save
      render :json => resp
    end
PUT /admin/products/:product_id/modifications/:mod_id/values/:mod_value_id/input-fields/:id