[FIX] forbid spaces in db names
lp bug: https://launchpad.net/bugs/916771 fixed bzr revid: xmo@openerp.com-20120117120035-n7kk3uzfqwdgkm88
This commit is contained in:
@@ -280,6 +280,9 @@ openerp.web.Database = openerp.web.Widget.extend(/** @lends openerp.web.Database
|
||||
init: function(parent, element_id, option_id) {
|
||||
this._super(parent, element_id);
|
||||
this.unblockUIFunction = $.unblockUI;
|
||||
$.validator.addMethod('matches', function (s, _, re) {
|
||||
return new RegExp(re).test(s);
|
||||
}, _t("Invalid database name"));
|
||||
},
|
||||
start: function() {
|
||||
this.$option_id = $("#oe_db_options");
|
||||
|
||||
@@ -70,7 +70,8 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="db_name">New database name:</label></td>
|
||||
<td><input type="text" name="db_name" class="required"/></td>
|
||||
<td><input type="text" name="db_name"
|
||||
class="required" matches="^[a-zA-Z][a-zA-Z0-9_]+$"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="demo_data">Load Demonstration data:</label></td>
|
||||
|
||||
Reference in New Issue
Block a user