<% content_for "header" do %>
<title><%= translate(locale, "Create playlist") %> - Invidious</title>
<% end %>

<div class="pure-g">
    <div class="pure-u-1 pure-u-lg-1-5"></div>
    <div class="pure-u-1 pure-u-lg-3-5">
        <div class="h-box">
            <form class="pure-form pure-form-aligned" action="/create_playlist?referer=<%= URI.encode_www_form(referer) %>" method="post">
                <fieldset>
                    <legend><%= translate(locale, "Create playlist") %></legend>

                    <div class="pure-control-group">
                        <label for="title"><%= translate(locale, "Title") %> :</label>
                        <input required name="title" type="text" placeholder="<%= translate(locale, "Title") %>">
                    </div>

                    <div class="pure-control-group">
                        <label for="privacy"><%= translate(locale, "Playlist privacy") %> :</label>
                        <select name="privacy" id="privacy">
                            <% PlaylistPrivacy.names.each do |option| %>
                                <option value="<%= option %>" <% if option == "Public" %> selected <% end %>><%= translate(locale,  option) %></option>
                            <% end %>
                        </select>
                    </div>

                    <div class="pure-controls">
                        <button type="submit" name="action" value="create_playlist" class="pure-button pure-button-primary">
                            <%= translate(locale, "Create playlist") %>
                        </button>
                    </div>

                    <input type="hidden" name="csrf_token" value="<%= URI.encode_www_form(csrf_token) %>">
                </fieldset>
            </form>
        </div>
    </div>
    <div class="pure-u-1 pure-u-lg-1-5"></div>
</div>
