2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-04-29 12:06:44 +00:00

Commonized 'submit_label' text option

This commit is contained in:
Oliver Walters 2019-04-13 21:11:42 +10:00
parent 51d77ce4d2
commit f44ba1c011
3 changed files with 6 additions and 6 deletions

View File

@ -76,7 +76,7 @@ class AjaxMixin(object):
data['title'] = self.ajax_form_title 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( data['html_form'] = render_to_string(
self.getAjaxTemplate(), self.getAjaxTemplate(),

View File

@ -102,8 +102,8 @@ function openModal(options) {
modalSetContent(modal, options.content); modalSetContent(modal, options.content);
} }
if (options.buttonText) { if (options.submit_label) {
modalSetButtonText(modal, options.buttonText); modalSetButtonText(modal, options.submit_label);
} }
$(modal).modal({ $(modal).modal({
@ -256,8 +256,8 @@ function launchModalForm(url, options = {}) {
modalSetTitle(modal, response.title); modalSetTitle(modal, response.title);
} }
if (response.submit_text) { if (response.submit_label) {
modalSetButtonText(response.submit_text); modalSetButtonText(response.submit_label);
} }
if (response.html_form) { if (response.html_form) {

View File

@ -207,7 +207,7 @@ function moveStockItems(items, options) {
openModal({ openModal({
modal: modal, modal: modal,
title: "Move " + items.length + " stock items", title: "Move " + items.length + " stock items",
buttonText: "Move" submit_label: "Move"
}); });
// Extact part row info // Extact part row info