sympa-community / sympa

Sympa, Mailing List Management Software
https://www.sympa.community/sympa
GNU General Public License v2.0
237 stars 94 forks source link

The ability to add an addition owner on the create_list_request.tt2 #1781

Open Ne-34 opened 6 months ago

Ne-34 commented 6 months ago

We would like to require a user that is using the sympa web interface to create a list, to have two owners on the create_list_request form in order for the list to be created. How can we achieve that?

I know that users can add additional owners after the list has been created. We would like to make two owner mandatory on the form before the list is created.

Version

Sympa Version 6.2.72

Installation method

Source package

Expected behavior

Actual behavior

Additional information

ikedas commented 5 months ago

Hi @Ne-34 ,

You can add custom_input field(s) so that custom parameters entered in web form may be passed to the list creation templates.

  1. Add a form field with a name custom_input.ANYTHING to web_tt2/create_list_request.tt2, e.g.:
    <label for="additional_owner">Additional Owner:</label>
    <input type="email" id="additional_owner" name="custom_input.additional_owner">
  2. Add the custom parameter to config.tt2 file in the list creation template, e.g.:

    [% IF custom_input.additional_owner %]
    owner
      email [% custom_input.additional_owner %]
    
    [%END%]

Then the field "Additional Owner" appears in the list creation request form and both original and additional owners will be added to the resulting list.