diff options
author | Florian Pritz <bluewind@xinu.at> | 2013-09-25 15:03:59 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2013-09-25 15:03:59 +0200 |
commit | 6705e6c987b6e4a43bbb666c33d8fc8a0ef1a0a6 (patch) | |
tree | b815871f7f031633c400a33cf5d6245282d59955 /application/views/user | |
parent | 50230001eb5387b6b0ff7ce906d074ef4a530d11 (diff) | |
parent | ab98249a9a087745b29e5cb258ea0b624f12f64b (diff) |
Merge branch 'working'
Diffstat (limited to 'application/views/user')
-rw-r--r-- | application/views/user/apikeys.php | 62 | ||||
-rw-r--r-- | application/views/user/hash_password.php | 29 | ||||
-rw-r--r-- | application/views/user/invite.php | 38 | ||||
-rw-r--r-- | application/views/user/login.php | 14 | ||||
-rw-r--r-- | application/views/user/nav.php | 8 | ||||
-rw-r--r-- | application/views/user/profile.php | 42 | ||||
-rw-r--r-- | application/views/user/register.php | 50 | ||||
-rw-r--r-- | application/views/user/reset_password_form.php | 30 | ||||
-rw-r--r-- | application/views/user/reset_password_username_form.php | 18 |
9 files changed, 164 insertions, 127 deletions
diff --git a/application/views/user/apikeys.php b/application/views/user/apikeys.php index aa268d678..872eb9ef0 100644 --- a/application/views/user/apikeys.php +++ b/application/views/user/apikeys.php @@ -1,36 +1,38 @@ <h2>API keys</h2> -<table class="table table-striped"> - <thead> - <tr> - <th>#</th> - <th>Key</th> - <th style="width: 30%;">Comment</th> - <th>Created on</th> - <th></th> - </tr> - </thead> - <tbody> - <?php $i = 1; ?> - <?php foreach($query as $key => $item): ?> +<div class="table-responsive"> + <table class="table table-striped"> + <thead> <tr> - <td><?php echo $i++; ?></td> - <td><?php echo $item["key"]; ?></td> - <td><?php echo htmlentities($item["comment"]); ?></td> - <td><?php echo date("Y/m/d H:i", $item["created"]); ?></td> - <td> - <?php echo form_open("user/delete_apikey", array("style" => "margin-bottom: 0")); ?> - <?php echo form_hidden("key", $item["key"]); ?> - <button class="btn btn-danger btn-mini" type="submit">Delete</input> - </form> - </td> + <th>#</th> + <th>Key</th> + <th style="width: 30%;">Comment</th> + <th>Created on</th> + <th></th> </tr> - <?php endforeach; ?> - </tbody> -</table> + </thead> + <tbody> + <?php $i = 1; ?> + <?php foreach($query as $key => $item): ?> + <tr> + <td><?php echo $i++; ?></td> + <td><?php echo $item["key"]; ?></td> + <td><?php echo htmlentities($item["comment"]); ?></td> + <td><?php echo date("Y/m/d H:i", $item["created"]); ?></td> + <td> + <?php echo form_open("user/delete_apikey", array("style" => "margin-bottom: 0")); ?> + <?php echo form_hidden("key", $item["key"]); ?> + <button class="btn btn-danger btn-xs" type="submit">Delete</input> + </form> + </td> + </tr> + <?php endforeach; ?> + </tbody> + </table> +</div> <p> - <?php echo form_open('user/create_apikey', array("class" => "form-horizontal")); ?> - <input type="text" name="comment" placeholder="Comment" /> - <input class="btn btn-primary" type="submit" value="Create a new key" name="process" /> - </form> + <?php echo form_open('user/create_apikey', array("class" => "form-inline")); ?> + <input type="text" name="comment" placeholder="Comment" class="form-control" style="width: 200px;"/> + <input class="btn btn-primary" type="submit" value="Create a new key" name="process" /> +</form> </p> diff --git a/application/views/user/hash_password.php b/application/views/user/hash_password.php index d85d2810c..98bef9df5 100644 --- a/application/views/user/hash_password.php +++ b/application/views/user/hash_password.php @@ -1,6 +1,6 @@ <?php if (!empty($error)) { - echo "<p class='alert alert-error'>"; + echo "<p class='alert alert-danger'>"; echo implode("<br />\n", $error); echo "</p>"; } @@ -9,23 +9,28 @@ if ($hash) { echo "<p>Result (this hash uses a random salt, so it will be different each time you submit this form):<br />$hash</p>\n"; } ?> -<?php echo form_open('user/hash_password', array("class" => "form-horizontal")); ?> - <div class="control-group"> - <label class="control-label" for="inputPassword">Password</label> - <div class="controls"> - <input type="password" id="inputPassword" name="password" placeholder="Password"> +<?php echo form_open('user/hash_password'); ?> +<div class="row"> + <div class="form-group col-lg-10 col-md-10"> + <label class="control-label col-lg-2 col-md-2" for="inputPassword">Password</label> + <div class="col-lg-5 col-md-5"> + <input type="password" id="inputPassword" name="password" placeholder="Password" class="form-control"> </div> </div> +</div> - <div class="control-group"> - <label class="control-label" for="inputPassword">Confirm password</label> - <div class="controls"> - <input type="password" id="inputPasswordConfirm" name="password_confirm" placeholder="Password confirmation"> +<div class="row"> + <div class="form-group col-lg-10 col-md-10"> + <label class="control-label col-lg-2 col-md-2" for="inputPassword">Confirm password</label> + <div class="col-lg-5 col-md-5"> + <input type="password" id="inputPasswordConfirm" name="password_confirm" placeholder="Password confirmation" class="form-control"> </div> </div> +</div> - <div class="control-group"> - <div class="controls"> +<div class="row"> + <div class="form-group col-lg-10 col-md-10"> + <div class="col-lg-offset-2 col-lg-5 col-md-offset-2 col-md-5"> <button type="submit" class="btn btn-primary" name="process">Hash it</button> </div> </div> diff --git a/application/views/user/invite.php b/application/views/user/invite.php index eba77ead0..d3e2fb7a6 100644 --- a/application/views/user/invite.php +++ b/application/views/user/invite.php @@ -1,4 +1,4 @@ -<div class="alert alert-block"> +<div class="alert alert-warning"> <p> <b>Watch out!</b> </p> @@ -10,25 +10,27 @@ </div> <h2>Unused invitation keys</h2> -<table class="table table-striped"> - <thead> - <tr> - <th>#</th> - <th style="width: 70%;">Key</th> - <th>Created on</th> - </tr> - </thead> - <tbody> - <?php $i = 1; ?> - <?php foreach($query as $key => $item): ?> +<div class="table-responsive"> + <table class="table table-striped"> + <thead> <tr> - <td><?php echo $i++; ?></td> - <td><?php echo anchor("user/register/".$item["key"], $item["key"]) ?></td> - <td><?php echo date("Y/m/d H:i", $item["date"]) ?></td> + <th>#</th> + <th style="width: 70%;">Key</th> + <th>Created on</th> </tr> - <?php endforeach; ?> - </tbody> -</table> + </thead> + <tbody> + <?php $i = 1; ?> + <?php foreach($query as $key => $item): ?> + <tr> + <td><?php echo $i++; ?></td> + <td><?php echo anchor("user/register/".$item["key"], $item["key"]) ?></td> + <td><?php echo date("Y/m/d H:i", $item["date"]) ?></td> + </tr> + <?php endforeach; ?> + </tbody> + </table> +</div> <p> <?php echo form_open('user/create_invitation_key'); ?> diff --git a/application/views/user/login.php b/application/views/user/login.php index 761965c94..3e30d53bd 100644 --- a/application/views/user/login.php +++ b/application/views/user/login.php @@ -1,24 +1,24 @@ <?php if (isset($login_error)) { ?> - <div class="alert alert-error">The entered credentials are invalid.</div> + <div class="alert alert-danger">The entered credentials are invalid.</div> <?php } ?> -<?php echo form_open('user/login', array("class" => "form-horizontal")); ?> - <div class="control-group"> +<?php echo form_open('user/login', array("class" => "form-horizontal login-page")); ?> + <div class="form-group"> <label class="control-label" for="inputUsername">Username</label> <div class="controls"> - <input type="text" id="inputUsername" name="username" placeholder="Username"> + <input type="text" id="inputUsername" name="username" placeholder="Username" class="form-control"> </div> </div> - <div class="control-group"> + <div class="form-group"> <label class="control-label" for="inputPassword">Password</label> <div class="controls"> - <input type="password" id="inputPassword" name="password" placeholder="Password"> + <input type="password" id="inputPassword" name="password" placeholder="Password" class="form-control"> </div> </div> - <div class="control-group"> + <div class="form-group"> <div class="controls"> <button type="submit" class="btn btn-primary" name="process">Login</button> </div> diff --git a/application/views/user/nav.php b/application/views/user/nav.php index 90f76e05e..49c7aa988 100644 --- a/application/views/user/nav.php +++ b/application/views/user/nav.php @@ -1,11 +1,11 @@ <?php if(auth_driver_function_implemented("can_register_new_users")) { ?> -<li><a href="<?php echo site_url("user/invite") ?>"><i class="icon-plus icon-black"></i> Invite</a></li> +<li><a href="<?php echo site_url("user/invite") ?>"><span class="glyphicon glyphicon-plus"></span> Invite</a></li> <?php } ?> -<li><a href="<?php echo site_url("user/profile") ?>"><i class="icon-user icon-black"></i> Profile</a></li> -<li><a href="<?php echo site_url("user/apikeys") ?>"><i class="icon-tags icon-black"></i> API keys</a></li> +<li><a href="<?php echo site_url("user/profile") ?>"><span class="glyphicon glyphicon-user"></span> Profile</a></li> +<li><a href="<?php echo site_url("user/apikeys") ?>"><span class="glyphicon glyphicon-tags"></span> API keys</a></li> <?php if(auth_driver_function_implemented("can_reset_password")) { ?> -<li><a href="<?php echo site_url("user/reset_password") ?>"><i class="icon-lock icon-black"></i> Change password</a></li> +<li><a href="<?php echo site_url("user/reset_password") ?>"><span class="glyphicon glyphicon-lock"></span> Change password</a></li> <?php } ?> diff --git a/application/views/user/profile.php b/application/views/user/profile.php index bcd740612..74d786d3f 100644 --- a/application/views/user/profile.php +++ b/application/views/user/profile.php @@ -1,32 +1,40 @@ -<?php echo form_open("user/profile", array("class" => "form-horizontal")); ?> +<?php echo form_open("user/profile"); ?> - <div class="control-group"> - <label class="control-label" for="inputUsername">Username</label> - <div class="controls"> - <input type="text" id="inputUsername" name="username" placeholder="Username" disabled="disabled" value="<?php echo $profile_data["username"]; ?>"> +<div class="row"> + <div class="form-group col-lg-8 col-md-10"> + <label class="control-label col-lg-2 col-md-2" for="inputUsername">Username</label> + <div class="col-lg-5 col-md-5"> + <input type="text" id="inputUsername" name="username" placeholder="Username" disabled="disabled" value="<?php echo $profile_data["username"]; ?>" class="form-control"> </div> </div> +</div> - <?php if(auth_driver_function_implemented("get_email")) { ?> - <div class="control-group"> - <label class="control-label" for="inputEmail">Email</label> - <div class="controls"> - <input type="text" id="inputEmail" name="email" placeholder="Email" disabled="disabled" value="<?php echo $profile_data["email"]; ?>"> +<?php if($profile_data["email"] !== null) { ?> +<div class="row"> + <div class="form-group col-lg-8 col-md-10"> + <label class="control-label col-lg-2 col-md-2" for="inputEmail">Email</label> + <div class="col-lg-5 col-md-5"> + <input type="text" id="inputEmail" name="email" placeholder="Email" disabled="disabled" value="<?php echo $profile_data["email"]; ?>" class="form-control"> </div> </div> - <?php } ?> +</div> +<?php } ?> - <div class="control-group"> - <label class="control-label" for="inputUploadIDLimits">Upload ID length limits</label> - <div class="controls"> - <input type="text" id="inputUploadIDLimits" name="upload_id_limits" placeholder="number-number" value="<?php echo $profile_data["upload_id_limits"]; ?>"> +<div class="row"> + <div class="form-group col-lg-8 col-md-10"> + <label class="control-label col-lg-2 col-md-2" for="inputUploadIDLimits">Upload ID length limits</label> + <div class="col-lg-5 col-md-5"> + <input type="text" id="inputUploadIDLimits" name="upload_id_limits" placeholder="number-number" value="<?php echo $profile_data["upload_id_limits"]; ?>" class="form-control"> <span class="help-block">Values have to be between 3 and 64 inclusive. Please remember that longer IDs don't protect your pastes from being found if you post the link somewhere a search enginge can see it.</span> </div> </div> +</div> - <div class="control-group"> - <div class="controls"> +<div class="row"> + <div class="form-group col-lg-8 col-md-10"> + <div class="col-lg-offset-2 col-lg-5 col-md-offset-2 col-md-5"> <button type="submit" class="btn btn-primary" name="process">Save changes</button> </div> </div> +</div> </form> diff --git a/application/views/user/register.php b/application/views/user/register.php index c0050508b..af4558ff9 100644 --- a/application/views/user/register.php +++ b/application/views/user/register.php @@ -1,41 +1,51 @@ <?php if (!empty($error)) { - echo "<p class='alert alert-error'>"; + echo "<p class='alert alert-danger'>"; echo implode("<br />\n", $error); echo "</p>"; } ?> -<?php echo form_open('user/register/'.$key, array("class" => "form-horizontal")); ?> - <div class="control-group"> - <label class="control-label" for="inputUsername">Username</label> - <div class="controls"> - <input type="text" id="inputUsername" name="username" placeholder="Username" value="<?php echo $values["username"]; ?>"> +<?php echo form_open('user/register/'.$key); ?> +<div class="row"> + <div class="form-group col-lg-8 col-md-10"> + <label class="control-label col-lg-2 col-md-2" for="inputUsername">Username</label> + <div class="col-lg-5 col-md-5"> + <input type="text" id="inputUsername" name="username" placeholder="Username" value="<?php echo $values["username"]; ?>" class="form-control"> </div> </div> +</div> - <div class="control-group"> - <label class="control-label" for="inputEmail">Email</label> - <div class="controls"> - <input type="text" id="inputEmail" name="email" placeholder="Email" value="<?php echo $values["email"]; ?>"> +<div class="row"> + <div class="form-group col-lg-8 col-md-10"> + <label class="control-label col-lg-2 col-md-2" for="inputEmail">Email</label> + <div class="col-lg-5 col-md-5"> + <input type="text" id="inputEmail" name="email" placeholder="Email" value="<?php echo $values["email"]; ?>" class="form-control"> </div> </div> +</div> - <div class="control-group"> - <label class="control-label" for="inputPassword">Password</label> - <div class="controls"> - <input type="password" id="inputPassword" name="password" placeholder="Password"> +<div class="row"> + <div class="form-group col-lg-8 col-md-10"> + <label class="control-label col-lg-2 col-md-2" for="inputPassword">Password</label> + <div class="col-lg-5 col-md-5"> + <input type="password" id="inputPassword" name="password" placeholder="Password" class="form-control"> </div> </div> +</div> - <div class="control-group"> - <label class="control-label" for="inputPassword">Confirm password</label> - <div class="controls"> - <input type="password" id="inputPasswordConfirm" name="password_confirm" placeholder="Password confirmation"> +<div class="row"> + <div class="form-group col-lg-8 col-md-10"> + <label class="control-label col-lg-2 col-md-2" for="inputPassword">Confirm password</label> + <div class="col-lg-5 col-md-5"> + <input type="password" id="inputPasswordConfirm" name="password_confirm" placeholder="Password confirmation" class="form-control"> </div> </div> +</div> - <div class="control-group"> - <div class="controls"> +<div class="row"> + <div class="form-group col-lg-8 col-md-10"> + <div class="col-lg-offset-2 col-lg-5 col-md-offset-2 col-md-5"> <button type="submit" class="btn btn-primary" name="process">Register</button> </div> </div> +</div> </form> diff --git a/application/views/user/reset_password_form.php b/application/views/user/reset_password_form.php index b93ad1370..9c8253189 100644 --- a/application/views/user/reset_password_form.php +++ b/application/views/user/reset_password_form.php @@ -1,27 +1,33 @@ <?php if (!empty($error)) { - echo "<p class='alert alert-error'>"; + echo "<p class='alert alert-danger'>"; echo implode("<br />\n", $error); echo "</p>"; } ?> -<?php echo form_open('user/reset_password/'.$key, array("class" => "form-horizontal")); ?> - <div class="control-group"> - <label class="control-label" for="inputPassword">Password</label> - <div class="controls"> - <input type="password" id="inputPassword" name="password" placeholder="Password"> +<?php echo form_open('user/reset_password/'.$key); ?> +<div class="row"> + <div class="form-group col-lg-8 col-md-10"> + <label class="control-label col-lg-2 col-md-2" for="inputPassword">Password</label> + <div class="col-lg-5 col-md-5"> + <input type="password" id="inputPassword" name="password" placeholder="Password" class="form-control"> </div> </div> +</div> - <div class="control-group"> - <label class="control-label" for="inputPassword">Confirm password</label> - <div class="controls"> - <input type="password" id="inputPasswordConfirm" name="password_confirm" placeholder="Password confirmation"> +<div class="row"> + <div class="form-group col-lg-8 col-md-10"> + <label class="control-label col-lg-2 col-md-2" for="inputPassword">Confirm password</label> + <div class="col-lg-5 col-md-5"> + <input type="password" id="inputPasswordConfirm" name="password_confirm" placeholder="Password confirmation" class="form-control"> </div> </div> +</div> - <div class="control-group"> - <div class="controls"> +<div class="row"> + <div class="form-group col-lg-8 col-md-10"> + <div class="col-lg-offset-2 col-lg-5 col-md-offset-2 col-md-5"> <button type="submit" class="btn btn-primary" name="process">Change password</button> </div> </div> +</div> </form> diff --git a/application/views/user/reset_password_username_form.php b/application/views/user/reset_password_username_form.php index 674a6441d..713cd4919 100644 --- a/application/views/user/reset_password_username_form.php +++ b/application/views/user/reset_password_username_form.php @@ -1,15 +1,19 @@ -<?php echo form_open('user/reset_password', array("class" => "form-horizontal")); ?> - <div class="control-group"> - <label class="control-label" for="inputUsername">Username</label> - <div class="controls"> - <input type="text" id="inputUsername" name="username" placeholder="Username" value="<?php echo isset($username) ? $username : ""; ?>"> +<?php echo form_open('user/reset_password'); ?> +<div class="row"> + <div class="form-group col-lg-8 col-md-10"> + <label class="control-label col-lg-2 col-md-2" for="inputUsername">Username</label> + <div class="col-lg-5 col-md-5"> + <input type="text" id="inputUsername" name="username" placeholder="Username" value="<?php echo isset($username) ? $username : ""; ?>" class="form-control"> </div> </div> +</div> - <div class="control-group"> - <div class="controls"> +<div class="row"> + <div class="form-group col-lg-8 col-md-10"> + <div class="col-lg-offset-2 col-lg-5 col-md-offset-2 col-md-5"> <button type="submit" class="btn btn-primary" name="process">Send mail</button> </div> </div> +</div> </form> |