Просмотр исходного кода

[minor] indicator_color in message

version-14
Rushabh Mehta 8 лет назад
Родитель
Сommit
23e340ab80
2 измененных файлов: 3 добавлений и 2 удалений
  1. +1
    -1
      frappe/__init__.py
  2. +2
    -1
      frappe/www/message.html

+ 1
- 1
frappe/__init__.py Просмотреть файл

@@ -1040,7 +1040,7 @@ def respond_as_web_page(title, html, success=None, http_status_code=None,

local.response['context'] = context

def redirect_to_message(title, html, http_status_code=None, context=None, indicator=None):
def redirect_to_message(title, html, http_status_code=None, context=None, indicator_color=None):
"""Redirects to /message?id=random
Similar to respond_as_web_page, but used to 'redirect' and show message pages like success, failure, etc. with a detailed message



+ 2
- 1
frappe/www/message.html Просмотреть файл

@@ -6,7 +6,8 @@

<div class='page-card'>
<div class='page-card-head'>
<span class='indicator {{ indicator_color }}'>{{ title or _("Message") }}</span>
<span class='indicator {{ indicator_color or "blue" }}'>
{{ title or _("Message") }}</span>
</div>
<p>{{ message or "" }}</p>
{% if primary_action %}


Загрузка…
Отмена
Сохранить