PageRenderTime 42ms CodeModel.GetById 35ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/src/main/webapp/WEB-INF/jsp/ideas/edit.jsp

http://thoughtsite.googlecode.com/
JavaServer Pages | 138 lines | 136 code | 2 blank | 0 comment | 2 complexity | 60901cf38a22f1713288d3cf8f945881 MD5 | raw file
  1<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
  2<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %>
  3<html>
  4<head>
  5  <title>Save idea!</title>
  6    <script type="text/javascript" src="<%=request.getContextPath()%>/public/js/lib/jquery.limit.js"></script>
  7    <script type='text/javascript' src='<%=request.getContextPath()%>/public/js/lib/jquery.autocomplete.js'></script>
  8    <script type="text/javascript" src="<%=request.getContextPath()%>/public/js/ideas/edit-idea.js"></script>
  9    <script type="text/javascript" src="http://api.recaptcha.net/js/recaptcha_ajax.js"></script>
 10    <link href="<%=request.getContextPath()%>/public/css/lib/jquery.autocomplete.css" type="text/css" rel="stylesheet" />
 11    <meta name="currentPage" content="save" />
 12</head>
 13<body>
 14  <div id="submit-idea-pg-content">
 15    <form action="/ideas/publish" method="POST" id='ideaForm'>
 16      
 17      <table width="98%" border="0" align="left" cellpadding="2" cellspacing="1" class="ie-submit-idea-tb" id="sub-my-idea">
 18        <tr>
 19          <td width="23%"></td>
 20          <td colspan="5">
 21            <div class="ie-left-mar-10 ie-top-mar-5 ie-rd" id="errDisplay">
 22              <c:if test="${'error' eq viewStatus.status}">
 23                <!-- Print all messages -->
 24                <ul><c:forEach items="${viewStatus.messages}" var="msgEntry">
 25                  <c:choose>
 26                    <c:when test="${'duplicate' eq msgEntry.key}">
 27                      <!-- Print links for duplicate errors -->
 28                      <div><c:out value="${viewStatus.messages['duplicate']}" /></div>
 29                      <%-- Iterate over  duplicate ideas list--%>
 30                      <c:forEach items="${viewStatus.data['duplicateIdeas']}" var="duplicateIdea">
 31                      <c:url value="/ideas/show/${duplicateIdea.key}" var="ideaUrl"/>
 32                      <li><a href="<c:out value='${ideaUrl}'/>" class="ie-nm-blu" target="blank"><c:out value="${duplicateIdea.title}"/></a></li>
 33                      </c:forEach>
 34                    </c:when>
 35                    <c:otherwise>
 36                      <!-- Print other messages -->
 37                      <fmt:bundle basename="ui">
 38                      <li><fmt:message key="${msgEntry.key}"/>: <c:out value="${msgEntry.value}"/></li>
 39                      </fmt:bundle>
 40                    </c:otherwise>
 41                  </c:choose>  
 42                </c:forEach></ul>
 43              </c:if>  
 44            </div>
 45          </td>
 46        </tr>
 47        <c:set var="idea" value="${viewStatus.data['idea']}"/>
 48        <tr>
 49          <td width="23%" class="ie-td-lbg" >Idea Name<em>*</em></td>
 50          <td colspan="5" class="ie-td-lbg" ><input name="title" type="text" id="title" size="70" maxlength="150" value="<c:out value='${idea.title}'/>"></td>
 51        </tr>
 52        <tr>
 53          <td class="ie-td-lbg">Description<em>*</em></td>
 54          <td colspan="5" class="ie-td-lbg">
 55            <textarea name="description" cols="110" rows="7"  id="description" ><c:out value='${idea.description}'/></textarea>
 56            <br />
 57            <span class="ie-left-mar-3" id="charsLeftDescription"></span> chars left.
 58          </td>
 59        </tr> 
 60        <tr>
 61          <td class="ie-td-lbg">Target Audience </td>
 62          <td colspan="3" class="ie-td-lbg">
 63            <textarea name="targetAudience" cols="110" rows="4"  id="targetAudience"><c:out value='${idea.targetAudience}'/></textarea>
 64            <br />
 65            <span class="ie-left-mar-3" id="charsLeftTargetAudience"></span> chars left.
 66          </td>
 67        </tr>
 68        <tr>
 69          <td class="ie-td-lbg">Competition</td>
 70          <td colspan="3" class="ie-td-lbg">
 71            <textarea name="competition" cols="110" rows="4"  id="competition"><c:out value='${idea.competition}'/></textarea>
 72            <br />
 73            <span class="ie-left-mar-3" id="charsLeftCompetition"></span> chars left.
 74          </td>
 75        </tr>
 76        <tr>
 77          <td class="ie-td-lbg">How to Monetize </td>
 78          <td colspan="3" class="ie-td-lbg">
 79            <textarea name="monetization" cols="110" rows="4"  id="monetization"><c:out value='${idea.monetization}'/></textarea>
 80            <br />
 81            <span class="ie-left-mar-3" id="charsLeftMonetization"></span> chars left.
 82          </td>
 83        </tr>
 84        <tr>
 85          <td class="ie-td-lbg">Tags</td>
 86          <td class="ie-td-lbg">
 87          <input name="tags" type="text" id="tags" size="70" maxlength="150" value="<c:out value='${idea.tags}'/>"/></td>
 88        </tr>
 89        <tr>
 90          <td class="ie-td-lbg">Category</td>
 91          <td colspan="5" class="ie-td-lbg"><select name="ideaCategoryKey" id="category">
 92            <option>Category</option>
 93          </select>
 94          <input type="hidden" value="<c:out value='${idea.ideaCategoryKey}'/>" id="selectedCategory" name="selectedCategory"/>
 95          </td>
 96        </tr>
 97        <tr>
 98          <td width="23%" class="ie-td-lbg">Projects visibility<em>*</em><span class="red"></span></td>
 99          <td colspan="5" class="ie-td-lbg"><input type="checkbox" name="ideaRightsGivenUp" id="ideaRightsGivenUp" <c:if test="${idea.ideaRightsGivenUp}">checked</c:if>  />
