mirror of
https://github.com/pretix/pretix.git
synced 2026-05-07 15:34:02 +00:00
Payments via Stripe (#30)
This commit is contained in:
@@ -6,3 +6,64 @@ $(function () {
|
||||
$($(this).attr("data-target")).collapse('show');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* Module for displaying "Waiting for..." dialog using Bootstrap
|
||||
*
|
||||
* @author Eugene Maslovich <ehpc@em42.ru>
|
||||
* MIT License
|
||||
*/
|
||||
|
||||
var waitingDialog = (function ($) {
|
||||
|
||||
// Creating modal dialog's DOM
|
||||
var $dialog = $(
|
||||
'<div class="modal fade" data-backdrop="static" data-keyboard="false" tabindex="-1" role="dialog" aria-hidden="true" style="padding-top:15%; overflow-y:visible;">' +
|
||||
'<div class="modal-dialog modal-m">' +
|
||||
'<div class="modal-content">' +
|
||||
'<div class="modal-header"><h3 style="margin:0;"></h3></div>' +
|
||||
'<div class="modal-body">' +
|
||||
'<div class="progress progress-striped active" style="margin-bottom:0;"><div class="progress-bar" style="width: 100%"></div></div>' +
|
||||
'</div>' +
|
||||
'</div></div></div>');
|
||||
|
||||
return {
|
||||
/**
|
||||
* Opens our dialog
|
||||
* @param message Custom message
|
||||
* @param options Custom options:
|
||||
* options.dialogSize - bootstrap postfix for dialog size, e.g. "sm", "m";
|
||||
* options.progressType - bootstrap postfix for progress bar type, e.g. "success", "warning".
|
||||
*/
|
||||
show: function (message, options) {
|
||||
// Assigning defaults
|
||||
var settings = $.extend({
|
||||
dialogSize: 'm',
|
||||
progressType: ''
|
||||
}, options);
|
||||
if (typeof message === 'undefined') {
|
||||
message = 'Loading';
|
||||
}
|
||||
if (typeof options === 'undefined') {
|
||||
options = {};
|
||||
}
|
||||
// Configuring dialog
|
||||
$dialog.find('.modal-dialog').attr('class', 'modal-dialog').addClass('modal-' + settings.dialogSize);
|
||||
$dialog.find('.progress-bar').attr('class', 'progress-bar');
|
||||
if (settings.progressType) {
|
||||
$dialog.find('.progress-bar').addClass('progress-bar-' + settings.progressType);
|
||||
}
|
||||
$dialog.find('h3').text(message);
|
||||
// Opening dialog
|
||||
$dialog.modal();
|
||||
},
|
||||
/**
|
||||
* Closes dialog
|
||||
*/
|
||||
hide: function () {
|
||||
$dialog.modal('hide');
|
||||
}
|
||||
}
|
||||
|
||||
})(jQuery);
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
.panel-title .radio {
|
||||
margin-left: 20px;
|
||||
}
|
||||
.form-control + .form-control-feedback {
|
||||
/* Fix for https://github.com/FortAwesome/Font-Awesome/issues/4313 */
|
||||
.form-control-feedback;
|
||||
}
|
||||
@@ -1,2 +1,4 @@
|
||||
{% load bootstrap3 %}
|
||||
{% bootstrap_form form layout='horizontal' %}
|
||||
<div class="form-horizontal">
|
||||
{% bootstrap_form form layout='horizontal' %}
|
||||
</div>
|
||||
Reference in New Issue
Block a user