(function() {
Formbuilder.registerField('pièce jointe', {
	order: 55,
	view: "<input type='file' />",
	edit: "",
	addButton: "<span class=\"symbol\"><span class=\"fa fa-cloud-upload\"></span></span> Pièce jointe"
});

}).call(this);

(function() {
Formbuilder.registerField('adresse', {
	order: 50,
	view: "<div class='input-line'>\n  <span class='street'>\n    <input type='text' />\n    <label>Adresse</label>\n  </span>\n</div>\n\n<div class='input-line'>\n  <span class='city'>\n    <input type='text' />\n    <label>Ville</label>\n  </span>\n\n  <span class='state'>\n    <input type='text' />\n    <label>Etat / Province / Région</label>\n  </span>\n</div>\n\n<div class='input-line'>\n  <span class='zip'>\n    <input type='text' />\n    <label>Code postal</label>\n  </span>\n\n  <span class='country'>\n    <input type='text' />\n    <label>Pays</label>\n  </span>\n</div>",
	edit: "",
	addButton: "<span class=\"symbol\"><span class=\"fa fa-home\"></span></span> Adresse"
});
}).call(this);

(function() {
Formbuilder.registerField('case à cocher', {
	order: 10,
	view: "<% for (i in (rf.get(Formbuilder.options.mappings.OPTIONS) || [])) { %>\n  <div>\n    <label class='fb-option'>\n      <input type='checkbox' <%= rf.get(Formbuilder.options.mappings.OPTIONS)[i].checked && 'checked' %> onclick=\"javascript: return false;\" />\n      <%= rf.get(Formbuilder.options.mappings.OPTIONS)[i].label %>\n    </label>\n  </div>\n<% } %>\n\n<% if (rf.get(Formbuilder.options.mappings.INCLUDE_OTHER)) { %>\n  <div class='other-option'>\n    <label class='fb-option'>\n      <input type='checkbox' />\n      Autre\n    </label>\n\n    <input type='text' />\n  </div>\n<% } %>",
	edit: "<%= Formbuilder.templates['edit/options']({ includeOther: true }) %>",
	addButton: "<span class=\"symbol\"><span class=\"fa fa-square-o\"></span></span> Réponses multiples",
	defaultAttributes: function(attrs) {
	attrs.field_options.options = [
		{
		label: "",
		checked: false
		}, {
		label: "",
		checked: false
		}
		];
	return attrs;
	}
});
}).call(this);

(function() {
Formbuilder.registerField('date', {
	order: 20,
	view: "<div class='input-line'>\n  <span class='day'>\n    <input type=\"text\" />\n    <label>JJ</label>\n  </span>\n\n  <span class='above-line'>/</span>\n\n  <span class='month'>\n    <input type=\"text\" />\n    <label>MM</label>\n  </span>\n\n  <span class='above-line'>/</span>\n\n  <span class='year'>\n    <input type=\"text\" />\n    <label>AAAA</label>\n  </span>\n</div>",
	edit: "",
	addButton: "<span class=\"symbol\"><span class=\"fa fa-calendar\"></span></span> Date"
});
}).call(this);

(function() {
Formbuilder.registerField('menu déroulant', {
	order: 24,
	view: "<select>\n  <% if (rf.get(Formbuilder.options.mappings.INCLUDE_BLANK)) { %>\n    <option value=''></option>\n  <% } %>\n\n  <% for (i in (rf.get(Formbuilder.options.mappings.OPTIONS) || [])) { %>\n    <option <%= rf.get(Formbuilder.options.mappings.OPTIONS)[i].checked && 'selected' %>>\n      <%= rf.get(Formbuilder.options.mappings.OPTIONS)[i].label %>\n    </option>\n  <% } %>\n</select>",
	edit: "<%= Formbuilder.templates['edit/options']({ includeBlank: true }) %>",
	addButton: "<span class=\"symbol\"><span class=\"fa fa-caret-down\"></span></span> Menu déroulant",
	defaultAttributes: function(attrs) {
		attrs.field_options.options = [
		{
		label: "",
		checked: false
		}, {
		label: "",
		checked: false
		}
		];
	attrs.field_options.include_blank_option = false;
	return attrs;
	}
});
}).call(this);

(function() {
Formbuilder.registerField('email', {
	order: 40,
	view: "<input type='text' class='rf-size-<%= rf.get(Formbuilder.options.mappings.SIZE) %>' />",
	edit: "",
	addButton: "<span class=\"symbol\"><span class=\"fa fa-envelope-o\"></span></span> Email"
});
}).call(this);

