various bugfixes
This commit is contained in:
parent
b9b3367865
commit
1d957cba54
3 changed files with 52 additions and 37 deletions
|
@ -114,7 +114,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|||
<td nowrap>{$row.rendered}</td>
|
||||
<td>{$row.category|default:" "}</td>
|
||||
<td align="right">{$row.price}</td>
|
||||
<td align="right">
|
||||
<td align="right" nowrap>
|
||||
<a href="receive.php?itemid={$row.itemid}"><img alt="Mark Item Received" src="images/return.png" border="0" title="Mark Item Received" /></a>
|
||||
<a href="item.php?action=edit&itemid={$row.itemid}"><img alt="Edit Item" src="images/pencil.png" border="0" title="Edit Item" /></a>
|
||||
<a rel="confirmitemdelete" data-content="{$row.description|escape:'htmlall'}" href="item.php?action=delete&itemid={$row.itemid}"><img alt="Delete Item" src="images/bin.png" border="0" alt="Delete" title="Delete Item" /></a>
|
||||
|
@ -166,7 +166,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|||
</td>
|
||||
<td align="right">{$row.list_stamp}</td>
|
||||
<td align="right">{$row.itemcount}</td>
|
||||
<td align="right">
|
||||
<td align="right" nowrap>
|
||||
{if $row.itemcount > 0}
|
||||
<a href="shop.php?shopfor={$row.userid}"><img alt="Shop for {$row.fullname|escape:'htmlall'}" src="images/store.png" border="0" alt="Shop" title="Shop"></a>
|
||||
{/if}
|
||||
|
@ -192,7 +192,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|||
{foreach from=$prospects item=row}
|
||||
<tr>
|
||||
<td>{$row.fullname|escape:'htmlall'}</td>
|
||||
<td align="right">
|
||||
<td align="right" nowrap>
|
||||
{if $row.pending}
|
||||
<a href="index.php?action=cancel&shopfor={$row.userid}"><img src="images/delete.png" border="0" alt="Cancel" title="Cancel" /></a>
|
||||
{else}
|
||||
|
|
|
@ -40,9 +40,9 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|||
required: true,
|
||||
maxlength: 255
|
||||
},
|
||||
category: {
|
||||
/*category: {
|
||||
required: true
|
||||
},
|
||||
},*/
|
||||
price: {
|
||||
required: true,
|
||||
min: 0,
|
||||
|
@ -69,9 +69,9 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|||
required: "The item's description is required.",
|
||||
maxlength: "The item's description must be 255 characters or less."
|
||||
},
|
||||
category: {
|
||||
/*category: {
|
||||
required: "A category must be selected."
|
||||
},
|
||||
},*/
|
||||
price: {
|
||||
required: "The item's price is required.",
|
||||
min: "Price can't be a negative number.",
|
||||
|
|
|
@ -21,31 +21,48 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link href="bootstrap/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="bootstrap/css/bootstrap-responsive.css" rel="stylesheet">
|
||||
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
|
||||
<script src="bootstrap/js/bootstrap.min.js"></script>
|
||||
<script src="js/jquery.validate.min.js"></script>
|
||||
<script src="js/giftreg.js"></script>
|
||||
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
function validateSignup() {
|
||||
field = document.signup.username;
|
||||
if (field == null || field == undefined || !field.value.match("\\S")) {
|
||||
alert("You must supply a username.");
|
||||
field.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
field = document.signup.fullname;
|
||||
if (field == null || field == undefined || !field.value.match("\\S")) {
|
||||
alert("You must supply your full name.");
|
||||
field.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
field = document.signup.email;
|
||||
if (!field.value.match("\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*")) {
|
||||
alert("The e-mail address '" + field.value + "' is not a valid address.");
|
||||
field.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
$(document).ready(function() {
|
||||
$("#signupform").validate({
|
||||
highlight: validate_highlight,
|
||||
success: validate_success,
|
||||
rules: {
|
||||
username: {
|
||||
required: true,
|
||||
maxlength: 20
|
||||
},
|
||||
fullname: {
|
||||
required: true,
|
||||
maxlength: 50
|
||||
},
|
||||
email: {
|
||||
required: true,
|
||||
email: true,
|
||||
maxlength: 255
|
||||
},
|
||||
familyid: {
|
||||
required: true
|
||||
}
|
||||
},
|
||||
messages: {
|
||||
username: {
|
||||
required: "A username is required.",
|
||||
maxlength: "Username must be 20 characters or less."
|
||||
},
|
||||
fullname: {
|
||||
required: "Your full name is required.",
|
||||
maxlength: "Your full name must be 50 characteres or less."
|
||||
},
|
||||
email: "A valid e-mail address is required.",
|
||||
familyid: "Please select a family."
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
@ -74,7 +91,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|||
{else}
|
||||
<div class="row">
|
||||
<div class="span8 offset2">
|
||||
<div class="well">
|
||||
<div class="alert alert-info">
|
||||
<p>Complete the form below and click Submit.</p>
|
||||
{if $opt.newuser_requires_approval}
|
||||
<p>The list administrators will be notified of your request by e-mail and will approve or decline your request.
|
||||
|
@ -89,7 +106,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|||
|
||||
<div class="row">
|
||||
<div class="span8 offset2">
|
||||
<form name="signup" method="post" action="signup.php" class="well form-horizontal">
|
||||
<form name="signupform" id="signupform" method="post" action="signup.php" class="well form-horizontal">
|
||||
<input type="hidden" name="action" value="signup">
|
||||
<fieldset>
|
||||
<legend>Sign Up for the Gift Registry</legend>
|
||||
|
@ -115,6 +132,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|||
<label class="control-label" for="familyid">Family</label>
|
||||
<div class="controls">
|
||||
<select name="familyid">
|
||||
<option value="">(select one)</option>
|
||||
{foreach from=$families item=row}
|
||||
<option value="{$row.familyid}">{$row.familyname|escape:'htmlall'}</option>
|
||||
{/foreach}
|
||||
|
@ -122,7 +140,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|||
</div>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<button type="submit" class="btn btn-primary" onClick="return validateSignup();">Submit</button>
|
||||
<button type="submit" class="btn btn-primary">Submit</button>
|
||||
<button type="button" class="btn" onClick="document.location.href='login.php';">Cancel</button>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
@ -131,8 +149,5 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
|
||||
<script src="bootstrap/js/bootstrap.min.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue