apply type="button" on all buttons to make submit on enter work
This commit is contained in:
@ -42,7 +42,7 @@ class Input(ABC):
|
||||
input=input,
|
||||
infotext=infotext,
|
||||
removable="removable" if self.removable else "",
|
||||
removebutton='<button class="btn btn-sm btn-danger option-remove-button">Remove</button>'
|
||||
removebutton='<button type="button" class="btn btn-sm btn-danger option-remove-button">Remove</button>'
|
||||
if self.removable
|
||||
else "",
|
||||
)
|
||||
|
@ -227,7 +227,7 @@ class SchedulerInput(Input):
|
||||
<div class="row scheduler-static-time-inputs">
|
||||
{time_inputs}
|
||||
{select}
|
||||
<button class="btn btn-sm btn-danger remove-button">X</button>
|
||||
<button type="button" class="btn btn-sm btn-danger remove-button">X</button>
|
||||
</div>
|
||||
""".format(
|
||||
time_inputs=render_time_inputs(slot),
|
||||
@ -241,10 +241,10 @@ class SchedulerInput(Input):
|
||||
<div class="row scheduler-static-time-inputs template" style="display: none;">
|
||||
{time_inputs}
|
||||
{select}
|
||||
<button class="btn btn-sm btn-danger remove-button">X</button>
|
||||
<button type="button" class="btn btn-sm btn-danger remove-button">X</button>
|
||||
</div>
|
||||
<div class="row">
|
||||
<button class="btn btn-sm btn-primary col-12 add-button">Add...</button>
|
||||
<button type="button" class="btn btn-sm btn-primary col-12 add-button">Add...</button>
|
||||
</div>
|
||||
""".format(
|
||||
rows=rows,
|
||||
|
@ -11,8 +11,8 @@ class ImageInput(Input, metaclass=ABCMeta):
|
||||
<div class="image-container">
|
||||
<img class="{classes}" src="{url}" alt="{label}"/>
|
||||
</div>
|
||||
<button class="btn btn-primary upload">Upload new image...</button>
|
||||
<button class="btn btn-secondary restore">Restore original image</button>
|
||||
<button type="button" class="btn btn-primary upload">Upload new image...</button>
|
||||
<button type="button" class="btn btn-secondary restore">Restore original image</button>
|
||||
</div>
|
||||
""".format(
|
||||
id=self.id, label=self.label, url=self.cachebuster(self.getUrl()), classes=" ".join(self.getImgClasses())
|
||||
|
Reference in New Issue
Block a user