mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Commonized 'submit_label' text option
This commit is contained in:
parent
51d77ce4d2
commit
f44ba1c011
@ -76,7 +76,7 @@ class AjaxMixin(object):
|
||||
|
||||
data['title'] = self.ajax_form_title
|
||||
|
||||
data['submit_text'] = self.ajax_submit_text
|
||||
data['submit_label'] = self.ajax_submit_text
|
||||
|
||||
data['html_form'] = render_to_string(
|
||||
self.getAjaxTemplate(),
|
||||
|
@ -102,8 +102,8 @@ function openModal(options) {
|
||||
modalSetContent(modal, options.content);
|
||||
}
|
||||
|
||||
if (options.buttonText) {
|
||||
modalSetButtonText(modal, options.buttonText);
|
||||
if (options.submit_label) {
|
||||
modalSetButtonText(modal, options.submit_label);
|
||||
}
|
||||
|
||||
$(modal).modal({
|
||||
@ -256,8 +256,8 @@ function launchModalForm(url, options = {}) {
|
||||
modalSetTitle(modal, response.title);
|
||||
}
|
||||
|
||||
if (response.submit_text) {
|
||||
modalSetButtonText(response.submit_text);
|
||||
if (response.submit_label) {
|
||||
modalSetButtonText(response.submit_label);
|
||||
}
|
||||
|
||||
if (response.html_form) {
|
||||
|
@ -207,7 +207,7 @@ function moveStockItems(items, options) {
|
||||
openModal({
|
||||
modal: modal,
|
||||
title: "Move " + items.length + " stock items",
|
||||
buttonText: "Move"
|
||||
submit_label: "Move"
|
||||
});
|
||||
|
||||
// Extact part row info
|
||||
|
Loading…
Reference in New Issue
Block a user