2023-04-24 11:08:59 +00:00
{{ template "base/head" . }}
< div class = "page-content devtest ui container" >
2023-07-03 06:04:50 +00:00
{{ template "base/alert" . }}
2023-08-28 23:49:21 +00:00
< div id = "test-modal-form-1" class = "ui mini modal" >
< div class = "header" > Form dialog (layout 1)< / div >
2023-07-03 06:04:50 +00:00
< form class = "content" method = "post" >
2024-02-27 14:31:41 +00:00
< div class = "ui input tw-w-full" > < input name = "user_input" > < / div >
2023-09-24 20:31:58 +00:00
{{ template "base/modal_actions_confirm" ( dict "ModalButtonTypes" "confirm" ) }}
2023-07-03 06:04:50 +00:00
< / form >
< / div >
2023-08-28 23:49:21 +00:00
< div id = "test-modal-form-2" class = "ui mini modal" >
< div class = "header" > Form dialog (layout 2)< / div >
< form method = "post" >
< div class = "content" >
2024-02-27 14:31:41 +00:00
< div class = "ui input tw-w-full" > < input name = "user_input" > < / div >
2023-09-24 20:31:58 +00:00
{{ template "base/modal_actions_confirm" ( dict "ModalButtonTypes" "confirm" ) }}
2023-08-28 23:49:21 +00:00
< / div >
< / form >
< / div >
< div id = "test-modal-form-3" class = "ui mini modal" >
< div class = "header" > Form dialog (layout 3)< / div >
< form method = "post" >
< div class = "content" >
2024-02-27 14:31:41 +00:00
< div class = "ui input tw-w-full" > < input name = "user_input" > < / div >
2023-08-28 23:49:21 +00:00
< / div >
2023-09-24 20:31:58 +00:00
{{ template "base/modal_actions_confirm" ( dict "ModalButtonTypes" "confirm" ) }}
2023-08-28 23:49:21 +00:00
< / form >
2023-09-11 17:06:05 +00:00
< / div >
< div id = "test-modal-form-4" class = "ui mini modal" >
< div class = "header" > Form dialog (layout 4)< / div >
< div class = "content" >
2024-02-27 14:31:41 +00:00
< div class = "ui input tw-w-full" > < input name = "user_input" > < / div >
2023-09-11 17:06:05 +00:00
< / div >
< form method = "post" >
2023-09-24 20:31:58 +00:00
{{ template "base/modal_actions_confirm" ( dict "ModalButtonTypes" "confirm" ) }}
2023-09-11 17:06:05 +00:00
< / form >
2023-08-28 23:49:21 +00:00
< / div >
2023-07-03 06:04:50 +00:00
2023-04-24 11:08:59 +00:00
< div class = "ui g-modal-confirm modal" id = "test-modal-default" >
< div class = "header" > {{ svg "octicon-file" }} Default dialog < span > title</ span ></ div >
< div class = "content" >
very long aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
< / div >
2023-09-24 20:31:58 +00:00
{{ template "base/modal_actions_confirm" }}
2023-04-24 11:08:59 +00:00
< / div >
< div class = "ui g-modal-confirm modal" id = "test-modal-confirm" >
< div class = "header" > Confirm dialog< / div >
< div class = "content" > hello, this is the modal dialog content< / div >
2023-09-24 20:31:58 +00:00
{{ template "base/modal_actions_confirm" ( dict "ModalButtonTypes" "confirm" ) }}
2023-04-24 11:08:59 +00:00
< / div >
< div class = "ui g-modal-confirm modal" id = "test-modal-blue" >
< div class = "header" > Blue dialog< / div >
< div class = "content" > hello, this is the modal dialog content< / div >
2023-09-24 20:31:58 +00:00
{{ template "base/modal_actions_confirm" ( dict "ModalButtonColors" "blue" ) }}
2023-04-24 11:08:59 +00:00
< / div >
< div class = "ui g-modal-confirm modal" id = "test-modal-yellow" >
< div class = "header" > yellow dialog< / div >
< div class = "content" > hello, this is the modal dialog content< / div >
2023-09-24 20:31:58 +00:00
{{ template "base/modal_actions_confirm" ( dict "ModalButtonColors" "yellow" ) }}
2023-04-24 11:08:59 +00:00
< / div >
< div class = "ui g-modal-confirm modal" id = "test-modal-danger" >
{{ svg "octicon-x" 16 "inside close" }}
< div class = "header" > dangerous action dialog< / div >
< div class = "content" > hello, this is the modal dialog content, this is a dangerous operation< / div >
{{ template "base/modal_actions_confirm" ( dict "ModalButtonDangerText" "I know and must do this is dangerous operation" ) }}
< / div >
2023-08-28 23:49:21 +00:00
< div class = "modal-buttons flex-text-block gt-fw" > < / div >
2023-04-24 11:08:59 +00:00
< script type = "module" >
for (const el of $('.ui.modal')) {
2023-08-28 23:49:21 +00:00
const $btn = $('< button > ').text(`${el.id}`).on('click', () => {
2023-04-24 11:08:59 +00:00
$(el).modal({onApprove() {alert('confirmed')}}).modal('show');
});
$('.modal-buttons').append($btn);
}
< / script >
< / div >
{{ template "base/footer" . }}