add watermark to add card page
This commit is contained in:
parent
9273a8ad4a
commit
61b567e2ec
|
@ -43,6 +43,8 @@ if (!(remoteAddr.equals("0:0:0:0:0:0:0:1") || remoteAddr.equals("127.0.0.1") ||
|
|||
return;
|
||||
}
|
||||
|
||||
final String watermark = request.getParameter("watermark") != null ? request.getParameter("watermark") : "";
|
||||
|
||||
String error = "";
|
||||
String status = "";
|
||||
String field = "";
|
||||
|
@ -75,6 +77,7 @@ if (color != null) {
|
|||
card.setText(text);
|
||||
card.setPick(pick);
|
||||
card.setDraw(draw);
|
||||
card.setWatermark(watermark);
|
||||
s.save(card);
|
||||
transaction.commit();
|
||||
s.close();
|
||||
|
@ -93,6 +96,7 @@ if (color != null) {
|
|||
transaction.begin();
|
||||
final WhiteCard card = new WhiteCard();
|
||||
card.setText(text);
|
||||
card.setWatermark(watermark);
|
||||
s.save(card);
|
||||
transaction.commit();
|
||||
s.close();
|
||||
|
@ -123,6 +127,9 @@ if (color != null) {
|
|||
<br/>
|
||||
<label for="draw">Draw</label><input type="text" id="draw" name="draw" size="3" value="0" />
|
||||
<br/>
|
||||
<label for="watermark_b">Watermark</label>
|
||||
<input type="text" id="watermark_b" name="watermark" size="3" maxlength="5" value="<%= watermark %>" />
|
||||
<br/>
|
||||
<input type="submit" value="Add card" />
|
||||
</form>
|
||||
<h1 id="white">White Card</h1>
|
||||
|
@ -130,6 +137,9 @@ if (color != null) {
|
|||
<input type="hidden" name="color" value="white" />
|
||||
<label for="white_text">Card Text</label><input type="text" id="white_text" name="text" size="150" />
|
||||
<br/>
|
||||
<label for="watermark_w">Watermark</label>
|
||||
<input type="text" id="watermark_w" name="watermark" size="3" maxlength="5" value="<%= watermark %>" />
|
||||
<br/>
|
||||
<input type="submit" value="Add card" />
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
|
|
Loading…
Reference in New Issue