Skip to content

Commit

Permalink
Merge pull request #54 from fedora-infra/feature/confirmation
Browse files Browse the repository at this point in the history
Add confirmation dialogs for all our "delete" actions.
  • Loading branch information
ralphbean committed Mar 23, 2015
2 parents 00f7b42 + 7e13a0e commit 0f067a9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
8 changes: 5 additions & 3 deletions fmn/web/templates/context.html
Expand Up @@ -140,7 +140,7 @@ <h4 class="list-group-item-heading">{{fltr.name}}</h4>
<button type="submit" name="method" value="delete" class="btn
btn-danger" data-toggle="tooltip" title="WARNING - Clicking this
button will permanently delete this filter. Consider disabling it
instead.">
instead." onclick="return confirm('Are you sure you want to permanently delete this filter?');">
<span class="glyphicon glyphicon-remove"></span>
Delete this filter</button>
</span>
Expand Down Expand Up @@ -515,7 +515,8 @@ <h3 class="panel-title">
<input name="context" id="context" value="{{current}}" type="hidden">
<p class="pull-right">
<button type="submit" class="btn btn-danger" name="reset_to_defaults" value="confirm"
{{'disabled' if preference.enabled is sameas false}}>
{{'disabled' if preference.enabled is sameas false}}
onclick="return confirm('Are you sure you want to reset your {{current}} filters to the defaults?');">
<span class="glyphicon glyphicon-repeat"></span> Reset
</button>
</p>
Expand All @@ -534,7 +535,8 @@ <h3 class="panel-title">
<input name="context" id="context" value="{{current}}" type="hidden">
<p class="pull-right">
<button type="submit" class="btn btn-danger" name="delete_all_filters" value="confirm"
{{'disabled' if preference.enabled is sameas false}}>
{{'disabled' if preference.enabled is sameas false}}
onclick="return confirm('Are you sure you want to delete all your existing {{current}} filters?');">
<span class="glyphicon glyphicon-remove"></span> Purge
</button>
</p>
Expand Down
6 changes: 4 additions & 2 deletions fmn/web/templates/filter.html
Expand Up @@ -69,7 +69,8 @@ <h3>sent to {{current}}</h3>
<button type="submit" class="btn btn-danger" name="method"
value="delete" data-toggle="tooltip" title="WARNING - Clicking this
button will permanently delete this filter. Consider disabling it
instead.">
instead."
onclick="return confirm('Are you sure you want to permanently delete this filter?');">
<span class="glyphicon glyphicon-remove"></span>Delete</button>
</span>
</div>
Expand Down Expand Up @@ -151,7 +152,8 @@ <h4 class="list-group-item-heading">
<span class="glyphicon glyphicon-exclamation-sign"></span>
Negate</button>
{% endif %}
<button type="submit" class="btn btn-danger btn-xs" name="method" value="delete">
<button type="submit" class="btn btn-danger btn-xs" name="method" value="delete"
onclick="return confirm('Are you sure you want to permanently delete this rule?');">
<span class="glyphicon glyphicon-remove"></span>
Delete</button>
</form>
Expand Down

0 comments on commit 0f067a9

Please sign in to comment.