Skip to content

Commit

Permalink
PHRAS-1177_change-multi-on-field
Browse files Browse the repository at this point in the history
- change : no more "multi" checkbox when creating a field
- new field is not "report" anymore
#time 1h
  • Loading branch information
jygaulier committed Jun 27, 2016
1 parent 351dc5e commit e10a6f8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions lib/classes/databox/field.php
Expand Up @@ -923,8 +923,8 @@ public static function create(Application $app, databox $databox, $name)
`thumbtitle`, `multi`, `business`, `aggregable`,
`report`, `sorter`, `separator`)
VALUES (null, :name, '', 0, 0, 1, 'string', '',
null, 0,
0, 0, 1, :sorter, '')";
null, 0, 0, 0,
1, :sorter, '')";

$name = self::generateName($name);

Expand Down
4 changes: 1 addition & 3 deletions templates/web/admin/fields/templates.html.twig
Expand Up @@ -60,13 +60,11 @@
</div>
<div class="control-group">
<div class="controls">
<label class="checkbox">
<input id="new-multivalued" type="checkbox">{% trans %}Multivalued{% endtrans %}
</label>
<button type="button" class="btn btn-success btn-submit-field"><i class="icon-ok icon-white"></i>{% trans %}Add{% endtrans %}</button>
<button type="button" class="btn btn-cancel-field">{% trans %}Cancel{% endtrans %}</button>
</div>
</div>
<input id="new-multivalued" type="hidden" />
</form>
</div>
</div>
Expand Down
3 changes: 2 additions & 1 deletion www/scripts/apps/admin/fields/views/create.js
Expand Up @@ -130,7 +130,8 @@ define([
"label_fr": $("#new-label_fr", this.$el).val(),
"label_de": $("#new-label_de", this.$el).val(),
"label_nl": $("#new-label_nl", this.$el).val(),
"multi": $("#new-multivalued", this.$el).is(":checked")
"multi": $("#new-multivalued", this.$el).is(":checked"),
"report": false
});

field.save(null, {
Expand Down

0 comments on commit e10a6f8

Please sign in to comment.