Commit def86bdb287bea0268c576a7b09e973e312ac6e2

Authored by Larissa Reis
1 parent 4cd283ce

Field Name with required-field css

plugins/custom_forms/public/style.css
... ... @@ -45,6 +45,14 @@
45 45 margin: 0px;
46 46 }
47 47  
  48 +.field-box .required-field label{
  49 + font-weight: bold;
  50 + color: #c00;
  51 +}
  52 +.field-box .required-field label:after {
  53 + content: ' (*)';
  54 +}
  55 +
48 56 .field-select-type {
49 57 margin: 10px 0;
50 58 }
... ...
plugins/custom_forms/views/custom_forms_plugin_myprofile/_field.html.erb
1 1 <fieldset class="field-box" <%='style="display:none"' if f.object._destroy %> >
2 2 <legend><%= type_to_label(f.object.type) %></legend>
3 3 <div>
4   - <%= f.label :name, _('Name:') %>
  4 + <%= required f.label :name, _('Name:') %>
5 5 <%= f.text_field :name, :style => 'width: 14em' %>
6 6  
7 7 <%= f.hidden_field :type %>
... ...