<commit_before># Data-Confirm Modal

Uses [Bootstrap's modals](http://twitter.github.io/bootstrap/javascript.html#modals)
in place of the browser's builtin `confirm()` API for links generated through Rails'
helpers with the `:confirm` option.

Any link with the `data-confirm` attribute will trigger a Bootstrap modal.

HTML in the modal supported, and also the ability to have the user input a
certain value, for extra willingness confirmation (inspired by GitHub's
"delete repository" function).

## Installation

Add this line to your application's Gemfile:

    gem 'data-confirm-modal', github: 'ifad/data-confirm-modal'

Then execute:

    $ bundle

And then require the Javascript from your `application.js`:

    //= require data-confirm-modal

## Usage

By default, the overrides Rails' default behaviour for you, with no change
required to your code. The modal is applicable to `<a>`, `<button>` and `<input[submit]>` 
elements.

The modal's title will be get from the link's `title` attribute value. The
modal text will be taken from the `data-confirm` value. Multiple paragraphs
are created automatically from two newlines (`\n\n`).
<commit_msg>Add Bootstrap 2.x instructions (closes #11)<commit_after># Data-Confirm Modal

Uses [Bootstrap's modals](http://twitter.github.io/bootstrap/javascript.html#modals)
in place of the browser's builtin `confirm()` API for links generated through Rails'
helpers with the `:confirm` option.

Any link with the `data-confirm` attribute will trigger a Bootstrap modal.

HTML in the modal supported, and also the ability to have the user input a
certain value, for extra willingness confirmation (inspired by GitHub's
"delete repository" function).

## Installation

Add this line to your application's Gemfile:

    gem 'data-confirm-modal', github: 'ifad/data-confirm-modal'

if you are stuck on Bootstrap 2.3, use the `bootstrap2` branch:

    gem 'data-confirm-modal', github: 'ifad/data-confirm-modal', branch: 'bootstrap2'

Then execute:

    $ bundle

And then require the Javascript from your application.js`:

    //= require data-confirm-modal

## Usage

By default, the overrides Rails' default behaviour for you, with no change
required to your code. The modal is applicable to `<a>`, `<button>` and `<input[submit]>` 
elements.

The modal's title will be get from the link's `title` attribute value. The
modal text will be taken from the `data-confirm` value. Multiple paragraphs
are created automatically from two newlines (`\n\n`).

{'fraction_non_alphanumeric': 0.09338677354709418, 'fraction_numerical': 0.0028056112224448897, 'mean_word_length': 4.596412556053812, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4832961', 'n_tokens_mistral': 734, 'n_tokens_neox': 671, 'n_words': 312}