|
| 1 | +<%@ Page Language="C#" Title="Submit package" MasterPageFile="../../masterpages/umbracoPage.Master" AutoEventWireup="true" CodeBehind="SubmitPackage.aspx.cs" Inherits="umbraco.presentation.developer.packages.SubmitPackage" %> |
| 2 | +<%@ Register TagPrefix="cc2" Namespace="umbraco.uicontrols" Assembly="controls" %> |
| 3 | + |
| 4 | +<asp:Content ContentPlaceHolderID="footer" runat="server"> |
| 5 | +<script type="text/javascript"> |
| 6 | + var tb_email = document.getElementById('<%= tb_email.ClientID %>'); |
| 7 | + |
| 8 | + if (tb_email.value != "") { |
| 9 | + onRepoChange(); |
| 10 | + } |
| 11 | +</script> |
| 12 | +</asp:Content> |
| 13 | + |
| 14 | +<asp:Content ContentPlaceHolderID="head" runat="server"> |
| 15 | +<script type="text/javascript"> |
| 16 | + function onRepoChange() { |
| 17 | +
|
| 18 | + var dropdown = document.getElementById('<%= dd_repositories.ClientID %>'); |
| 19 | + var myindex = dropdown.selectedIndex |
| 20 | + var SelValue = dropdown.options[myindex].value |
| 21 | + var repoLogin = document.getElementById('<%= pl_repoLogin.ClientID %>'); |
| 22 | +
|
| 23 | + if (SelValue != "") { |
| 24 | +
|
| 25 | + var publicRepoHelp = document.getElementById('<%= publicRepoHelp.ClientID %>'); |
| 26 | + var privateRepoHelp = document.getElementById('<%= privateRepoHelp.ClientID %>'); |
| 27 | +
|
| 28 | + publicRepoHelp.style.display = 'none'; |
| 29 | + privateRepoHelp.style.display = 'none'; |
| 30 | +
|
| 31 | + if (SelValue == "65194810-1f85-11dd-bd0b-0800200c9a66") { |
| 32 | + publicRepoHelp.style.display = 'block'; |
| 33 | + } else { |
| 34 | + privateRepoHelp.style.display = 'block'; |
| 35 | + } |
| 36 | +
|
| 37 | + repoLogin.style.display = 'block'; |
| 38 | +
|
| 39 | + } else { |
| 40 | + repoLogin.style.display = 'none'; |
| 41 | + } |
| 42 | + } |
| 43 | + </script> |
| 44 | +</asp:Content> |
| 45 | + |
| 46 | +<asp:Content ContentPlaceHolderID="body" runat="server"> |
| 47 | +<cc2:UmbracoPanel ID="Panel1" Text="Submit package to repository" runat="server" Width="496px" Height="584px"> |
| 48 | + <br /> |
| 49 | + <cc2:Feedback ID="fb_feedback" runat="server" /> |
| 50 | + <asp:PlaceHolder ID="feedbackControls" runat="server" Visible="false"> |
| 51 | + <br /> |
| 52 | + <p> |
| 53 | + <button onclick="window.location.href = 'editpackage.aspx?id=<%= Request.QueryString["id"] %>'; return false;">Ok</button> |
| 54 | + </p> |
| 55 | + </asp:PlaceHolder> |
| 56 | + |
| 57 | + <cc2:Pane ID="Pane2" runat="server" Text="Repository"> |
| 58 | + |
| 59 | + <asp:Panel ID="pl_repoChoose" runat="server"> |
| 60 | + <cc2:PropertyPanel runat="server"> |
| 61 | + <p>Choose the repository you want to submit the package to</p> |
| 62 | + </cc2:PropertyPanel> |
| 63 | + <cc2:PropertyPanel Text="Repository" runat="server"> |
| 64 | + <asp:DropDownList ID="dd_repositories" runat="server" /> |
| 65 | + </cc2:PropertyPanel> |
| 66 | + </asp:Panel> |
| 67 | + |
| 68 | + <asp:Panel id="pl_repoLogin" style="display: none;" runat="server"> |
| 69 | + <cc2:PropertyPanel ID="PropertyPanel1" runat="server"> |
| 70 | + |
| 71 | + <h3 style="margin-left: 0px; padding-top: 15px;">Please enter your credentials to authenticate your user.</h3> |
| 72 | + <p runat="server" id="publicRepoHelp" style="display: none">If you do not have a user on the umbraco package repository, you can create one <a href="http://packages.umbraco.org/create-user" target="_blank">here</a>.</p> |
| 73 | + <p runat="server" id="privateRepoHelp" style="display: none">If you do not have a user on this private repository, contact your repository administrator to gain access</p> |
| 74 | + </cc2:PropertyPanel> |
| 75 | + |
| 76 | + <cc2:PropertyPanel ID="PropertyPanel2" runat="server" Text="Email"> |
| 77 | + <asp:TextBox ID="tb_email" runat="server" /> <asp:RequiredFieldValidator ID="RequiredFieldValidator1" ControlToValidate="tb_email" runat="server" ErrorMessage="*" /> |
| 78 | + </cc2:PropertyPanel> |
| 79 | + |
| 80 | + <cc2:PropertyPanel ID="PropertyPanel3" runat="server" Text="Password"> |
| 81 | + <asp:TextBox TextMode="Password" ID="tb_password" runat="server" /> <asp:RequiredFieldValidator ControlToValidate="tb_password" runat="server" ErrorMessage="*" /> |
| 82 | + </cc2:PropertyPanel> |
| 83 | + </asp:Panel> |
| 84 | + |
| 85 | + </cc2:Pane> |
| 86 | + |
| 87 | + <cc2:Pane ID="Pane1" runat="server" Text="Documentation (.pdf only)"> |
| 88 | + <cc2:PropertyPanel ID="PropertyPanel4" runat="server"> |
| 89 | + <p>Upload additional documentation for your package to help new users getting started with your package</p> |
| 90 | + </cc2:PropertyPanel> |
| 91 | + |
| 92 | + <cc2:PropertyPanel ID="PropertyPanel5" runat="server" Text="Documentation file"> |
| 93 | + <asp:FileUpload ID="fu_doc" runat="server" /> |
| 94 | + <asp:RegularExpressionValidator ID="doc_regex" runat="server" ControlToValidate="fu_doc" ValidationExpression="(.*?)\.(pdf|PDF)$" ErrorMessage="Only .pdf files are accepted" /> |
| 95 | + </cc2:PropertyPanel> |
| 96 | + </cc2:Pane> |
| 97 | + |
| 98 | + <asp:PlaceHolder runat="server" ID="submitControls"> |
| 99 | + <br /> |
| 100 | + |
| 101 | + <div class="notice"> |
| 102 | + <p>By clicking "submit package" below you understand that your package will be submitted to a package repository and will in some cases be publicly available to download.</p> |
| 103 | + <p><strong>Please notice: </strong> only packages with complete read-me, author information and install information gets considered for inclusion.</p> |
| 104 | + <p>The package administrators group reservers the right to decline packages based on lack of documentation, poorly written readme and missing author information</p> |
| 105 | + </div> |
| 106 | + |
| 107 | + <p> |
| 108 | + <asp:Button ID="bt_submit" runat="server" Text="Submit package" OnClick="submitPackage" /> <em><%= umbraco.ui.Text("or") %></em> <a href="editpackage.aspx?id=<%= Request.QueryString["id"] %>"><%= umbraco.ui.Text("cancel") %></a> |
| 109 | + </p> |
| 110 | + </asp:PlaceHolder> |
| 111 | + |
| 112 | + </cc2:UmbracoPanel> |
| 113 | +</asp:Content> |
0 commit comments