-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Janos SUTO <[email protected]>
- Loading branch information
Showing
3 changed files
with
168 additions
and
157 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,153 +1,171 @@ | ||
<div id="deleteconfirm-modal" class="modal hide fade"> | ||
<div class="modal-header"> | ||
<button type="button" class="close" data-dismiss="modal" role="dialog" aria-hidden="true"><i class="icon-remove"></i></button> | ||
<h3><?php print $text_confirm; ?> <?php print $text_delete; ?></h3> | ||
</div> | ||
<div class="modal-body"> | ||
<p><?php print $text_customer_delete_confirm_message; ?> <span id="name">ERROR</span>?</p> | ||
</div> | ||
<div class="modal-footer"> | ||
<a href="#" class="btn" data-dismiss="modal" aria-hidden="true"><?php print $text_close; ?></a> | ||
<a href="<?php print PATH_PREFIX; ?>index.php?route=customer/remove&id=-1&name=Error&confirmed=0" class="btn btn-primary" id="id"><?php print $text_delete; ?></a> | ||
</div> | ||
<div class="container text-danger text-start"> | ||
<?php if(isset($errorstring)) { print $text_error . ': ' . $errorstring; } ?> | ||
</div> | ||
|
||
<form method="get" name="search1" action="customer.php" class="form-inline pull-right"> | ||
<div class="input-append"> | ||
<input type="text" name="search" class="input-medium" value="<?php print $search; ?>" /> | ||
<input type="submit" class="btn" value="<?php print $text_search; ?>" /> | ||
<div class="container text-start"> | ||
<div class="row"> | ||
<div class="col"> | ||
</div> | ||
</form> | ||
<div class="col text-end"> | ||
<form method="get" name="search1" action="customer.php"> | ||
<div class="row justify-content-end"> | ||
<div class="col-8"> | ||
<input type="text" name="search" class="form-control" value="<?php print $search; ?>"> | ||
</div> | ||
<div class="col-2"> | ||
<button type="submit" class="btn btn-primary"><?php print $text_search; ?></button> | ||
</div> | ||
</div> | ||
</form> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<h4><?php if(isset($id) && ($id > 0)) { print $text_edit_entry; } else { print $text_add_new_entry; } ?></h4> | ||
|
||
<?php if(isset($errorstring)){ ?><div class="alert alert-danger"><?php print $text_error; ?>: <?php print $errorstring; ?></div><?php } ?> | ||
<?php if(isset($x)){ ?> | ||
<div class="alert alert-success"><?php print $x; ?></div> | ||
<?php } ?> | ||
<div class="container text-start"> | ||
<div class="row"> | ||
<div class="col"> | ||
|
||
<form method="post" name="add1" action="<?php print PATH_PREFIX; ?>index.php?route=customer/list" class="form-horizontal" enctype="multipart/form-data"> | ||
<h4><?php if(isset($id) && ($id > 0)) { print $text_edit_entry; } else { print $text_add_new_entry; } ?></h4> | ||
|
||
<?php if(isset($id) && ($id > 0)) { ?> | ||
<input type="hidden" name="id" id="id" value="<?php print $id; ?>" /> | ||
<?php } ?> | ||
<form method="post" id="add1" name="add1" action="<?php print PATH_PREFIX; ?>index.php?route=customer/list" class="form-horizontal" enctype="multipart/form-data"> | ||
|
||
<div class="control-group<?php if(isset($errors['domain'])){ print " error"; } ?>"> | ||
<label class="control-label" for="domain"><?php print $text_domain; ?>:</label> | ||
<div class="controls"> | ||
<?php if(isset($id) && ($id > 0)) { ?> | ||
<input type="hidden" name="id" id="id" value="<?php print $id; ?>" /> | ||
<?php } ?> | ||
|
||
<div class="row g-3 align-items-center"> | ||
<div class="col-2"> | ||
<label for="domain" class="col-form-label"><?php print $text_domain; ?></label> | ||
</div> | ||
<div class="col-5"> | ||
<select name="domain" id="domain"> | ||
<?php foreach ($domains as $domain) { ?> | ||
<option value="<?php print $domain; ?>"<?php if(isset($a['domain']) && $a['domain'] == $domain) { ?> selected="selected"<?php } ?>><?php print $domain; ?></option> | ||
<?php } ?> | ||
</select> | ||
</div> | ||
</div> | ||
<div class="control-group<?php if(isset($errors['branding_text'])){ print " error"; } ?>"> | ||
<label class="control-label" for="branding_text"><?php print $text_branding_text; ?>:</label> | ||
<div class="controls"> | ||
<input type="text" class="text" name="branding_text" id="branding_text" placeholder="" value="<?php if(isset($a['branding_text'])) { print $a['branding_text']; } ?>" /> | ||
<?php if ( isset($errors['branding_text']) ) { ?><span class="help-inline"><?php print $errors['branding_text']; ?></span><?php } ?> | ||
</div> | ||
</div> | ||
<div class="control-group<?php if(isset($errors['branding_url'])){ print " error"; } ?>"> | ||
<label class="control-label" for="branding_url"><?php print $text_branding_url; ?>:</label> | ||
<div class="controls"> | ||
<input type="text" class="text" name="branding_url" id="branding_url" placeholder="" value="<?php if(isset($a['branding_url'])) { print $a['branding_url']; } ?>" /> | ||
<?php if ( isset($errors['branding_url']) ) { ?><span class="help-inline"><?php print $errors['branding_url']; ?></span><?php } ?> | ||
</div> | ||
</div> | ||
<div class="control-group<?php if(isset($errors['branding_logo'])){ print " error"; } ?>"> | ||
<label class="control-label" for="branding_logo"><?php print $text_branding_logo; ?>:</label> | ||
<div class="controls"> | ||
<div class="fileupload fileupload-new" data-provides="fileupload"> | ||
<div class="fileupload-new thumbnail" style="width: 50px; height: 50px;"> | ||
<?php if(isset($a['branding_logo'])) { ?><img src="/images/<?php print $a['branding_logo']; ?>" style="max-height: 50px;" /><?php } else { ?><img src="http://www.placehold.it/50x50/EFEFEF/AAAAAA" /><?php } ?> | ||
</div> | ||
<div class="fileupload-preview fileupload-exists thumbnail" style="width: 50px; height: 50px;"></div> | ||
<span class="btn btn-file"><span class="fileupload-new"><?php print $text_select_image; ?></span><span class="fileupload-exists"><?php print $text_modify; ?></span><input type="file" name="branding_logo" id="branding_logo" /></span> | ||
<a href="#" class="btn fileupload-exists" data-dismiss="fileupload"><?php print $text_remove; ?></a> | ||
</div> | ||
<?php if ( isset($errors['branding_logo']) ) { ?><span class="help-inline"><?php print $errors['branding_logo']; ?></span><?php } ?> | ||
</div> | ||
</div> | ||
<div class="col-auto"> | ||
<span id="help1" class="form-text"></span> | ||
</div> | ||
</div> | ||
|
||
<div class="row g-3 align-items-center"> | ||
<div class="col-2"> | ||
<label for="branding_text" class="col-form-label"><?php print $text_branding_text; ?></label> | ||
</div> | ||
<div class="col-4"> | ||
<input type="text" name="branding_text" id="branding_text" class="form-control" value="<?php if(isset($a['branding_text'])) { print $a['branding_text']; } ?>" aria-describedby="help1" /> | ||
</div> | ||
<div class="col-auto"> | ||
<span id="help1" class="form-text"></span> | ||
</div> | ||
</div> | ||
|
||
<div class="row g-3 align-items-center"> | ||
<div class="col-2"> | ||
<label for="branding_url" class="col-form-label"><?php print $text_branding_url; ?></label> | ||
</div> | ||
<div class="col-4"> | ||
<input type="text" name="branding_url" id="branding_url" class="form-control" value="<?php if(isset($a['branding_url'])) { print $a['branding_url']; } ?>" aria-describedby="help1" /> | ||
</div> | ||
<div class="col-auto"> | ||
<span id="help1" class="form-text"></span> | ||
</div> | ||
</div> | ||
|
||
<div class="row g-3 align-items-center"> | ||
<div class="col-2"> | ||
<label for="support_link" class="col-form-label"><?php print $text_support_link; ?></label> | ||
</div> | ||
<div class="col-4"> | ||
<input type="text" name="support_link" id="support_link" class="form-control" value="<?php if(isset($a['support_link'])) { print $a['support_link']; } ?>" aria-describedby="help1" /> | ||
</div> | ||
<div class="col-auto"> | ||
<span id="help1" class="form-text"></span> | ||
</div> | ||
</div> | ||
|
||
<div class="row g-3 align-items-center"> | ||
<div class="col-2"> | ||
<label for="background_colour" class="col-form-label"><?php print $text_background_colour; ?></label> | ||
</div> | ||
<div class="col-4"> | ||
<input type="text" name="background_colour" id="background_colour" class="form-control" placeholder="" value="<?php if(isset($a['background_colour'])) { print $a['background_colour']; } ?>" aria-describedby="help1" /> | ||
</div> | ||
<div class="col-auto"> | ||
<span id="help1" class="form-text"></span> | ||
</div> | ||
</div> | ||
|
||
<div class="row g-3 align-items-center"> | ||
<div class="col-2"> | ||
<label for="text_colour" class="col-form-label"><?php print $text_text_colour; ?></label> | ||
</div> | ||
<div class="col-4"> | ||
<input type="text" name="text_colour" id="text_colour" class="form-control" placeholder="" value="<?php if(isset($a['text_colour'])) { print $a['text_colour']; } ?>" aria-describedby="help1" /> | ||
</div> | ||
<div class="col-auto"> | ||
<span id="help1" class="form-text"></span> | ||
</div> | ||
</div> | ||
|
||
<div class="row g-3 mt-2 align-items-center"> | ||
<div class="col-2"> | ||
</div> | ||
<div class="col-2"> | ||
<button type="submit" class="btn btn-primary"><?php if(isset($id) && ($id > 0)) { print $text_modify; } else { print $text_add; } ?></button> | ||
<a href="<?php print PATH_PREFIX; ?>index.php?route=customer/list" type="reset" class="btn btn-secondary"><?php print $text_cancel; ?></a> | ||
</div> | ||
<div class="col-auto"> | ||
<span id="help1" class="form-text"></span> | ||
</div> | ||
</div> | ||
|
||
</form> | ||
</div> | ||
<div class="control-group<?php if(isset($errors['support_link'])){ print " error"; } ?>"> | ||
<label class="control-label" for="support_link"><?php print $text_support_link; ?>:</label> | ||
<div class="controls"> | ||
<input type="text" class="text" name="support_link" id="support_link" placeholder="" value="<?php if(isset($a['support_link'])) { print $a['support_link']; } ?>" /> | ||
<?php if ( isset($errors['support_link']) ) { ?><span class="help-inline"><?php print $errors['support_link']; ?></span><?php } ?> | ||
</div> | ||
</div> | ||
|
||
<div class="control-group<?php if(isset($errors['background_colour'])){ print " error"; } ?>"> | ||
<label class="control-label" for="background_colour"><?php print $text_background_colour; ?>:</label> | ||
<div class="controls"> | ||
<input type="text" class="text color {hash:true}" name="background_colour" id="background_colour" placeholder="" value="<?php if(isset($a['background_colour'])) { print $a['background_colour']; } ?>" /> | ||
<?php if ( isset($errors['background_colour']) ) { ?><span class="help-inline"><?php print $errors['background_colour']; ?></span><?php } ?> | ||
</div> | ||
</div> | ||
|
||
<div class="control-group<?php if(isset($errors['text_colour'])){ print " error"; } ?>"> | ||
<label class="control-label" for="text_colour"><?php print $text_text_colour; ?>:</label> | ||
<div class="controls"> | ||
<input type="text" class="text color {hash:true}" name="text_colour" id="text_colour" placeholder="" value="<?php if(isset($a['text_colour'])) { print $a['text_colour']; } ?>" /> | ||
<?php if ( isset($errors['text_colour']) ) { ?><span class="help-inline"><?php print $errors['text_colour']; ?></span><?php } ?> | ||
</div> | ||
</div> | ||
|
||
|
||
<div class="form-actions"> | ||
<input type="submit" value="<?php if(isset($id) && ($id > 0)) { print $text_modify; } else { print $text_add; } ?>" class="btn btn-primary" /> | ||
<?php if(isset($id) && ($id > 0)) { ?> | ||
<a href="<?php print PATH_PREFIX; ?>index.php?route=customer/list" class="btn"><?php print $text_cancel; ?></a> | ||
<?php } else { ?> | ||
<input type="reset" value="<?php print $text_clear; ?>" class="btn" onclick="Piler.clear_ldap_test();" /> | ||
<?php } ?> | ||
</div> | ||
|
||
</form> | ||
</div> | ||
</div> | ||
|
||
<?php if($id == -1) { ?> | ||
<h4><?php print $text_existing_entries; ?></h4> | ||
<div class="listarea"> | ||
<?php if(isset($entries)){ ?> | ||
<table id="ss1" class="table table-striped table-condensed"> | ||
<tr> | ||
<th><?php print $text_domain; ?></th> | ||
<th><?php print $text_branding_text; ?></th> | ||
<th><?php print $text_branding_url; ?></th> | ||
<th><?php print $text_branding_logo; ?></th> | ||
<th><?php print $text_background_colour; ?></th> | ||
<th><?php print $text_text_colour; ?></th> | ||
<th> </th> | ||
<th> </th> | ||
</tr> | ||
<?php foreach($entries as $e) { ?> | ||
<tr> | ||
<td><?php print $e['domain']; ?></td> | ||
<td><?php print $e['branding_text']; ?></td> | ||
<td><?php print $e['branding_url']; ?></td> | ||
<td><?php if($e['branding_logo']) { ?><img src="/images/<?php print $e['branding_logo']; ?>" style="height: 50px;" /><?php } ?></td> | ||
<td><span class="label" style="background-color:<?php print $e['background_colour']; ?>"><?php print $e['background_colour']; ?></span></td> | ||
<td><span class="label" style="background-color:<?php print $e['text_colour']; ?>"><?php print $e['text_colour']; ?></span></td> | ||
<td><a href="<?php print PATH_PREFIX; ?>index.php?route=customer/list&id=<?php print $e['id']; ?>"><i class="icon-edit"></i> <?php print $text_edit; ?></a></td> | ||
<td><a href="<?php print PATH_PREFIX; ?>index.php?route=customer/remove&id=<?php print $e['id']; ?>&name=<?php print urlencode($e['domain']); ?>&confirmed=1" class="confirm-delete" data-id="<?php print $e['id']; ?>" data-name="<?php print $e['domain']; ?>"><i class="icon-remove-sign"></i> <?php print $text_remove; ?></a></td> | ||
</tr> | ||
<?php } ?> | ||
|
||
</table> | ||
<div class="container text-start mt-5"> | ||
<div class="row"> | ||
<div class="col"> | ||
<h4><?php print $text_existing_entries; ?></h4> | ||
<table class="table table-striped"> | ||
<thead class="table-dark"> | ||
<tr> | ||
<th><?php print $text_domain; ?></th> | ||
<th><?php print $text_branding_text; ?></th> | ||
<th><?php print $text_branding_url; ?></th> | ||
<th><?php print $text_branding_logo; ?></th> | ||
<th><?php print $text_background_colour; ?></th> | ||
<th><?php print $text_text_colour; ?></th> | ||
<th> </th> | ||
<th> </th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<?php foreach($entries as $e) { ?> | ||
<tr> | ||
<td><?php print $e['domain']; ?></td> | ||
<td><?php print $e['branding_text']; ?></td> | ||
<td><?php print $e['branding_url']; ?></td> | ||
<td><?php if($e['branding_logo']) { ?><img src="/images/<?php print $e['branding_logo']; ?>" style="height: 50px;" /><?php } ?></td> | ||
<td><span class="label" style="background-color:<?php print $e['background_colour']; ?>"><?php print $e['background_colour']; ?></span></td> | ||
<td><span class="label" style="background-color:<?php print $e['text_colour']; ?>"><?php print $e['text_colour']; ?></span></td> | ||
<td><a href="<?php print PATH_PREFIX; ?>index.php?route=customer/list&id=<?php print $e['id']; ?>"><i class="bi bi-pencil-square"></i> <?php print $text_edit; ?></a></td> | ||
<td><a href="<?php print PATH_PREFIX; ?>index.php?route=customer/remove&id=<?php print $e['id']; ?>&name=<?php print urlencode($e['domain']); ?>&confirmed=1" class="confirm-delete" data-id="<?php print $e['id']; ?>" data-name="<?php print $e['domain']; ?>"><i class="bi bi-trash text-danger"></i> <?php print $text_remove; ?></a></td> | ||
</tr> | ||
<?php } ?> | ||
<tbody> | ||
</table> | ||
|
||
<?php } else { ?> | ||
<div class="alert alert-error lead"> | ||
<?php print $text_not_found; ?> | ||
</div> | ||
<?php } ?> | ||
</div> | ||
</div> | ||
|
||
<?php } ?> | ||
|
||
|
||
</div> |