/**
 * @class CM_FormField_Captcha
 * @extends CM_FormField_Abstract
 */
var CM_FormField_Captcha = CM_FormField_Abstract.extend({
  _class: 'CM_FormField_Captcha',

  ready: function() {
    var field = this;
    this.$(".captcha:eq(0)").find(".refreshCaptcha").click(function() {
      field.refresh();
    });
    this.getForm().bind("error", function() {
      field.refresh();
    });
  },

  refresh: function() {
    this.ajax('createNumber', {})
      .then(function(id) {
        var $container = this.$(".captcha:eq(0)");
        var $img = $container.find("img");
        $img.attr("src", $img.attr("src").replace(/\?[^\?]+$/, '?id=' + id));
        $container.find("input[name*=id]").val(id);
        $container.find("input[name*=value]").val("").focus();
      });
  },

  getInput: function() {
    return this.$("input[name*=id], input[name*=value]");
  },

  /**
   * @returns {{id: *, value: *}}
   */
  getValue: function() {
    return {
      id: this._getIdInput().val(),
      value: this._getValueInput().val()
    }
  },

  /**
   * @param {{id: *, value: *}} captcha
   */
  setValue: function(captcha) {
    this._getIdInput().val(captcha.id);
    this._getValueInput().val(captcha.value);
  },

  /**
   * @returns {jQuery}
   * @private
   */
  _getIdInput: function() {
    return this.getInput().filter("[name*=id]");
  },

  /**
   * @returns {jQuery}
   * @private
   */
  _getValueInput: function() {
    return this.getInput().filter("[name*=value]");
  }
});

@@ -961,36 +961,43 @@
    id: this.
-_getIdInput(
+$(%22input%5Bname*=id%5D%22
 ).val(),%0A   
@@ -1007,39 +1007,46 @@
 value: this.
-_getValueInput(
+$(%22input%5Bname*=value%5D%22
 ).val()%0A    
@@ -1150,352 +1150,96 @@
 his.
-_getIdInput().val(captcha.id);%0A    this._getValueInput().val(captcha.value);%0A  %7D,%0A%0A  /**%0A   * @returns %7BjQuery%7D%0A   * @private%0A   */%0A  _getIdInput: function() %7B%0A    return this.getInput().filter(%22%5Bname*=id%5D%22);%0A  %7D,%0A%0A  /**%0A   * @returns %7BjQuery%7D%0A   * @private%0A   */%0A  _getValueInput: function() %7B%0A    return this.getInput().filter(%22%5Bname*=
+$(%22input%5Bname*=id%5D%22).val(captcha.id);%0A    this.$(%22input%5Bname*=value%5D%22).val(captcha.
 value
-%5D%22
 );%0A 

Revert "Add getters for id and value inputs"