forked from wp-premium/classipress
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathform-listing-edit.php
91 lines (62 loc) · 2.48 KB
/
form-listing-edit.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<?php
/**
* Listing Edit Details Template.
*
* @package ClassiPress\Templates
* @author AppThemes
* @since ClassiPress 3.4
*/
?>
<div class="content">
<div class="content_botbg">
<div class="content_res">
<!-- left block -->
<div class="content_left">
<div class="shadowblock_out">
<div class="shadowblock">
<h1 class="single dotted"><?php _e( 'Edit Your Ad', APP_TD ); ?></h1>
<?php do_action( 'appthemes_notices' ); ?>
<p><?php _e( 'Edit the fields below and click save to update your ad. Your changes will be updated instantly on the site.', APP_TD ); ?></p>
<form name="mainform" id="mainform" class="form_edit" action="<?php echo appthemes_get_step_url(); ?>" method="post" enctype="multipart/form-data">
<?php wp_nonce_field( $action ); ?>
<ol>
<?php
if ( $form_fields ) {
cp_formbuilder( $form_fields, $listing );
} else {
cp_show_default_form( $listing );
}
// check and make sure images are allowed
if ( $cp_options->ad_images ) {
if ( appthemes_plupload_is_enabled() ) {
appthemes_plupload_form( $listing->ID );
} else {
$images_count = cp_get_ad_images( $listing->ID );
// print out image upload fields. pass in count of images allowed
cp_ad_edit_image_input_fields( $images_count );
}
} else { ?>
<div class="pad10"></div>
<li>
<div class="labelwrapper">
<label><?php _e( 'Images:', APP_TD ); ?></label><?php _e( 'Sorry, image editing is not supported for this ad.', APP_TD ); ?>
</div>
</li>
<div class="pad25"></div>
<?php } ?>
<p class="submit center">
<input type="button" class="btn_orange" onclick="window.location.href='<?php echo CP_DASHBOARD_URL; ?>'" value="<?php _e( 'Cancel', APP_TD ); ?>" />
<input type="submit" class="btn_orange" value="<?php _e( 'Update Ad »', APP_TD ); ?>" name="update" />
</p>
</ol>
<input type="hidden" name="action" value="<?php echo esc_attr( $action ); ?>" />
<input type="hidden" name="ID" value="<?php echo esc_attr( $listing->ID ); ?>" />
</form>
</div><!-- /shadowblock -->
</div><!-- /shadowblock_out -->
</div><!-- /content_left -->
<?php get_sidebar( 'user' ); ?>
<div class="clr"></div>
</div><!-- /content_res -->
</div><!-- /content_botbg -->
</div><!-- /content -->