100            Idea rights belong to the originator of the idea<br/>
101            <input type="checkbox" name="ipGivenUp" id="ipGivenUp" <c:if test="${idea.ipGivenUp}">checked</c:if>/>
102            Originator is giving up IP for their idea</td>
103        </tr>
104        <tr>
105          <td class="ie-td-lbg">&nbsp;</td>
106          <td colspan="5" class="ie-td-lbg">&nbsp;</td>
107        </tr>
108        <tr>
109          <td width="23%" class="ie-td-lbg">&nbsp;</td>
110          <td colspan="5" class="ie-td-lbg">
111            <div align="left">
112              <input type="hidden" name="isDuplicate" id="isDuplicate" value="<c:out value='${isDuplicate}' default="false"/>"/>
113              <input type="hidden" name="recaptchaChallengeField" id="recaptchaChallengeField"/>
114              <input type="hidden" name="recaptchaResponseField" id="recaptchaResponseField"/>
115              <input type="button" name="button" id="btnSaveIdea" value="Save draft" class="ie-button" 
116              style="padding-left:20px padding-right:20px;" onclick="saveIdea()" />
117              <input type="hidden" value="<c:out value='${idea.key}' default=''/>" id="key" name="key"/>
118              <input type="hidden" value="<c:out value='${idea.status}' default=''/>" id="status" name="status"/>
119              
120              &nbsp;
121              <%--Set publish label according to duplicate flag --%>
122              <c:set var="publishLabel" value="Publish"></c:set>
123              <c:if test="${true eq isDuplicate}">
124                <c:set var="publishLabel" value="Publish Anyway"></c:set>
125              </c:if>
126              <input type="button" name="button2" id="btnPublishIdea" value="<c:out value='${publishLabel}'/>" class="ie-button" style="padding-left:20px; 
127              padding-right:20px;" />
128            </div></td>
129        </tr>
130        <tr>
131          <td class="ie-td-lbg">&nbsp;</td>
132          <td colspan="5" class="ie-td-lbg">&nbsp;</td>
133        </tr>
134      </table> 
135    </form>
136  </div>
137</body>
138</html>