Uploaded image for project: 'Blesta Core'
  1. Blesta Core
  2. CORE-552

Add support for a data attribute with input fields for auto-generating a password

    Details

      Description

      To setup password-autogeneration, add a set of data attributes to a clickable element, which will open a modal and allow you to generate a password.

      The clickable element must have the class name generate-password to automatically be set as a password-generating modal.

      The following data attributes must be set on the generate-password-class element:

      • data-base-url The base URL of the Blesta installation. This is generally the value of $this->base_uri in php
      • data-for-class The name of a CSS class to set the generated password to. HTML elements of this class will be set the password
      • data-length The length of the password to generate (e.g. 10)
      • data-options A string-representation of JSON data representing characters to include in the password generator. This must be formatted as described in unicode-passgen.
        • The below example will include all latin alpha characters lower-case and upper-case from A to Z, but exclude the lower and upper-case letter 'i'.
        • {"include": [{"chars": [["A", "Z"], ["a", "z"]]}], "exclude": [{"chars": [["i"], ["I"]]}]}

      The following data attributes are optional:

      • data-modal-title This is the title to set for the modal. By default, it will use the text of the generate-password element
      • (Admin UI only) data-modal-close This is the name to set as the close button language, e.g. 'Close'

      Password fields are used throughout the system, (in core, modules, etc.) many of which need 2 fields (one for the password, one for confirmation).

      We would like to include a simple Blesta core-javascript function for generating a modal, allowing a password to be generated and auto-populate the password fields. It will show the user the plaintext password so they can copy it (like cPanel).

      A simple "data-generate-password='unique_field'" attribute to the input field(s) would auto-set this modal to the form next to the field. I imagine the attribute should contain a unique value per SET of fields to which the password should apply.
      e.g.
      if we have password and confirm_password fields, they should both have the same attribute value so that we only display the "generate password" link next to the first field, instead of both, and both will still be updated when a password is generated.

        Issue Links

          Activity

          tyson Tyson Phillips (Inactive) created issue -
          admin Paul Phillips made changes -
          Field Original Value New Value
          Fix Version/s 3.3.0 [ 10100 ]
          Fix Version/s 3.1.0 [ 10001 ]
          admin Paul Phillips made changes -
          Security Private [ 10000 ]
          admin Paul Phillips made changes -
          Fix Version/s 3.3.0-b2 [ 10507 ]
          Fix Version/s 3.3.0-b1 [ 10100 ]
          admin Paul Phillips made changes -
          Fix Version/s 3.3.0 [ 10508 ]
          Fix Version/s 3.3.0-b2 [ 10507 ]
          admin Paul Phillips made changes -
          Fix Version/s 3.4.0 [ 10400 ]
          Fix Version/s 3.3.0 [ 10508 ]
          admin Paul Phillips made changes -
          Fix Version/s 3.4.0 [ 10400 ]
          admin Paul Phillips made changes -
          Link This issue relates to CORE-1562 [ CORE-1562 ]
          admin Paul Phillips made changes -
          Fix Version/s Long Term [ 10801 ]
          admin Paul Phillips made changes -
          Attachment passwd-selector.png [ 11651 ]
          tyson Tyson Phillips (Inactive) made changes -
          Link This issue blocks CORE-2584 [ CORE-2584 ]
          tyson Tyson Phillips (Inactive) made changes -
          Rank Ranked higher
          tyson Tyson Phillips (Inactive) made changes -
          Story Points 8
          tyson Tyson Phillips (Inactive) made changes -
          Fix Version/s 4.3.0 [ 11022 ]
          Fix Version/s Long Term [ 10801 ]
          tyson Tyson Phillips (Inactive) made changes -
          Sprint 4.3.0 Sprint 5 [ 55 ]
          tyson Tyson Phillips (Inactive) made changes -
          Sprint 4.3.0 Sprint 5 [ 55 ] 4.3.0 Sprint 4 [ 54 ]
          tyson Tyson Phillips (Inactive) made changes -
          Rank Ranked higher
          tyson Tyson Phillips (Inactive) made changes -
          Remaining Estimate 0 minutes [ 0 ]
          Time Spent 29 minutes [ 1740 ]
          Worklog Id 10784 [ 10784 ]
          Automated transition triggered when Tyson Phillips (Inactive) created a branch in Stash -
          Status Open [ 1 ] In Progress [ 3 ]
          tyson Tyson Phillips (Inactive) made changes -
          Time Spent 29 minutes [ 1740 ] 4 hours, 1 minute [ 14460 ]
          Worklog Id 10791 [ 10791 ]
          tyson Tyson Phillips (Inactive) made changes -
          Time Spent 4 hours, 1 minute [ 14460 ] 4 hours, 54 minutes [ 17640 ]
          Worklog Id 10792 [ 10792 ]
          tyson Tyson Phillips (Inactive) made changes -
          Time Spent 4 hours, 54 minutes [ 17640 ] 1 day, 42 minutes [ 31320 ]
          Worklog Id 10795 [ 10795 ]
          tyson Tyson Phillips (Inactive) made changes -
          Time Spent 1 day, 42 minutes [ 31320 ] 1 day, 3 hours, 38 minutes [ 41880 ]
          Worklog Id 10809 [ 10809 ]
          tyson Tyson Phillips (Inactive) made changes -
          Time Spent 1 day, 3 hours, 38 minutes [ 41880 ] 2 days, 7 minutes [ 58020 ]
          Worklog Id 10816 [ 10816 ]
          tyson Tyson Phillips (Inactive) made changes -
          Time Spent 2 days, 7 minutes [ 58020 ] 2 days, 1 hour, 14 minutes [ 62040 ]
          Worklog Id 10822 [ 10822 ]
          tyson Tyson Phillips (Inactive) made changes -
          Time Spent 2 days, 1 hour, 14 minutes [ 62040 ] 2 days, 2 hours, 44 minutes [ 67440 ]
          Worklog Id 10823 [ 10823 ]
          tyson Tyson Phillips (Inactive) made changes -
          Description Password fields are used throughout the system, (in core, modules, etc.) many of which need 2 fields (one for the password, one for confirmation).

          We would like to include a simple Blesta core-javascript function for generating a modal, allowing a password to be generated and auto-populate the password fields. It will show the user the plaintext password so they can copy it (like cPanel).

          A simple "data-generate-password='unique_field'" attribute to the input field(s) would auto-set this modal to the form next to the field. I imagine the attribute should contain a unique value per SET of fields to which the password should apply.
          e.g.
          if we have password and confirm_password fields, they should both have the same attribute value so that we only display the "generate password" link next to the first field, instead of both, and both will still be updated when a password is generated.
          To setup password-autogeneration, add a set of data attributes to a clickable element, which will open a modal and allow you to generate a password.

          The clickable element must have the class name *generate-password* to automatically be set as a password-generating modal.

          The following data attributes *must* be set on the *generate-password*-class element:
          * data-base-url The base URL of the Blesta installation. This is generally the value of _$this->base_uri_ in php
          * data-for-class The name of a CSS class to set the generated password to. HTML elements of this class will be set the password
          * data-length The length of the password to generate (e.g. 10)
          * data-options A string-representation of JSON data representing characters to include in the password generator. This must be formatted as described in [unicode-passgen|https://github.com/phillipsdata/unicode-passgen#api].
          ** The below example will include all latin alpha characters lower-case and upper-case from A to Z, but exclude the lower and upper-case letter 'i'.
          ** \{"include": \[\{"chars": \[\["A", "Z"\], \["a", "z"\]\]\}\], "exclude": \[\{"chars": \[\["i"\], \["I"\]\]\}\]\}

          The following data attributes are optional:
          - data-modal-title This is the title to set for the modal. By default, it will use the text of the *generate-password* element
          - data-modal-close This is the name to set as the close button language, e.g. 'Close'

          ----

          Password fields are used throughout the system, (in core, modules, etc.) many of which need 2 fields (one for the password, one for confirmation).

          We would like to include a simple Blesta core-javascript function for generating a modal, allowing a password to be generated and auto-populate the password fields. It will show the user the plaintext password so they can copy it (like cPanel).

          A simple "data-generate-password='unique_field'" attribute to the input field(s) would auto-set this modal to the form next to the field. I imagine the attribute should contain a unique value per SET of fields to which the password should apply.
          e.g.
          if we have password and confirm_password fields, they should both have the same attribute value so that we only display the "generate password" link next to the first field, instead of both, and both will still be updated when a password is generated.
          tyson Tyson Phillips (Inactive) made changes -
          Description To setup password-autogeneration, add a set of data attributes to a clickable element, which will open a modal and allow you to generate a password.

          The clickable element must have the class name *generate-password* to automatically be set as a password-generating modal.

          The following data attributes *must* be set on the *generate-password*-class element:
          * data-base-url The base URL of the Blesta installation. This is generally the value of _$this->base_uri_ in php
          * data-for-class The name of a CSS class to set the generated password to. HTML elements of this class will be set the password
          * data-length The length of the password to generate (e.g. 10)
          * data-options A string-representation of JSON data representing characters to include in the password generator. This must be formatted as described in [unicode-passgen|https://github.com/phillipsdata/unicode-passgen#api].
          ** The below example will include all latin alpha characters lower-case and upper-case from A to Z, but exclude the lower and upper-case letter 'i'.
          ** \{"include": \[\{"chars": \[\["A", "Z"\], \["a", "z"\]\]\}\], "exclude": \[\{"chars": \[\["i"\], \["I"\]\]\}\]\}

          The following data attributes are optional:
          - data-modal-title This is the title to set for the modal. By default, it will use the text of the *generate-password* element
          - data-modal-close This is the name to set as the close button language, e.g. 'Close'

          ----

          Password fields are used throughout the system, (in core, modules, etc.) many of which need 2 fields (one for the password, one for confirmation).

          We would like to include a simple Blesta core-javascript function for generating a modal, allowing a password to be generated and auto-populate the password fields. It will show the user the plaintext password so they can copy it (like cPanel).

          A simple "data-generate-password='unique_field'" attribute to the input field(s) would auto-set this modal to the form next to the field. I imagine the attribute should contain a unique value per SET of fields to which the password should apply.
          e.g.
          if we have password and confirm_password fields, they should both have the same attribute value so that we only display the "generate password" link next to the first field, instead of both, and both will still be updated when a password is generated.
          To setup password-autogeneration, add a set of data attributes to a clickable element, which will open a modal and allow you to generate a password.

          The clickable element must have the class name *generate-password* to automatically be set as a password-generating modal.

          The following data attributes *must* be set on the *generate-password*-class element:
          * _data-base-url_ The base URL of the Blesta installation. This is generally the value of _$this->base_uri_ in php
          * _data-for-class_ The name of a CSS class to set the generated password to. HTML elements of this class will be set the password
          * _data-length_ The length of the password to generate (e.g. 10)
          * _data-options_ A string-representation of JSON data representing characters to include in the password generator. This must be formatted as described in [unicode-passgen|https://github.com/phillipsdata/unicode-passgen#api].
          ** The below example will include all latin alpha characters lower-case and upper-case from A to Z, but exclude the lower and upper-case letter 'i'.
          ** \{"include": \[\{"chars": \[\["A", "Z"\], \["a", "z"\]\]\}\], "exclude": \[\{"chars": \[\["i"\], \["I"\]\]\}\]\}

          The following data attributes are optional:
          - _data-modal-title_ This is the title to set for the modal. By default, it will use the text of the *generate-password* element
          - _data-modal-close_ This is the name to set as the close button language, e.g. 'Close'

          ----

          Password fields are used throughout the system, (in core, modules, etc.) many of which need 2 fields (one for the password, one for confirmation).

          We would like to include a simple Blesta core-javascript function for generating a modal, allowing a password to be generated and auto-populate the password fields. It will show the user the plaintext password so they can copy it (like cPanel).

          A simple "data-generate-password='unique_field'" attribute to the input field(s) would auto-set this modal to the form next to the field. I imagine the attribute should contain a unique value per SET of fields to which the password should apply.
          e.g.
          if we have password and confirm_password fields, they should both have the same attribute value so that we only display the "generate password" link next to the first field, instead of both, and both will still be updated when a password is generated.
          tyson Tyson Phillips (Inactive) made changes -
          Description To setup password-autogeneration, add a set of data attributes to a clickable element, which will open a modal and allow you to generate a password.

          The clickable element must have the class name *generate-password* to automatically be set as a password-generating modal.

          The following data attributes *must* be set on the *generate-password*-class element:
          * _data-base-url_ The base URL of the Blesta installation. This is generally the value of _$this->base_uri_ in php
          * _data-for-class_ The name of a CSS class to set the generated password to. HTML elements of this class will be set the password
          * _data-length_ The length of the password to generate (e.g. 10)
          * _data-options_ A string-representation of JSON data representing characters to include in the password generator. This must be formatted as described in [unicode-passgen|https://github.com/phillipsdata/unicode-passgen#api].
          ** The below example will include all latin alpha characters lower-case and upper-case from A to Z, but exclude the lower and upper-case letter 'i'.
          ** \{"include": \[\{"chars": \[\["A", "Z"\], \["a", "z"\]\]\}\], "exclude": \[\{"chars": \[\["i"\], \["I"\]\]\}\]\}

          The following data attributes are optional:
          - _data-modal-title_ This is the title to set for the modal. By default, it will use the text of the *generate-password* element
          - _data-modal-close_ This is the name to set as the close button language, e.g. 'Close'

          ----

          Password fields are used throughout the system, (in core, modules, etc.) many of which need 2 fields (one for the password, one for confirmation).

          We would like to include a simple Blesta core-javascript function for generating a modal, allowing a password to be generated and auto-populate the password fields. It will show the user the plaintext password so they can copy it (like cPanel).

          A simple "data-generate-password='unique_field'" attribute to the input field(s) would auto-set this modal to the form next to the field. I imagine the attribute should contain a unique value per SET of fields to which the password should apply.
          e.g.
          if we have password and confirm_password fields, they should both have the same attribute value so that we only display the "generate password" link next to the first field, instead of both, and both will still be updated when a password is generated.
          To setup password-autogeneration, add a set of data attributes to a clickable element, which will open a modal and allow you to generate a password.

          The clickable element must have the class name *generate-password* to automatically be set as a password-generating modal.

          The following data attributes *must* be set on the *generate-password*-class element:
          * _data-base-url_ The base URL of the Blesta installation. This is generally the value of _$this->base_uri_ in php
          * _data-for-class_ The name of a CSS class to set the generated password to. HTML elements of this class will be set the password
          * _data-length_ The length of the password to generate (e.g. 10)
          * _data-options_ A string-representation of JSON data representing characters to include in the password generator. This must be formatted as described in [unicode-passgen|https://github.com/phillipsdata/unicode-passgen#syntax-for-options].
          ** The below example will include all latin alpha characters lower-case and upper-case from A to Z, but exclude the lower and upper-case letter 'i'.
          ** \{"include": \[\{"chars": \[\["A", "Z"\], \["a", "z"\]\]\}\], "exclude": \[\{"chars": \[\["i"\], \["I"\]\]\}\]\}

          The following data attributes are optional:
          - _data-modal-title_ This is the title to set for the modal. By default, it will use the text of the *generate-password* element
          - _data-modal-close_ This is the name to set as the close button language, e.g. 'Close'

          ----

          Password fields are used throughout the system, (in core, modules, etc.) many of which need 2 fields (one for the password, one for confirmation).

          We would like to include a simple Blesta core-javascript function for generating a modal, allowing a password to be generated and auto-populate the password fields. It will show the user the plaintext password so they can copy it (like cPanel).

          A simple "data-generate-password='unique_field'" attribute to the input field(s) would auto-set this modal to the form next to the field. I imagine the attribute should contain a unique value per SET of fields to which the password should apply.
          e.g.
          if we have password and confirm_password fields, they should both have the same attribute value so that we only display the "generate password" link next to the first field, instead of both, and both will still be updated when a password is generated.
          tyson Tyson Phillips (Inactive) made changes -
          Time Spent 2 days, 2 hours, 44 minutes [ 67440 ] 2 days, 6 hours, 19 minutes [ 80340 ]
          Worklog Id 10824 [ 10824 ]
          tyson Tyson Phillips (Inactive) made changes -
          Sprint 4.3.0 Sprint 4 [ 54 ] 4.3.0 Sprint 4, 4.3.0 Sprint 5 [ 54, 55 ]
          tyson Tyson Phillips (Inactive) made changes -
          Rank Ranked higher
          tyson Tyson Phillips (Inactive) made changes -
          Time Spent 2 days, 6 hours, 19 minutes [ 80340 ] 3 days, 19 minutes [ 87540 ]
          Worklog Id 10827 [ 10827 ]
          tyson Tyson Phillips (Inactive) made changes -
          Time Spent 3 days, 19 minutes [ 87540 ] 3 days, 38 minutes [ 88680 ]
          Worklog Id 10828 [ 10828 ]
          tyson Tyson Phillips (Inactive) made changes -
          Time Spent 3 days, 38 minutes [ 88680 ] 3 days, 1 hour, 26 minutes [ 91560 ]
          Worklog Id 10829 [ 10829 ]
          tyson Tyson Phillips (Inactive) made changes -
          Description To setup password-autogeneration, add a set of data attributes to a clickable element, which will open a modal and allow you to generate a password.

          The clickable element must have the class name *generate-password* to automatically be set as a password-generating modal.

          The following data attributes *must* be set on the *generate-password*-class element:
          * _data-base-url_ The base URL of the Blesta installation. This is generally the value of _$this->base_uri_ in php
          * _data-for-class_ The name of a CSS class to set the generated password to. HTML elements of this class will be set the password
          * _data-length_ The length of the password to generate (e.g. 10)
          * _data-options_ A string-representation of JSON data representing characters to include in the password generator. This must be formatted as described in [unicode-passgen|https://github.com/phillipsdata/unicode-passgen#syntax-for-options].
          ** The below example will include all latin alpha characters lower-case and upper-case from A to Z, but exclude the lower and upper-case letter 'i'.
          ** \{"include": \[\{"chars": \[\["A", "Z"\], \["a", "z"\]\]\}\], "exclude": \[\{"chars": \[\["i"\], \["I"\]\]\}\]\}

          The following data attributes are optional:
          - _data-modal-title_ This is the title to set for the modal. By default, it will use the text of the *generate-password* element
          - _data-modal-close_ This is the name to set as the close button language, e.g. 'Close'

          ----

          Password fields are used throughout the system, (in core, modules, etc.) many of which need 2 fields (one for the password, one for confirmation).

          We would like to include a simple Blesta core-javascript function for generating a modal, allowing a password to be generated and auto-populate the password fields. It will show the user the plaintext password so they can copy it (like cPanel).

          A simple "data-generate-password='unique_field'" attribute to the input field(s) would auto-set this modal to the form next to the field. I imagine the attribute should contain a unique value per SET of fields to which the password should apply.
          e.g.
          if we have password and confirm_password fields, they should both have the same attribute value so that we only display the "generate password" link next to the first field, instead of both, and both will still be updated when a password is generated.
          To setup password-autogeneration, add a set of data attributes to a clickable element, which will open a modal and allow you to generate a password.

          The clickable element must have the class name *generate-password* to automatically be set as a password-generating modal.

          The following data attributes *must* be set on the *generate-password*-class element:
          * _data-base-url_ The base URL of the Blesta installation. This is generally the value of _$this->base_uri_ in php
          * _data-for-class_ The name of a CSS class to set the generated password to. HTML elements of this class will be set the password
          * _data-length_ The length of the password to generate (e.g. 10)
          * _data-options_ A string-representation of JSON data representing characters to include in the password generator. This must be formatted as described in [unicode-passgen|https://github.com/phillipsdata/unicode-passgen#syntax-for-options].
          ** The below example will include all latin alpha characters lower-case and upper-case from A to Z, but exclude the lower and upper-case letter 'i'.
          ** \{"include": \[\{"chars": \[\["A", "Z"\], \["a", "z"\]\]\}\], "exclude": \[\{"chars": \[\["i"\], \["I"\]\]\}\]\}

          The following data attributes are optional:
          - _data-modal-title_ This is the title to set for the modal. By default, it will use the text of the *generate-password* element
          - (*Admin UI only*) _data-modal-close_ This is the name to set as the close button language, e.g. 'Close'

          ----

          Password fields are used throughout the system, (in core, modules, etc.) many of which need 2 fields (one for the password, one for confirmation).

          We would like to include a simple Blesta core-javascript function for generating a modal, allowing a password to be generated and auto-populate the password fields. It will show the user the plaintext password so they can copy it (like cPanel).

          A simple "data-generate-password='unique_field'" attribute to the input field(s) would auto-set this modal to the form next to the field. I imagine the attribute should contain a unique value per SET of fields to which the password should apply.
          e.g.
          if we have password and confirm_password fields, they should both have the same attribute value so that we only display the "generate password" link next to the first field, instead of both, and both will still be updated when a password is generated.
          Automated transition triggered when Tyson Phillips (Inactive) created pull request #407 in Stash -
          Status In Progress [ 3 ] In Review [ 5 ]
          Resolution Fixed [ 1 ]
          tyson Tyson Phillips (Inactive) made changes -
          Time Spent 3 days, 1 hour, 26 minutes [ 91560 ] 3 days, 3 hours, 27 minutes [ 98820 ]
          Worklog Id 10831 [ 10831 ]
          jonathan Jonathan Reissmueller made changes -
          Time Spent 3 days, 3 hours, 27 minutes [ 98820 ] 3 days, 4 hours, 12 minutes [ 101520 ]
          Worklog Id 10900 [ 10900 ]
          tyson Tyson Phillips (Inactive) made changes -
          Sprint 4.3.0 Sprint 4, 4.3.0 Sprint 5 [ 54, 55 ] 4.3.0 Sprint 4, 4.3.0 Sprint 5, 4.3.0 Sprint 6 [ 54, 55, 56 ]
          Automated transition triggered when Tyson Phillips (Inactive) merged pull request #407 in Stash -
          Status In Review [ 5 ] Closed [ 6 ]
          tyson Tyson Phillips (Inactive) made changes -
          Resolution Fixed [ 1 ]
          Status Closed [ 6 ] Reopened [ 4 ]
          tyson Tyson Phillips (Inactive) made changes -
          Fix Version/s 4.3.0-b1 [ 11019 ]
          Fix Version/s 4.3.0 [ 11022 ]
          tyson Tyson Phillips (Inactive) made changes -
          Status Reopened [ 4 ] Closed [ 6 ]
          Resolution Fixed [ 1 ]

            People

            • Assignee:
              tyson Tyson Phillips (Inactive)
              Reporter:
              tyson Tyson Phillips (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                15/Jun/18

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 days, 4 hours, 12 minutes
                3d 4h 12m

                  Agile