[IMP] layout of website.prompt

bzr revid: fp@openerp.com-20131114212856-ff42xtka5dlv8c8c
This commit is contained in:
Fabien Pinckaers
2013-11-14 22:28:56 +01:00
parent cf5dfe897e
commit 85265aefb9
3 changed files with 16 additions and 12 deletions
@@ -545,8 +545,8 @@
new_page: function (ev) {
ev.preventDefault();
website.prompt({
window_title: "Create a new page",
input: "Page name",
window_title: "New Page",
input: "Page Title",
}).then(function (val) {
document.location = '/pagenew/' + encodeURI(val);
});
+12 -8
View File
@@ -106,18 +106,22 @@
<h3 class="modal-title"><t t-esc="window_title"/></h3>
</div>
<div class="modal-body">
<h4 class="list-group-item-heading" t-if="field_name">
<label for="page-name" class="control-label">
<t t-esc="field_name"/>
<form class="form-horizontal" role="form">
<div class="form-group mb0">
<label for="page-name" class="col-sm-3 control-label">
<t t-esc="field_name"/>:
</label>
</h4>
<input t-if="field_type == 'input'" type="text" class="form-control" required="required" t-att-placeholder="field_name"/>
<textarea t-if="field_type == 'textarea'" class="form-control" required="required" rows="5" t-att-placeholder="field_name"></textarea>
<select t-if="field_type == 'select'" class="form-control"></select>
<div class="col-sm-9">
<input t-if="field_type == 'input'" type="text" class="form-control" required="required"/>
<textarea t-if="field_type == 'textarea'" class="form-control" required="required" rows="5"></textarea>
<select t-if="field_type == 'select'" class="form-control"></select>
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn" data-dismiss="modal" aria-hidden="true">Cancel</button>
<button type="button" class="btn btn-primary">Ok</button>
<button type="button" class="btn btn-primary">Continue</button>
</div>
</div>
</div>
@@ -9,8 +9,8 @@
'click a[data-action=new_blog_post]': function (ev) {
ev.preventDefault();
website.prompt({
window_title: "Create a new blog post",
select: "Select Blog Category",
window_title: "New Blog Post",
select: "Select Blog",
init: function (field) {
return website.session.model('blog.category')
.call('name_search', [], { context: website.get_context() });