%#
name: headmin/fields/currency
accepts block: no
parameters:
form: Form object
attribute: Name of the attribute of the form model
label: (bool) Label will not be displayed if value is false
%>
<% label = local_assigns.has_key?(:label) ? label : true %>
<% required = local_assigns.has_key?(:required) ? required : false %>
<%= render 'headmin/forms/fields/label', form: form, attribute: attribute, required: required if label %>
€
<%= form.text_field(
attribute,
class: "form-control #{form_field_validation_class(form, attribute)}",
required: required,
'aria-describedby': form_field_validation_id(form, attribute))
%>
<%= render 'headmin/forms/fields/validation', form: form, attribute: attribute %>