(function() {
Formbuilder.registerField('nombre', {
	order: 30,
	view: "<input type='text' />\n<% if (units = rf.get(Formbuilder.options.mappings.UNITS)) { %>\n  <%= units %>\n<% } %>",
	edit: "<%= Formbuilder.templates['edit/min_max']() %>\n<%= Formbuilder.templates['edit/units']() %>\n<%= Formbuilder.templates['edit/integer_only']() %>",
	addButton: "<span class=\"symbol\"><span class=\"fa fa-number\">123</span></span> Nombre"
});
}).call(this);

(function() {
Formbuilder.registerField('paragraphe', {
	order: 5,
	view: "<textarea class='rf-size-<%= rf.get(Formbuilder.options.mappings.SIZE) %>'></textarea>",
	edit: "<%= Formbuilder.templates['edit/size']() %>\n<%= Formbuilder.templates['edit/min_max_length']() %>",
	addButton: "<span class=\"symbol\">&#182;</span> Paragraphe",
	defaultAttributes: function(attrs) {
		attrs.field_options.size = 'small';
		return attrs;
	}
});
}).call(this);

(function() {
Formbuilder.registerField('prix', {
	order: 45,
	view: "<div class='input-line'>\n  <span class='above-line'>cfp</span>\n  <span class='dolars'>\n    <input type='text' />\n  </span>\n </div>",
	edit: "",
	addButton: "<span class=\"symbol\">cfp</span> Prix"
});
}).call(this);

(function() {
Formbuilder.registerField('choix multiple', {
	order: 15,
	view: "<% for (i in (rf.get(Formbuilder.options.mappings.OPTIONS) || [])) { %>\n  <div>\n    <label class='fb-option'>\n      <input type='radio' <%= rf.get(Formbuilder.options.mappings.OPTIONS)[i].checked && 'checked' %> onclick=\"javascript: return false;\" />\n      <%= rf.get(Formbuilder.options.mappings.OPTIONS)[i].label %>\n    </label>\n  </div>\n<% } %>\n\n<% if (rf.get(Formbuilder.options.mappings.INCLUDE_OTHER)) { %>\n  <div class='other-option'>\n    <label class='fb-option'>\n      <input type='radio' />\n      Autre\n    </label>\n\n    <input type='text' />\n  </div>\n<% } %>",
	edit: "<%= Formbuilder.templates['edit/options']({ includeOther: true }) %>",
	addButton: "<span class=\"symbol\"><span class=\"fa fa-circle-o\"></span></span> Réponse unique",
	defaultAttributes: function(attrs) {
	attrs.field_options.options = [
		{
		label: "",
		checked: false
		}, {
		label: "",
		checked: false
		}
		];
	return attrs;
	}
});
}).call(this);

(function() {
Formbuilder.registerField('separateur', {
	order: 15,
	view: "<label class='section-name'></label>\n<p></p>",
	edit: "",
	addButton: "<span class='symbol'><span class='fa fa-minus'></span></span> Séparateur"
});
}).call(this);

(function() {
  Formbuilder.registerField('texte', {
    order: 0,
    view: "<input type='text' class='rf-size-<%= rf.get(Formbuilder.options.mappings.SIZE) %>' />",
    edit: "<%= Formbuilder.templates['edit/size']() %>\n<%= Formbuilder.templates['edit/min_max_length']() %>",
    addButton: "<span class='symbol'><span class='fa fa-font'></span></span> Texte",
    defaultAttributes: function(attrs) {
      attrs.field_options.size = 'small';
      return attrs;
    }
  });
}).call(this);

(function() {
Formbuilder.registerField('heure', {
	order: 25,
	view: "<div class='input-line'>\n  <span class='hours'>\n    <input type=\"text\" />\n    <label>HH</label>\n  </span>\n\n  <span class='above-line'>:</span>\n\n  <span class='minutes'>\n    <input type=\"text\" />\n    <label>MM</label>\n  </span>\n\n</div>",
	edit: "",
	addButton: "<span class=\"symbol\"><span class=\"fa fa-clock-o\"></span></span> Heure"
});
}).call(this);

(function() {
Formbuilder.registerField('site web', {
	order: 35,
	view: "<input type='text' placeholder='http://' />",
	edit: "",
	addButton: "<span class=\"symbol\"><span class=\"fa fa-link\"></span></span> Site web"
});
}).call(this);