Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QA-6732: Add type button #34822

Merged
merged 7 commits into from
Jun 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script type="text/html" id="button-entry-ko-template">
<button class="btn btn-default" data-bind="click: onClick, attr: {id: entryId}">
<button type="button" class="btn btn-default" data-bind="click: onClick, attr: {id: entryId}">
<span data-bind="renderMarkdown: buttonLabel()"></span>
</button>
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"/>
</div>
<div class="col-xs-4">
<button class="btn btn-default btn-xs pull-right" data-bind="
<button type="button" class="btn btn-default btn-xs pull-right" data-bind="
click: onClear,
text: $root.getTranslation('upload.clear.title', '{% trans_html_attr 'Clear' %}'),
">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<td class="lat coordinate" data-bind="text: formatLat()"></td>
<td class="lon coordinate" data-bind="text: formatLon()"></td>
<td align="right" valign="bottom">
<button class="btn btn-default btn-xs clear" data-bind="click: onClear">{% trans "Clear map" %}</button>
<button type="button" class="btn btn-default btn-xs clear" data-bind="click: onClear">{% trans "Clear map" %}</button>
</td>
</tr>
</tbody>
Expand All @@ -26,7 +26,7 @@
<div class="input-group">
<input class="query form-control" type="text" />
<span class="input-group-btn">
<button class="btn btn-default search">{% trans "Search" %}</button>
<button type="button" class="btn btn-default search">{% trans "Search" %}</button>
</span>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</div>
</div>
</div>
<button class="btn btn-default btn-xs pull-right" data-bind="click: onClear, fadeVisible: !isMulti && rawAnswer()">
<button type="button" class="btn btn-default btn-xs pull-right" data-bind="click: onClear, fadeVisible: !isMulti && rawAnswer()">
{% trans "Clear" %}
</button>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
style="border: 1px solid #ccc; border-radius: 4px;"/>
</canvas>
</div>
<button class="btn btn-default btn-xs pull-right" data-bind="click: onClear">
<button type="button" class="btn btn-default btn-xs pull-right" data-bind="click: onClear">
{% trans "Clear" %}
</button>
<input type="file" class="hidden" data-bind="
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<script type="text/html" id="sub-group-fullform-ko-template">
<!-- ko if: isDummy -->
<div style="margin-bottom: 10px; margin-right: 10px">
<button class="btn btn-default add" href="#"
<button type="button" class="btn btn-default add" href="#"
data-bind="click: newRepeat, text: addChoice"
id="repeat-add-new">
<i class="fa fa-plus"></i>
Expand Down Expand Up @@ -48,7 +48,10 @@
data-bind="
html: ko.utils.unwrapObservable($data.caption_markdown) || caption(),
"></span>
<button class="btn btn-danger del pull-right" href="#" aria-label="{% trans_html_attr 'Delete Repeat' %}"
<button type="button"
class="btn btn-danger del pull-right"
href="#"
aria-label="{% trans_html_attr 'Delete Repeat' %}"
data-bind="
visible: showDelete,
enabled: hasNoPendingAnswer(),
Expand All @@ -65,8 +68,11 @@
</div>
<span class="webapp-markdown-output caption" data-bind="html: caption_markdown() || caption(), attr: {id: captionId()}"></span>
<i class="fa fa-warning text-danger pull-right" data-bind="visible: hasError() && !showChildren()"></i>
<button class="btn btn-danger del pull-right" href="#" aria-label="{% trans_html_attr 'Delete Repeat' %}"
data-bind="
<button type="button"
class="btn btn-danger del pull-right"
href="#"
aria-label="{% trans_html_attr 'Delete Repeat' %}"
data-bind="
visible: showDelete,
enabled: hasNoPendingAnswer(),
click: deleteRepeat
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script type="text/html" id="button-entry-ko-template">
<button class="btn btn-outline-primary" data-bind="click: onClick, attr: {id: entryId}">
<button type="button" class="btn btn-outline-primary" data-bind="click: onClick, attr: {id: entryId}">
<span data-bind="renderMarkdown: buttonLabel()"></span>
</button>
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"/>
</div>
<div class="col-sm-4">
<button class="btn btn-outline-primary btn-sm float-end" data-bind="
<button type="button" class="btn btn-outline-primary btn-sm float-end" data-bind="
click: onClear,
text: $root.getTranslation('upload.clear.title', '{% trans_html_attr 'Clear' %}'),
">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<td class="lat coordinate" data-bind="text: formatLat()"></td>
<td class="lon coordinate" data-bind="text: formatLon()"></td>
<td align="right" valign="bottom">
<button class="btn btn-outline-primary btn-sm clear" data-bind="click: onClear">{% trans "Clear map" %}</button>
<button type="button" class="btn btn-outline-primary btn-sm clear" data-bind="click: onClear">{% trans "Clear map" %}</button>
</td>
</tr>
</tbody>
Expand All @@ -27,7 +27,7 @@
type="text"
data-bind="css: { 'is-invalid': $parent.hasError() }"
/>
<button class="btn btn-outline-primary search">{% trans "Search" %}</button>
<button type="button" class="btn btn-outline-primary search">{% trans "Search" %}</button>
</div>
</div>
</form>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
></label>
</div>
</div>
<button class="btn btn-outline-primary btn-sm float-end" data-bind="click: onClear, fadeVisible: !isMulti && rawAnswer()">
<button type="button" class="btn btn-outline-primary btn-sm float-end" data-bind="click: onClear, fadeVisible: !isMulti && rawAnswer()">
{% trans "Clear" %}
</button>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
class="border rounded" />
</canvas>
</div>
<button class="btn btn-outline-primary btn-sm float-end" data-bind="click: onClear">
<button type="button" class="btn btn-outline-primary btn-sm float-end" data-bind="click: onClear">
{% trans "Clear" %}
</button>
<input type="file" class="d-none" data-bind="
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<script type="text/html" id="sub-group-fullform-ko-template">
<!-- ko if: isDummy -->
<div class="mb-1 mr-1">
<button class="btn btn-outline-primary add" href="#"
<button type="button" class="btn btn-outline-primary add" href="#"
data-bind="click: newRepeat, text: addChoice"
id="repeat-add-new">
<i class="fa fa-plus"></i>
Expand Down Expand Up @@ -48,7 +48,10 @@
data-bind="
html: ko.utils.unwrapObservable($data.caption_markdown) || caption(),
"></span>
<button class="btn btn-outline-danger del float-end" href="#" aria-label="{% trans_html_attr 'Delete Repeat' %}"
<button type="button"
class="btn btn-outline-danger del float-end"
href="#"
aria-label="{% trans_html_attr 'Delete Repeat' %}"
data-bind="
visible: showDelete,
enabled: hasNoPendingAnswer(),
Expand All @@ -65,12 +68,15 @@
</div>
<span class="webapp-markdown-output caption" data-bind="html: caption_markdown() || caption(), attr: {id: captionId()}"></span>
<i class="fa fa-warning text-danger float-end" data-bind="visible: hasError() && !showChildren()"></i>
<button class="btn btn-outline-danger del float-end" href="#" aria-label="{% trans_html_attr 'Delete Repeat' %}"
data-bind="
<button type="button"
class="btn btn-outline-danger del float-end"
href="#"
aria-label="{% trans_html_attr 'Delete Repeat' %}"
data-bind="
visible: showDelete,
enabled: hasNoPendingAnswer(),
click: deleteRepeat
"><i class="fa fa-remove"></i></button>
"><i class="fa fa-remove"></i></button>
</div>
</div>
<span class="ix"></span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
+++
@@ -1,5 +1,5 @@
<script type="text/html" id="button-entry-ko-template">
- <button class="btn btn-default" data-bind="click: onClick, attr: {id: entryId}">
+ <button class="btn btn-outline-primary" data-bind="click: onClick, attr: {id: entryId}">
- <button type="button" class="btn btn-default" data-bind="click: onClick, attr: {id: entryId}">
+ <button type="button" class="btn btn-outline-primary" data-bind="click: onClick, attr: {id: entryId}">
<span data-bind="renderMarkdown: buttonLabel()"></span>
</button>
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
"/>
</div>
- <div class="col-xs-4">
- <button class="btn btn-default btn-xs pull-right" data-bind="
- <button type="button" class="btn btn-default btn-xs pull-right" data-bind="
+ <div class="col-sm-4">
+ <button class="btn btn-outline-primary btn-sm float-end" data-bind="
+ <button type="button" class="btn btn-outline-primary btn-sm float-end" data-bind="
click: onClear,
text: $root.getTranslation('upload.clear.title', '{% trans_html_attr 'Clear' %}'),
">
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<td class="lat coordinate" data-bind="text: formatLat()"></td>
<td class="lon coordinate" data-bind="text: formatLon()"></td>
<td align="right" valign="bottom">
- <button class="btn btn-default btn-xs clear" data-bind="click: onClear">{% trans "Clear map" %}</button>
+ <button class="btn btn-outline-primary btn-sm clear" data-bind="click: onClear">{% trans "Clear map" %}</button>
- <button type="button" class="btn btn-default btn-xs clear" data-bind="click: onClear">{% trans "Clear map" %}</button>
+ <button type="button" class="btn btn-outline-primary btn-sm clear" data-bind="click: onClear">{% trans "Clear map" %}</button>
</td>
</tr>
</tbody>
Expand All @@ -18,7 +18,7 @@
- <div class="input-group">
- <input class="query form-control" type="text" />
- <span class="input-group-btn">
- <button class="btn btn-default search">{% trans "Search" %}</button>
- <button type="button" class="btn btn-default search">{% trans "Search" %}</button>
- </span>
- </div>
+ <div class="mt-1" data-bind="css: control_width">
Expand All @@ -27,7 +27,7 @@
+ type="text"
+ data-bind="css: { 'is-invalid': $parent.hasError() }"
+ />
+ <button class="btn btn-outline-primary search">{% trans "Search" %}</button>
+ <button type="button" class="btn btn-outline-primary search">{% trans "Search" %}</button>
</div>
</div>
</form>
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
+ ></label>
</div>
</div>
- <button class="btn btn-default btn-xs pull-right" data-bind="click: onClear, fadeVisible: !isMulti && rawAnswer()">
+ <button class="btn btn-outline-primary btn-sm float-end" data-bind="click: onClear, fadeVisible: !isMulti && rawAnswer()">
- <button type="button" class="btn btn-default btn-xs pull-right" data-bind="click: onClear, fadeVisible: !isMulti && rawAnswer()">
+ <button type="button" class="btn btn-outline-primary btn-sm float-end" data-bind="click: onClear, fadeVisible: !isMulti && rawAnswer()">
{% trans "Clear" %}
</button>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
+ class="border rounded" />
</canvas>
</div>
- <button class="btn btn-default btn-xs pull-right" data-bind="click: onClear">
+ <button class="btn btn-outline-primary btn-sm float-end" data-bind="click: onClear">
- <button type="button" class="btn btn-default btn-xs pull-right" data-bind="click: onClear">
+ <button type="button" class="btn btn-outline-primary btn-sm float-end" data-bind="click: onClear">
{% trans "Clear" %}
</button>
- <input type="file" class="hidden" data-bind="
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
<script type="text/html" id="sub-group-fullform-ko-template">
<!-- ko if: isDummy -->
- <div style="margin-bottom: 10px; margin-right: 10px">
- <button class="btn btn-default add" href="#"
- <button type="button" class="btn btn-default add" href="#"
+ <div class="mb-1 mr-1">
+ <button class="btn btn-outline-primary add" href="#"
+ <button type="button" class="btn btn-outline-primary add" href="#"
data-bind="click: newRepeat, text: addChoice"
id="repeat-add-new">
<i class="fa fa-plus"></i>
Expand All @@ -28,27 +28,36 @@
clickable: collapsible
},
attr: collapsible ? {
@@ -48,7 +48,7 @@
data-bind="
@@ -49,7 +49,7 @@
html: ko.utils.unwrapObservable($data.caption_markdown) || caption(),
"></span>
- <button class="btn btn-danger del pull-right" href="#" aria-label="{% trans_html_attr 'Delete Repeat' %}"
+ <button class="btn btn-outline-danger del float-end" href="#" aria-label="{% trans_html_attr 'Delete Repeat' %}"
<button type="button"
- class="btn btn-danger del pull-right"
+ class="btn btn-outline-danger del float-end"
href="#"
aria-label="{% trans_html_attr 'Delete Repeat' %}"
data-bind="
visible: showDelete,
enabled: hasNoPendingAnswer(),
@@ -64,8 +64,8 @@
@@ -67,16 +67,16 @@
"></i>
</div>
<span class="webapp-markdown-output caption" data-bind="html: caption_markdown() || caption(), attr: {id: captionId()}"></span>
- <i class="fa fa-warning text-danger pull-right" data-bind="visible: hasError() && !showChildren()"></i>
- <button class="btn btn-danger del pull-right" href="#" aria-label="{% trans_html_attr 'Delete Repeat' %}"
+ <i class="fa fa-warning text-danger float-end" data-bind="visible: hasError() && !showChildren()"></i>
+ <button class="btn btn-outline-danger del float-end" href="#" aria-label="{% trans_html_attr 'Delete Repeat' %}"
data-bind="
<button type="button"
- class="btn btn-danger del pull-right"
+ class="btn btn-outline-danger del float-end"
href="#"
aria-label="{% trans_html_attr 'Delete Repeat' %}"
data-bind="
visible: showDelete,
enabled: hasNoPendingAnswer(),
@@ -86,7 +86,7 @@
click: deleteRepeat
- "><i class="fa fa-remove"></i></button>
+ "><i class="fa fa-remove"></i></button>
</div>
</div>
<span class="ix"></span>
@@ -92,7 +92,7 @@
afterRender: focusNewRepeat,
},
css: {
Expand Down
Loading