Skip to content
Permalink
Browse files

[IMP] web: make the summary field mandatory on calendar view.

while creating the event directly from calendar it opens a quick create with summary field which is not mandatory.

Task Id #1917002
  • Loading branch information...
rja-odoo committed Feb 19, 2019
1 parent d56402a commit 9a264f415282ba407b8f7f76852afc6e75b33c26
@@ -77,6 +77,11 @@ var QuickCreate = Dialog.extend({
_quickAdd: function (dataCalendar) {
dataCalendar = $.extend({}, this.dataTemplate, dataCalendar);
var val = this.$('input').val().trim();
if (!val) {
this.$('label, input').addClass('o_field_invalid');
var warnings = _.str.sprintf('<ul><li>%s</li></ul>', _t("Summary"));
this.do_warn(_t("The following field is invalid:"), warnings);
}
dataCalendar.title = val;
return (val)? this.trigger_up('quickCreate', {data: dataCalendar, options: this.options}) : false;
},
@@ -95,8 +95,8 @@

<main t-name="CalendarView.quick_create" class="o_calendar_quick_create">
<div class="form-group">
<label for='name' class='col-form-label'>Summary:</label>
<input type='text' name='name' class="o_input" t-att-value="widget.dataTemplate.name or None"/>
<label for='name' class='col-form-label o_form_label'>Summary:</label>
<input type='text' name='name' class="o_input o_required_modifier" t-att-value="widget.dataTemplate.name or None"/>
</div>
</main>
</template>

0 comments on commit 9a264f4

Please sign in to comment.
You can’t perform that action at this time.