diff options
author | lin-hua-cheng <os.lcheng@gmail.com> | 2015-04-20 20:49:31 -0700 |
---|---|---|
committer | Lin Hua Cheng <os.lcheng@gmail.com> | 2015-04-21 13:56:28 +0000 |
commit | 83fcd5a14bf6f8ea8afa19f743044e2c9bccf771 (patch) | |
tree | f94d87b73c90e03e29d98be76f5470796503fc13 | |
parent | 7ac0cec821476d7ceed16b8ac7a1fbe701f25e09 (diff) | |
download | horizon-83fcd5a14bf6f8ea8afa19f743044e2c9bccf771.tar.gz |
Hide Cancel button if no cancel_url is provided
If there is no cancel_url is defined on the ModalFormView
class, hide the Cancel button.
Change-Id: Id27c60525560dcfdb5cfafa2c4cd7b4edffea158
Closes-Bug: #1434548
(cherry picked from commit 0e116f2a0b35cf4b013ae6fd9b693f096a967e0c)
-rw-r--r-- | horizon/templates/horizon/common/_modal_form.html | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/horizon/templates/horizon/common/_modal_form.html b/horizon/templates/horizon/common/_modal_form.html index 65e7ee994..03bd88156 100644 --- a/horizon/templates/horizon/common/_modal_form.html +++ b/horizon/templates/horizon/common/_modal_form.html @@ -40,10 +40,12 @@ </div> <div class="modal-footer"> {% block modal-footer %} + {% if cancel_url %} <a href="{% block cancel_url %}{{ cancel_url }}{% endblock %}" class="btn btn-default cancel"> {{ cancel_label }} </a> + {% endif %} <input class="btn btn-primary" type="submit" value="{{ submit_label }}"> {% endblock %} </div> |