Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion wp-content/themes/makerfaire/css/style.css

Large diffs are not rendered by default.

32 changes: 16 additions & 16 deletions wp-content/themes/makerfaire/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -1952,24 +1952,24 @@ function gv_add_faire($additional_fields){
GravityView_Entry_List $this The current class instance */
add_filter('gform_entry_field_value','gv_faire_name',10,4);
function gv_faire_name($display_value, $field, $entry, $form){
if($field["type"]=='faire_name'){
global $wpdb;
if($field["type"]=='faire_name') {
global $wpdb;

$form_id = $entry['form_id'];
$sql = "select faire_name from wp_mf_faire where FIND_IN_SET ($form_id,wp_mf_faire.form_ids)> 0";
$faire = $wpdb->get_results($sql);

$faire_name = (isset($faire[0]->faire_name) ? $faire[0]->faire_name:$sql);
$display_value = $faire_name;
}elseif($field["type"]=='cancel_link'){
$display_value = '<a href="#cancelEntry" data-toggle="modal" data-projName="'.$entry['151'].'" data-entry-id="'.$entry['id'].'">Cancel</a>';
}elseif($field["type"]=='copy_entry'){
$display_value = '<a href="#copy_entry" data-toggle="modal" data-entry-id="'.$entry['id'].'">Copy</a>';
}elseif($field["type"]=='delete_entry'){
$display_value = '<a href="#deleteEntry" data-toggle="modal" data-projName="'.$entry['151'].'" data-entry-id="'.$entry['id'].'">Delete</a>';
}
$form_id = $entry['form_id'];
$sql = "select faire_name from wp_mf_faire where FIND_IN_SET ($form_id,wp_mf_faire.form_ids)> 0";
$faire = $wpdb->get_results($sql);

$faire_name = (isset($faire[0]->faire_name) ? $faire[0]->faire_name:$sql);
$display_value = $faire_name;
} elseif($field["type"]=='cancel_link') {
$display_value = '<a href="#cancelEntry" data-toggle="modal" data-projName="'.$entry['151'].'" data-entry-id="'.$entry['id'].'">Cancel</a>';
} elseif($field["type"]=='copy_entry') {
$display_value = '<a href="#copy_entry" data-toggle="modal" data-entry-id="'.$entry['id'].'">Copy</a>';
} elseif($field["type"]=='delete_entry') {
$display_value = '<a href="#deleteEntry" data-toggle="modal" data-projName="'.$entry['151'].'" data-entry-id="'.$entry['id'].'">Delete</a>';
}

return $display_value;
return $display_value;
}

/**
Expand Down
504 changes: 206 additions & 298 deletions wp-content/themes/makerfaire/gravityview/list-body.php

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<!-- Faire entry scripts for "list-body.php" -->
<script>
jQuery(document).ready(function() {
jQuery('[data-toggle="popover"]').popover();
});
</script>
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
<!-- Faire entry modals for "list-body.php" -->
<!-- Modal to cancel entry -->
<div class="modal" id="cancelEntry">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
<h4 class="modal-title">Cancel <span id="projName"></span>, Exhibit ID: <span id="cancelEntryID" name="entryID"></span></h4>
</div>
<div class="modal-body">
<div id="cancelText">
<p>Sorry you can't make it. Why are you canceling?</p><br/>
<textarea rows="4" cols="50" name="cancelReason"></textarea>
</div>
<span id="cancelResponse"></span><br/>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" id="submitCancel">Submit</button>
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>

<!-- Modal to copy entry to a new form -->
<div class="modal" id="copy_entry">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
<h4 class="modal-title">Copy Exhibit ID: <span id="copyEntryID" name="entryID"></span></h4>
</div>
<div class="modal-body">
<?php if(!empty($formArr)) { ?>
<p>Please choose from the options below:</p><br/>
<select id="copy2Form">
<?php foreach($formArr as $availForm) {
echo '<option value='.$availForm[0].'>'.$availForm[1].'</option>';
} ?>
</select>
<?php } else {
echo 'No Open faires at the moment';
} ?>
<br/><span id="copyResponse"></span><br/>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" id="submitCopy">Submit</button>
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>

<!--Modal to delete entry-->
<div class="modal" id="deleteEntry">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
<h4 class="modal-title">Delete <span id="delProjName"></span>, Exhibit ID: <span id="deleteEntryID" name="entryID"></span></h4>
</div>
<div class="modal-body">
<div id="deleteText">
<p>Are you sure you want to trash this entry? You can not reverse this action.</p>
</div>
<span id="deleteResponse"></span><br/>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" id="submitDelete">Yes, delete it</button>
<button type="button" class="btn btn-default" id="cancelDelete" data-dismiss="modal">No, I'll keep it</button>
<button type="button" class="btn btn-default" id="closeDelete" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<div class="clearfix">
<h4 class="welcome-head pull-left">Hi
<?php echo $current_user->user_firstname.' ';
echo $current_user->user_lastname;
?>
</h4>
<div class="settings-pop-btn pull-right">
<button type="button" class="btn btn-default btn-no-border notifications-button"
data-toggle="popover" data-html="true"
data-placement="bottom" data-trigger="focus"
data-content='<div class="manage-entry-popover">
<a href="/login/?mode=reset">Change Password</a>
<a href="/login/?action=logout">Log Out</a>
<h6 class="popover-head">Questions?</h6>
<a href="mailto:support@makerfaire.com">Email us</a>
</div>'>
Settings &amp; Help
<i class="fa fa-cog"></i>
</button>
</div>
</div>
<div class="clearfix">
<h2 class="title-head pull-left">Your Maker Faire entries</h2>
<span class="submit-entry pull-right">
<a href="http://makerfaire.com/bay-area-2016/call-for-makers/" target="_blank"
class="btn btn-primary btn-no-border">
Submit another entry
</a>
</span>
</div>
<hr class="header-break"/>
5 changes: 5 additions & 0 deletions wp-content/themes/makerfaire/less/global.less
Original file line number Diff line number Diff line change
Expand Up @@ -229,3 +229,8 @@ a:focus {
width: 100%;
position: absolute;
}

.btn.btn-no-border {
border: none;
border-radius: 0
}
Loading