File tree 2 files changed +6
-2
lines changed
static/js/warehouse/controllers 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,10 @@ export default class extends Controller {
7
7
this . buttonTarget . disabled = true ;
8
8
}
9
9
10
+ cancel ( ) {
11
+ this . inputTarget . value = "" ;
12
+ }
13
+
10
14
check ( ) {
11
15
if ( this . inputTarget . value == this . buttonTarget . dataset . expected ) {
12
16
this . buttonTarget . disabled = false ;
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ <h3 class="sidebar-section__title">Your Account</h3>
64
64
< form method ="POST " class ="modal__form " action ="{{ action or request.current_route_path() }} ">
65
65
< input name ="csrf_token " type ="hidden " value ="{{ request.session.get_csrf_token() }} ">
66
66
{{ extra_fields if extra_fields else '' }}
67
- < a href ="#modal-close " title ="Close " class ="modal__close ">
67
+ < a href ="#modal-close " data-action =" click->confirm#cancel " title ="Close " class ="modal__close ">
68
68
< i class ="fa fa-times " aria-hidden ="true "> </ i >
69
69
< span class ="sr-only "> close</ span >
70
70
</ a >
@@ -79,7 +79,7 @@ <h3 class="modal__title">{{ title }} {{ confirm_string }}?</h3>
79
79
< input name ="{{ name }} " data-action ="input->confirm#check " data-target ="confirm.input " type ="text " placeholder ="{{ confirm_string }} " autocomplete ="off " autocorrect ="off " autocapitalize ="off ">
80
80
</ div >
81
81
< div class ="modal__footer ">
82
- < a href ="#modal-close " class ="button modal__action "> Cancel</ a >
82
+ < a href ="#modal-close " data-action =" click->confirm#cancel " class ="button modal__action "> Cancel</ a >
83
83
< button class ="button button--primary modal__action " data-target ="confirm.button " data-expected ="{{ confirm_string }} " type ="submit ">
84
84
{{ title }}
85
85
</ button >
You can’t perform that action at this time.
0 commit comments