public function render($stat_id = null) { global $rm_form_diary; echo '<div class="rmagic">'; //$this->form_number = $rm_form_diary[$this->form_id]; $form = new Form('form_' . $this->form_id . "_" . $this->form_number); $form->configure(array("prevent" => array("bootstrap", "jQuery", "focus"), "action" => "", "class" => "rmagic-form", "name" => "rm_form", "number" => $this->form_number, "view" => new View_UserForm(), "style" => isset($this->form_options->style_form) ? $this->form_options->style_form : null)); //Render content above the form if (!empty($this->form_options->form_custom_text)) { $form->addElement(new Element_HTML('<div class="rmheader">' . $this->form_options->form_custom_text . '</div>')); } if ($this->is_expired()) { if ($this->form_options->form_message_after_expiry) { echo $this->form_options->form_message_after_expiry; } else { echo '<div class="rm-no-default-from-notification">' . RM_UI_Strings::get('MSG_FORM_EXPIRY') . '</div>'; } echo '</div>'; return; } if ($stat_id) { $form->addElement(new Element_HTML('<div id="rm_stat_container" style="display:none">')); $form->addElement(new Element_Number('RM_Stats', 'stat_id', array('value' => $stat_id, 'style' => 'display:none'))); $form->addElement(new Element_HTML('</div>')); } parent::pre_render(); $this->base_render($form); parent::post_render(); echo '</div>'; }
public function __construct($id, $label, $options, $value, $page_no = 1, $is_primary = false, $extra_opts = null) { if (isset($options['value'])) { if (!is_array($options['value'])) { $options['value'] = RM_Utilities::trim_array(explode(',', $options['value'])); } else { $options['value'] = $options['value']; } } parent::__construct($id, 'Select', $label, $options, $value, $page_no, $is_primary, $extra_opts); if (isset($options['multiple'])) { $multiple = $options['multiple']; } else { $multiple = ''; } $options = array(); if (!is_array($value)) { $tmp_options = RM_Utilities::trim_array(explode(',', $value)); } else { $tmp_options = $value; } foreach ($tmp_options as $val) { $options[$val] = trim($val); } if ($multiple == 'multiple') { $options = array(null => RM_UI_Strings::get('SELECT_FIELD_MULTI_OPTION')) + $options; } else { $options = array(null => RM_UI_Strings::get('SELECT_FIELD_FIRST_OPTION')) + $options; } $this->field_value = $options; }
private function remove_field($model, $service, $request, $params) { if (isset($request->req['rm_field_id'])) { $result = $service->remove($request->req['rm_field_id']); } else { die(RM_UI_Strings::get('MSG_NO_FIELD_SELECTED')); } }
public function __construct($message = "") { if (!empty($message)) { $this->message = $message; } else { $this->message = RM_UI_Strings::get('FORM_ERR_INVALID'); } }
public function manage($model, $service, $request, $params) { if (!isset($request->req['form_name'])) { Form::clearErrors('rm_form_quick_add'); } $sort_by = isset($request->req['rm_sortby']) ? $request->req['rm_sortby'] : null; $descending = isset($request->req['rm_descending']) ? false : true; $req_page = isset($request->req['rm_reqpage']) && $request->req['rm_reqpage'] > 0 ? $request->req['rm_reqpage'] : 1; $items_per_page = 9; $forms = $service->get_all(null, ($req_page - 1) * $items_per_page, $items_per_page, '*', $sort_by, $descending); $i = 0; $data = array(); if (is_array($forms) || is_object($forms)) { foreach ($forms as $form) { $data[$i] = new stdClass(); $data[$i]->form_id = $form->form_id; $data[$i]->form_name = $form->form_name; $data[$i]->count = $service->count(RM_Submissions::get_identifier(), array('form_id' => $form->form_id)); if ($data[$i]->count > 0) { $data[$i]->submissions = $service->get(RM_Submissions::get_identifier(), array('form_id' => $form->form_id), array('%d'), 'results', 0, 3, '*', 'submitted_on', true); $j = 0; foreach ($data[$i]->submissions as $submission) { $data[$i]->submissions[$j++]->gravatar = get_avatar($submission->user_email); } } $data[$i]->field_count = $service->count(RM_Fields::get_identifier(), array('form_id' => $form->form_id)); $data[$i]->last_sub = $service->get(RM_Submissions::get_identifier(), array('form_id' => $form->form_id), array('%d'), 'var', 0, 1, 'submitted_on', 'submitted_on', true); //$data[$i]->last_sub = date('H',strtotime($this->service->get(RM_Submissions::get_identifier(), array('form_id' => $data_single->form_id), array('%d'), 'var', 0, 1, 'submitted_on', 'submitted_on', true))); $data[$i]->expiry_details = $service->get_form_expiry_stats($form, false); $i++; } } $total_forms = $service->count($model->get_identifier(), 1); //New object to consolidate data for view. $view_data = new stdClass(); $view_data->data = $data; $view_data->curr_page = $req_page; $view_data->total_pages = (int) ($total_forms / $items_per_page) + ($total_forms % $items_per_page == 0 ? 0 : 1); $view_data->rm_slug = $request->req['page']; $view_data->sort_by = $sort_by; $view_data->descending = $descending; $view_data->done_with_review_banner = $service->get_setting('done_with_review_banner') === 'no' ? false : true; $view_data->def_form_id = $service->get_setting('default_form_id'); if (function_exists('is_multisite') && is_multisite()) { $nl_subscribed = get_site_option('rm_option_newsletter_subbed', false); } else { $nl_subscribed = get_site_option('rm_option_newsletter_subbed', false); } if (!$nl_subscribed) { $view_data->newsletter_sub_link = RM_UI_Strings::get('NEWSLETTER_SUB_MSG'); } else { $view_data->newsletter_sub_link = null; } $view = $this->mv_handler->setView('form_manager'); $view->render($view_data); }
public function __construct($pattern, $message = "") { if (!empty($message)) { $this->message = $message; } else { $this->message = RM_UI_Strings::get('FORM_ERR_INVALID_REGEX'); } $this->pattern = $pattern; parent::__construct($this->message); }
private function renderRepeatable($type = "prepend") { if ($type === "start") { echo '<div class="rm_field_type_repeatable_container" id="rm_field_type_repeatable_container_' . $this->_attributes['id'] . '">'; } if ($type === "prepend") { echo '<div class="appendable_options">'; } if ($type === "append") { echo '<div class="rm_actions" id="rm_add_repeatable_field" onClick="rm_append_field(\'div\',\'rm_field_type_repeatable_container_' . $this->_attributes["id"] . '\')"><a>' . RM_UI_Strings::get("LABEL_ADD") . '</a></div><div class="rm_actions" onClick="rm_delete_appended_field(this,\'rm_field_type_repeatable_container_' . $this->_attributes["id"] . '\')"><a href="javascript:void(0)">' . RM_UI_Strings::get("LABEL_DELETE") . '</a></div></div>'; } if ($type === "close") { echo '</div>'; } }
public function set_otp($email, $key = null) { $response = new stdClass(); $response->error = false; $response->show = "#rm_otp_kcontact"; $response->hide = "#rm_otp_kcontact"; $response->reload = false; // Validate key if ($key) { $rm_user = $this->get('FRONT_USERS', array('otp_code' => $key), array('%s'), 'row'); if (!$rm_user) { $response->error = true; $response->msg = RM_UI_Strings::get('MSG_INVALID_OTP'); } else { $this->set_auth_params($key, $rm_user->email); $response->error = false; $response->msg = RM_UI_Strings::get('MSG_AFTER_OTP_LOGIN'); $response->reload = true; } } else { // Validate email if (is_email($email)) { if ($this->is_user($email)) { $otp_code = $this->generate_otp($email); $response->msg = RM_UI_Strings::get('MSG_OTP_SUCCESS'); $subject = RM_UI_Strings::get('LABEL_OTP'); $message = RM_UI_Strings::get('OTP_MAIL') . $otp_code; wp_mail($email, $subject, $message); } else { $response->error = true; $response->msg = RM_UI_Strings::get('MSG_EMAIL_NOT_EXIST'); } } else { $response->error = true; $response->msg = RM_UI_Strings::get('INVALID_EMAIL'); } } return json_encode($response); }
public function getPayments() { $rm_services = new RM_Services(); $rm_front_service = new RM_Front_Service(); $user_email = $rm_front_service->get_user_email(); $payments = array(); if (!empty($user_email)) { $submissions = $rm_services->get_submissions_by_email($user_email); if (!empty($submissions)) { foreach ($submissions as $submission) { $payment = $rm_services->get_payments_by_submission_id($submission->submission_id); if ($payment) { $payment->form_name = $rm_services->get('FORMS', array('form_id' => $submission->form_id), array('%d'), 'var', 0, 1, 'form_name'); $payments[] = $payment; } } } if (!empty($payments)) { include_once 'html/payments.php'; } else { echo '<div class="rmnotice-container"><div class="rmnotice">' . RM_UI_Strings::get('MSG_NO_DATA_FOR_EMAIL') . '</div></div>'; } } }
public function notify_users($note) { $gopt = new RM_Options(); if ($gopt->get_value_of('user_notification_for_notes') == "yes") { if ($note->get_status() != 'publish') { return; } $submission = new RM_Submissions(); $submission->load_from_db($note->get_submission_id()); $email = new stdClass(); //echo '<pre>'; //print_r($submission); die; $email->to = $submission->get_user_email(); $from_email = $gopt->get_value_of('senders_email_formatted'); $header = "From: {$from_email}\r\n"; $header .= "MIME-Version: 1.0\r\n"; $header .= "Content-Type: text/html; charset=ISO-8859-1\r\n"; $email->subject = get_bloginfo('name', 'display') . " Notification from Admin "; $email->message = RM_UI_Strings::get('MSG_NOTE_FROM_ADMIN') . $note->get_notes(); $email->header = $header; $email->attachments = array(); RM_Utilities::send_mail($email); } }
function aweber($model, $service, $request, $params) { if (isset($request->req['rm_form_id']) && (int) $request->req['rm_form_id']) { $model->load_from_db($request->req['rm_form_id']); $data = new stdClass(); $data->form_name = $model->form_name; $data->form_id = $request->req['rm_form_id']; $view = $this->mv_handler->setView('form_sett_aw'); } else { $data = RM_UI_Strings::get('MSG_FS_NOT_AUTHORIZED'); $view = $this->mv_handler->setView('show_notice'); } $view->render($data); }
<?php $form->addElement(new Element_Textbox("<b>" . RM_UI_Strings::get('LABEL_USERNAME') . "</b>:", "username", array("required" => "1", "placeholder" => RM_UI_Strings::get('LABEL_USERNAME')))); /* * Skip password field if auto generation is on */ if (!$is_auto_generate) { $form->addElement(new Element_Password("<b>" . RM_UI_Strings::get('LABEL_PASSWORD') . "</b>:", "password", array("required" => 1, "longDesc" => RM_UI_Strings::get('HELP_PASSWORD_MIN_LENGTH'), "minLength" => 7, "validation" => new Validation_RegExp("/.{7,}/", "Error: The %element% must be atleast 7 characters long.")))); } ?>
public function render($extra_data_may_needed_in_child_class = null) { global $rm_form_diary; echo '<div class="rmagic">'; //$this->form_number = $rm_form_diary[$this->form_id]; $form = new Form('form_' . $this->form_id . "_" . $this->form_number); $form->configure(array("prevent" => array("bootstrap", "jQuery", "focus"), "action" => "", "class" => "rmagic-form", "name" => "rm_form", "view" => new View_UserForm(), "number" => $this->form_number, "style" => isset($this->form_options->style_form) ? $this->form_options->style_form : null)); //Render content above the form if (!empty($this->form_options->form_custom_text)) { $form->addElement(new Element_HTML('<div class="rmheader">' . $this->form_options->form_custom_text . '</div>')); } if (!$this->is_expired()) { $this->pre_render(); $this->base_render($form); $this->post_render(); } else { if ($this->form_options->form_message_after_expiry) { echo $this->form_options->form_message_after_expiry; } else { echo RM_UI_Strings::get('MSG_FORM_EXPIRY'); } } echo '</div>'; }
<span><?php echo $role; ?> </span> <span><?php echo $role_name; ?> </span> </div> <div class="rm-slab-buttons" onclick="delete_role(this,'checkbox_<?php echo $role; ?> ')"> <a href="javascript:void(0)"><?php echo RM_UI_Strings::get("LABEL_DELETE"); ?> </a> </div> </div> </li> <?php } } ?> </form> </ul> <div class="rm-upgrade-note-gold"> <div class="rm-banner-title">Upgrade and expand the power of<img src="<?php echo RM_IMG_URL . 'logo.png';
/** * returns the message when deactivated user tries to login * * @param string $notice * @return string */ public function login_notice($notice) { if (isset($_GET['is_disabled']) && $_GET['is_disabled'] === '1') { $notice = '<div id="login_error"><strong>' . RM_UI_Strings::get('LABEL_ERROR') . ':</strong> ' . apply_filters('rm_login_notice', RM_UI_Strings::get('ACCOUNT_NOT_ACTIVE_YET')) . '</div>'; } elseif (isset($_GET['is_reset']) && $_GET['is_reset'] === '1') { $notice = '<p id="rm_login_error" class="message">' . apply_filters('rm_login_notice', RM_UI_Strings::get('LOGIN_AGAIN_AFTER_RESET')) . '</p>'; } return $notice; }
protected function renderSortable($type = "prepend", $suffix = '') { if ($type === "start") { echo '<ul class = "rm_sortable_elements" id = "rm_sortable_elements_' . $suffix . '">'; } if ($type === "prepend") { echo '<li class="appendable_options rm-deletable-options"><span class="rm_sortable_handle"><img alt="" src="' . plugin_dir_url(dirname(dirname(dirname(__FILE__)))) . 'images/rm-drag-label.png"></span>'; } if ($type === "append") { echo '<div class="rm_actions" onClick ="rm_delete_appended_field(this,rm_sortable_elements_' . $suffix . ')"><a href="javascript:void(0)">' . RM_UI_Strings::get("LABEL_DELETE") . '</a></div></li>'; } if ($type === "close") { echo '</ul>'; } if ($type === "add_action") { echo '<div class="rm_action_container" id="rm_action_container_id"><div class="rm_action" id="rm_action_field_container" onclick="rm_append_field(\'li\',this)"><input type="text" name="rm_dump" id="rm_append_option" class="rm_action_field" required="" readonly="true" value="' . RM_UI_Strings::get("VALUE_CLICK_TO_ADD") . ' "></div><div id="rmaddotheroptiontextdiv" style="display:none"><div onclick="jQuery.rm_append_textbox_other(this)">' . RM_UI_Strings::get('LABEL_ADD_OTHER') . '</div></div></div>'; } }
<?php $form = new Form("options_users"); $form->configure(array("prevent" => array("bootstrap", "jQuery"), "action" => "")); $options_sp = array("id" => "id_rm_send_pass_cb", "longDesc" => RM_UI_Strings::get('HELP_OPTIONS_USER_SEND_PASS')); if ($data['auto_generated_password'] === 'yes') { $options_sp['disabled'] = true; } if ($data['send_password'] === 'yes') { $options_sp['value'] = 'yes'; } $form->addElement(new Element_HTML('<div class="rmheader">' . RM_UI_Strings::get('GLOBAL_SETTINGS_USER') . '</div>')); $form->addElement(new Element_Checkbox(RM_UI_Strings::get('LABEL_AUTO_PASSWORD'), "auto_generated_password", array("yes" => ''), $data['auto_generated_password'] === 'yes' ? array("id" => "id_rm_autogen_pass_cb", "value" => "yes", "onchange" => "checkbox_disable_elements(this, 'id_rm_send_pass_cb-0', 1)", "longDesc" => RM_UI_Strings::get('HELP_OPTIONS_USER_AUTOGEN')) : array("id" => "id_rm_autogen_pass_cb", "onchange" => "checkbox_disable_elements(this, 'id_rm_send_pass_cb-0', 1)", "longDesc" => RM_UI_Strings::get('HELP_OPTIONS_USER_AUTOGEN')))); $form->addElement(new Element_Checkbox(RM_UI_Strings::get('LABEL_SEND_PASS_EMAIL'), "send_password", array("yes" => ''), $options_sp)); $form->addElement(new Element_Checkbox(RM_UI_Strings::get('LABEL_REGISTER_APPROVAL'), "buy_pro", array("yes" => ''), array("value" => "yes", 'disabled' => 1, "longDesc" => RM_UI_Strings::get('HELP_OPTIONS_USER_AUTOAPPROVAL') . "<br><br>" . RM_UI_Strings::get('MSG_BUY_PRO_INLINE')))); $form->addElement(new Element_HTMLL('← Cancel', '?page=rm_options_manage', array('class' => 'cancel'))); $form->addElement(new Element_Button(RM_UI_Strings::get('LABEL_SAVE'))); $form->render(); ?> </div> <div class="rm-upgrade-note-gold"> <div class="rm-banner-title">Upgrade and expand the power of<img src="<?php echo RM_IMG_URL . 'logo.png'; ?> "> </div> <div class="rm-banner-subtitle">Choose from two powerful extension bundles</div> <div class="rm-banner-box"><a href="http://registrationmagic.com/?download_id=317&edd_action=add_to_cart"><img src="<?php echo RM_IMG_URL . 'silver-logo.png'; ?> "></a> </div>
"><?php echo RM_UI_Strings::get('LABEL_LAST'); ?> </a></li> <?php } ?> </ul> <?php } } else { ?> <div class="rmnotice-container"> <div class="rmnotice"> <?php echo RM_UI_Strings::get('MSG_NO_SUBMISSION_SUB_MAN'); ?> </div> </div> <?php } ?> <div class="rm-upgrade-note-gold"> <div class="rm-banner-title">Upgrade and expand the power of<img src="<?php echo RM_IMG_URL . 'logo.png'; ?> "> </div> <div class="rm-banner-subtitle">Choose from two powerful extension bundles</div> <div class="rm-banner-box"><a href="http://registrationmagic.com/?download_id=317&edd_action=add_to_cart"><img src="<?php echo RM_IMG_URL . 'silver-logo.png';
public function show_widget() { $this->include_scripts(); global $rm_form_diary; if (current_user_can('manage_options')) { ?> <!----Color Switcher----> <div class="rm-white-box difl rm-color-switcher rm-rounded-corners rm-shadow-10" id="rm-color-switcher"> <div id="rm-theme-box-toggle" style="cursor: pointer; text-align: right; color: grey" onclick="close_theme_box()">x</div> <div class="rm-color-switcher-note rm-grey-box dbfl rm-pad-10">Welcome! This sticky panel is only visible to you as site admin. You can style RegistrationMagic's front-end panel on the right side, using the options below.</div> <div class="rm-color-switch-title dbfl rm-accent-bg rm-pad-10">Magic Panel Styler!</div> <input type="text" class="dbfl rm-grey-box jscolor" placeholder="Panel Accent Color" id="rm-panel-accent"> <select class="dbfl" id="rm-panel-theme"> <option value="Light"><?php echo RM_UI_Strings::get('LABEL_LIGHT'); ?> </option> <option value="Dark"><?php echo RM_UI_Strings::get('LABEL_DARK'); ?> </option> </select> <button class="difl" id="rm-color-switch"><?php echo RM_UI_Strings::get('LABEL_SWITCH'); ?> </button> </div> <?php } ?> <div class="rm-magic-popup"> <div class="rm-popup-menu rm-rounded-corners rm-white-box rm-shadow-10 dbfl" id="rm-menu"> <?php if ($this->user_level === 0x4) { ?> <div class="rm-popup-item dbfl rm-border" id="rm-account-open"> <?php $av = get_avatar_data($this->user->ID); ?> <img class="rm-menu-userimage difl" src="<?php echo $av['url']; ?> "> <div class="rm-menu-user-details difl"> <div class="dbfl"><b><?php echo RM_UI_Strings::get('LABEL_WELCOME'); ?> </b></div> <div class="dbfl"><?php echo $this->user->first_name . ' ' . $this->user->last_name; ?> </div> </div> </div> <?php } if ($this->user_level === 0x1) { ?> <div class="rm-popup-item dbfl" id="rm-login-open"><?php echo RM_UI_Strings::get('LABEL_LOGIN'); ?> </div> <?php if (!isset($rm_form_diary[$this->param->default_form])) { ?> <div class="rm-popup-item dbfl" id="rm-register-open-big"><?php echo RM_UI_Strings::get('LABEL_REGISTER'); ?> </div> <?php } else { ?> <a href="#form_<?php echo $this->param->default_form; ?> _1" id="rm_fab_register_redirect_link"><div class="rm-popup-item dbfl" id="rm-register-open-big"><?php echo RM_UI_Strings::get('LABEL_REGISTER'); ?> </div></a> <?php } } ?> <div class="rm-popup-item dbfl" id="rm-submissions-open"><?php echo RM_UI_Strings::get('LABEL_MY_SUBS'); ?> </div> <div class="rm-popup-item dbfl" id="rm-transactions-open"><?php echo RM_UI_Strings::get('LABEL_PAYMENTS'); ?> </div> <?php if ($this->user_level === 0x1 || $this->user_level === 0x4) { ?> <div class="rm-popup-item dbfl" id="rm-account-open"><?php echo RM_UI_Strings::get('LABEL_MY_DETAILS'); ?> </div> <?php } if ($this->user_level !== 0x1 && !is_user_logged_in()) { ?> <div class="rm-popup-item dbfl" id="rm_log_off" onclick="document.getElementById('rm_floating_btn_nav_form').submit()"><?php echo RM_UI_Strings::get('LABEL_LOG_OFF'); ?> </div> <form method="post" id="rm_floating_btn_nav_form"> <input type="hidden" name="rm_slug" value="rm_front_log_off"> <input type="hidden" name="rm_do_not_redirect" value="true"> </form> <?php } ?> </div> <div class="rm-magic-popup-button rm-accent-bg rm-shadow-10 dbfl" id="rm-popup-button"> <img src="<?php echo $this->widget_helper->get_fab_icon(); ?> "> </div> </div> <div class="rm-floating-page rm-rounded-corners rm-shadow-10 dbfl" id="rm-panel-page"> <div class="rm-floating-page-top rm-border rm-white-box dbfl"><?php echo RM_UI_Strings::get('LABEL_MY_SUBS'); ?> </div> <div class="rm-floating-page-content dbfl"> <!----Login Panel----> <div class="rm-floating-page-login dbfl" id="rm-login-panel"> <?php $this->widget_helper->getLoginForm(); ?> </div> <!--Registration Form--> <div class="dbfl" id="rm-register-panel-big"> <?php if ($this->param->default_form > 0 && !is_user_logged_in()) { echo do_shortcode("[RM_Form force_enable_multiform='true' id='" . $this->param->default_form . "']"); } else { echo "<div class='rm-no-default-from-notification'>" . RM_UI_Strings::get('NO_DEFAULT_FORM') . "</div>"; } ?> </div> <!----Panel page submissions area----> <div class="dbfl" id="rm-submissions-panel"> <?php if ($this->user_level !== 0x1) { $this->widget_helper->getSubmissions(); } else { echo "<div class='rm-no-default-from-notification'>" . RM_UI_Strings::get('MSG_PLEASE_LOGIN_FIRST') . "</div>"; } ?> </div> <!--------User Transaction Panel-------> <div class="dbfl" id="rm-transactions-panel"> <?php if ($this->user_level !== 0x1) { $this->widget_helper->getPayments(); } else { echo "<div class='rm-no-default-from-notification'>" . RM_UI_Strings::get('MSG_PLEASE_LOGIN_FIRST') . "</div>"; } ?> </div> <!----User Account Page----> <div class="dbfl" id="rm-account-panel"> <?php if ($this->user_level !== 0x1) { $this->widget_helper->get_account(); } else { echo "<div class='rm-no-default-from-notification'>" . RM_UI_Strings::get('MSG_PLEASE_LOGIN_FIRST') . "</div>"; } ?> </div> </div> <div class="rm-floating-page-bottom rm-border rm-white-box dbfl"> <button class="rm-rounded-corners rm-button" id="rm-panel-close"><?php echo RM_UI_Strings::get('LABEL_FIELD_ICON_CLOSE'); ?> </button> </div> </div> <?php }
public function process($model, RM_Front_Form_Service $service, $request, $params) { $data = new stdClass(); if (isset($params['form_id']) && $params['form_id']) { $form = new RM_Forms(); $form->load_from_db($params['form_id']); //echo "<pre>",var_dump($form),die(); } else { return; } //Called from PayPal, straight to processing. if (isset($request->req['rm_pproc'])) { if ($request->req['rm_pproc'] == 'success' || $request->req['rm_pproc'] == 'cancel' || $request->req['rm_pproc'] == 'ipn') { //error_log('rm_pproc = '.$request->req['rm_pproc']); $paystate = $service->process_payment(null, null, $service, $request); $params['form'] = $form; $params['is_payment_form'] = true; $params['is_payment_done'] = true; /*else //Pending or cancelation cases { $params['form'] = $form; $params['is_payment_form'] = true; $params['is_payment_done'] = false; }*/ $service->save_form($request, $params); return; } } /* * If register form type then check if user exists */ $user_exists = false; if ($form->form_type == 1 && !is_user_logged_in()) { if ($service->user_exists($form, $request)) { $user_exists = true; } else { Form::clearErrors('form_' . $form->form_id); } } if (isset($request->req['stat_id'])) { $stat_id = $request->req['stat_id']; } else { $stat_id = null; } /* * Validates the form in case form is not expired. */ if ($this->mv_handler->validateForm('form_' . $form->form_id) && !$service->is_form_expired($form) && !$user_exists && !$service->is_browser_reload_duplication($stat_id)) { $params['form'] = $form; // echo "<pre>",var_dump($form),die(); if ($service->is_off_limit_submission($form->form_id)) { die(RM_UI_Strings::get("ALERT_SUBMISSIOM_LIMIT")); } $service->update_stat_entry($stat_id); if ($service->get_setting('enable_mailchimp') == 'yes') { $form_options_mc = $form->get_form_options(); //die; if ($form_options_mc->form_is_opt_in_checkbox == 1) { $should_subscribe = isset($request->req['rm_subscribe_mc']) && $request->req['rm_subscribe_mc'][0] == 1 ? 'yes' : 'no'; } else { $should_subscribe = 'yes'; } if ($should_subscribe == 'yes') { $mailchimp = new RM_MailChimp_Service(); $mc_member = new stdClass(); if (isset($request->req[$form_options_mc->mailchimp_mapped_email])) { $mc_member->email = $request->req[$form_options_mc->mailchimp_mapped_email]; if (isset($request->req[$form_options_mc->mailchimp_mapped_first_name])) { $mc_member->first_name = $request->req[$form_options_mc->mailchimp_mapped_first_name]; } else { $mc_member->first_name = NULL; } if (isset($request->req[$form_options_mc->mailchimp_mapped_last_name])) { $mc_member->last_name = $request->req[$form_options_mc->mailchimp_mapped_last_name]; } else { $mc_member->last_name = NULL; } $mailchimp->subscribe($mc_member, $form_options_mc->mailchimp_list); } } } if (isset($request->req['rm_payment_form'])) { //Do not register user if the payment+registration type form, wait for payment confirmation. $params['is_payment_form'] = true; $params['is_payment_done'] = false; $rd = $service->save_form($request, $params, true, false); //die("xx"); $res = $service->process_payment($form->get_form_id(), $rd, $service, $request); if ($res == 'zero_amount') { $params['is_payment_form'] = true; $params['is_payment_done'] = true; $params['za_user_id'] = $rd->user_id; $rd = $service->save_form($request, $params); //$submission_id = $rd->submission_id; } } else { $rd = $service->save_form($request, $params); $submission_id = $rd->submission_id; } } else { if (isset($request->req['rm_submission_id'])) { $submissions = new RM_Submissions(); $submissions->load_from_db($request->req['rm_submission_id']); } /* * Get all the fields associated with the Form */ $data->fields_data = $service->get_all_form_fields($params['form_id']); $i = 0; if (is_array($data->fields_data) || is_object($data->fields_data)) { foreach ($data->fields_data as $field_data) { $data->fields_data[$i++]->properties = $service->set_properties(maybe_unserialize($field_data->field_options)); } } $data->form = $form; $data->is_auto_generate = false; /* * Checking if password generation is configured */ if ($form->get_form_type() == 1) { $auto_generate = $service->get_setting('auto_generated_password'); if ($auto_generate == "yes") { $data->is_auto_generate = true; } } /* * Check if mailchimp is enabled in options */ if ($service->get_setting('enable_mailchimp') == 'yes') { $data->is_mailchimp_enabled = true; } else { $data->is_mailchimp_enabled = false; } /* * If user role are to be choosen by registrar */ /* echo '<pre>'; print_r($form); */ if (!empty($form->form_options->form_should_user_pick) || !(isset($form->form_user_role) && !empty($form->form_user_role))) { $role_pick = $form->form_options->form_should_user_pick; if ($role_pick) { global $wp_roles; $allowed_roles = array(); $default_wp_roles = $wp_roles->get_names(); $form_roles = $form->get_form_user_role(); if (is_array($form_roles) && count($form_roles) > 0) { foreach ($form_roles as $val) { if (array_key_exists($val, $default_wp_roles)) { $allowed_roles[$val] = $default_wp_roles[$val]; } } } $data->allowed_roles = $allowed_roles; $data->role_as = empty($form->form_options->form_user_field_label) ? RM_UI_Strings::get('LABEL_ROLE_AS') : $form->form_options->form_user_field_label; } } /* * Checking if form is expired */ $data->expired = $service->is_form_expired($form); $data->user_exists = $user_exists; if (isset($submissions)) { $data->submissions = $submissions; } $data->curr_symbol = $service->get_setting('currency_symbol'); $data->currency_pos = $service->get_setting('currency_symbol_position'); $data->stat_id = $service->create_stat_entry($params); if ($service->get_setting('theme') == 'matchmytheme') { $data->submit_btn_fgcolor = $form->form_options->form_submit_btn_color; $data->submit_btn_bgcolor = $form->form_options->form_submit_btn_bck_color; } else { $data->submit_btn_fgcolor = null; $data->submit_btn_bgcolor = null; } $data->expiry_details = $service->get_form_expiry_stats($form); $view = $this->mv_handler->setView("user_form", true); return $view->read($data); } }
<div class="rmagic"> <div class="operationsbar"> <!-- <div class="icons"> <img alt="" src="<?php echo plugin_dir_url(dirname(dirname(__FILE__))) . 'images/supporticon.png'; ?> "> </div> --> <div class="rmtitle"><?php echo RM_UI_Strings::get('TITLE_FIELD_STAT_PAGE'); ?> </div> </div> <div class="rm-upgrade-note-gold"> <div class="rm-banner-title">Unlock the power of Field Analytics by upgrading<img src="<?php echo RM_IMG_URL . 'logo.png'; ?> "> </div> <div class="rm-banner-subtitle">Choose from two powerful extension bundles</div> <div class="rm-banner-box"><a href="http://registrationmagic.com/?download_id=317&edd_action=add_to_cart" target="blank"><img src="<?php echo RM_IMG_URL . 'silver-logo.png'; ?> "></a> </div> <div class="rm-banner-box"><a href="http://registrationmagic.com/?download_id=19544&edd_action=add_to_cart" target="blank"><img src="<?php echo RM_IMG_URL . 'gold-logo.png'; ?> "></a>
</a> <a href="<?php echo '?page=rm_paypal_field_manage&rm_field_id=' . $field_data->field_id . '&rm_action=delete"'; ?> "><?php echo RM_UI_Strings::get("LABEL_DELETE"); ?> </a> </div> </div> </li> <?php } } else { echo "<div class='rmnotice'>" . RM_UI_Strings::get('NO_PRICE_FIELDS_MSG') . "</div>"; } ?> </ul> </form> <div class="rm-upgrade-note-gold"> <div class="rm-banner-title">Unlock multiple pricing configurations by upgrading<img src="<?php echo RM_IMG_URL . 'logo.png'; ?> "> </div> <div class="rm-banner-subtitle">Choose from two powerful extension bundles</div> <div class="rm-banner-box"><a href="http://registrationmagic.com/?download_id=317&edd_action=add_to_cart" target="blank"><img src="<?php echo RM_IMG_URL . 'silver-logo.png'; ?> "></a>
public function get_all_user_data($page = '1', $number = '20', $search_str = '', $user_status = 'all', $interval = 'all', $user_ids = array()) { $offset = $page * $number - $number; $all_user_info = $this->get_users($offset, $number, $search_str, $user_status, $interval, $user_ids); $all_user_data = array(); foreach ($all_user_info as $user) { $tmpuser = new stdClass(); $user_info = get_userdata($user->ID); $is_disabled = (int) get_user_meta($user->ID, 'rm_user_status', true); $tmpuser->ID = $user->ID; // echo'<pre>';var_dump($user_info);die; if (empty($user_info->display_name)) { $tmpuser->first_name = $user_info->first_name; } else { $tmpuser->first_name = $user_info->display_name; } if (isset($user_info->user_email)) { $tmpuser->user_email = $user_info->user_email; } else { $tmpuser->user_email = ''; } if ($is_disabled == 1) { $tmpuser->user_status = RM_UI_Strings::get('LABEL_DEACTIVATED'); } else { $tmpuser->user_status = RM_UI_Strings::get('LABEL_ACTIVATED'); } $tmpuser->date = $user_info->user_registered; $all_user_data[] = $tmpuser; } return $all_user_data; }
public function callback($payment_status, $rm_pproc_id) { switch ($payment_status) { case 'success': if ($rm_pproc_id) { $log_id = $rm_pproc_id; $log = RM_DBManager::get_row('PAYPAL_LOGS', $log_id); if ($log) { if ($log->log) { $paypal_log = maybe_unserialize($log->log); $payment_status = $paypal_log['payment_status']; if ($payment_status == 'Completed') { echo '<div id="rmform">'; echo "<div class='rminfotextfront'>" . RM_UI_Strings::get("MSG_PAYMENT_SUCCESS") . "</br>"; echo '</div></div>'; return 'success'; } else { if ($payment_status == 'Denied' || $payment_status == 'Failed' || $payment_status == 'Refunded' || $payment_status == 'Reversed' || $payment_status == 'Voided') { echo '<div id="rmform">'; echo "<div class='rminfotextfront'>" . RM_UI_Strings::get("MSG_PAYMENT_FAILED") . "</br>"; echo '</div></div>'; return 'failed'; } else { if ($payment_status == 'In-Progress' || $payment_status == 'Pending' || $payment_status == 'Processed') { echo '<div id="rmform">'; echo "<div class='rminfotextfront'>" . RM_UI_Strings::get("MSG_PAYMENT_PENDING") . "</br>"; echo '</div></div>'; return 'pending'; } else { if ($payment_status == 'Canceled_Reversal') { return 'canceled_reversal'; } } } } } } } return false; case 'cancel': echo '<div id="rmform">'; echo "<div class='rminfotextfront'>" . RM_UI_Strings::get("MSG_PAYMENT_CANCEL") . "</br>"; echo '</div></div>'; return; case 'ipn': $trasaction_id = $_POST["txn_id"]; $payment_status = $_POST["payment_status"]; $cstm = $_POST["custom"]; $abcd = explode("|", $cstm); $user_id = (int) $abcd[1]; $acbd = explode("|", $cstm); $log_entry_id = (int) $acbd[0]; //$_POST["custom"]; $log_array = maybe_serialize($_POST); $curr_date = RM_Utilities::get_current_time(); // date_i18n(get_option('date_format')); RM_DBManager::update_row('PAYPAL_LOGS', $log_entry_id, array('status' => $payment_status, 'txn_id' => $trasaction_id, 'posted_date' => $curr_date, 'log' => $log_array), array('%s', '%s', '%s', '%s')); if ($this->paypal->validate_ipn()) { //IPN is valid, check payment status and process logic if ($payment_status == 'Completed') { if ($user_id) { $gopt = new RM_Options(); if ($gopt->get_value_of('user_auto_approval') == "yes") { $user_service = new RM_User_Services(); $user_service->activate_user_by_id($user_id); } } return 'success'; } else { if ($payment_status == 'Denied' || $payment_status == 'Failed' || $payment_status == 'Refunded' || $payment_status == 'Reversed' || $payment_status == 'Voided') { return 'failed'; } else { if ($payment_status == 'In-Progress' || $payment_status == 'Pending' || $payment_status == 'Processed') { return 'pending'; } else { if ($payment_status == 'Canceled_Reversal') { return 'canceled_reversal'; } } } } return 'unknown'; } return 'invalid_ipn'; } }
$form->addElement(new Element_Select("<b>" . RM_UI_Strings::get('LABEL_CC_LIST') . ":</b>", "cc_list", array(0 => "cc_list"), array("id" => "cc_list", "disabled" => "disabled", "value" => "", "longDesc" => RM_UI_Strings::get('HELP_ADD_FORM_CC_LIST')))); $form->addElement(new Element_Select("<b>" . RM_UI_Strings::get('LABEL_EMAIL') . ":</b>", "email", array(0 => "Email"), array("id" => "email", "disabled" => "disabled", "value" => "", "longDesc" => RM_UI_Strings::get('HELP_ADD_FIELD_CC')))); $form->addElement(new Element_Select("<b>" . RM_UI_Strings::get('FIRST_NAME') . ":</b>", "first_name", array(0 => "first name"), array("id" => "first_name", "disabled" => "disabled", "value" => "", "longDesc" => RM_UI_Strings::get('HELP_ADD_FIELD_CC')))); $form->addElement(new Element_Select("<b>" . RM_UI_Strings::get('LAST_NAME') . ":</b>", "last_name", array(0 => "last name"), array("id" => "last_name", "disabled" => "disabled", "value" => "", "longDesc" => RM_UI_Strings::get('HELP_ADD_FIELD_CC')))); $form->addElement(new Element_Select("<b>" . RM_UI_Strings::get('LABEL_MNAME') . ":</b>", "middle_name", array(0 => "middle name"), array("id" => "middle_name", "disabled" => "disabled", "value" => "", "longDesc" => RM_UI_Strings::get('HELP_ADD_FIELD_CC')))); $form->addElement(new Element_Select("<b>" . RM_UI_Strings::get('LABEL_COMPANY') . ":</b>", "company_name", array(0 => "company name"), array("id" => "company_name", "disabled" => "disabled", "value" => "", "longDesc" => RM_UI_Strings::get('HELP_ADD_FIELD_CC')))); $form->addElement(new Element_Select("<b>" . RM_UI_Strings::get('LABEL_JOB_TILE') . ":</b>", "job_title", array(0 => "job title"), array("id" => "job_title", "disabled" => "disabled", "value" => "", "longDesc" => RM_UI_Strings::get('HELP_ADD_FIELD_CC')))); $form->addElement(new Element_Select("<b>" . RM_UI_Strings::get('LABEL_WORK_PHONE') . ":</b>", "work_phone", array(0 => "work phone"), array("id" => "work_phone", "disabled" => "disabled", "value" => "", "longDesc" => RM_UI_Strings::get('HELP_ADD_FIELD_CC')))); $form->addElement(new Element_Select("<b>" . RM_UI_Strings::get('LABEL_CELL_PHONE') . ":</b>", "cell_phone", array(0 => "cell phone"), array("id" => "cell_phone", "disabled" => "disabled", "value" => "", "longDesc" => RM_UI_Strings::get('HELP_ADD_FIELD_CC')))); $form->addElement(new Element_Select("<b>" . RM_UI_Strings::get('LABEL_HOME_PHONE') . ":</b>", "home_phone", array(0 => "home phone"), array("id" => "home_phone", "disabled" => "disabled", "value" => "", "longDesc" => RM_UI_Strings::get('HELP_ADD_FIELD_CC')))); //$form->addElement(new Element_Select("<b>" . RM_UI_Strings::get('LABEL_FAX') . ":</b>", "fax",$data->field_array['phone'], array("id" => "fax", "value" =>isset($data->model->form_options->cc_relations->fax) ?$data->model->form_options->cc_relations->fax : "" , "longDesc"=>RM_UI_Strings::get('HELP_ADD_FIELD_CC')))); //$form->addElement(new Element_Select("<b>" . RM_UI_Strings::get('LABEL_ADDRESS') . ":</b>", "address",$data->field_array['address'], array("id" => "address", "value" =>isset($data->model->form_options->cc_relations->address) ?$data->model->form_options->cc_relations->address : "" , "longDesc"=>RM_UI_Strings::get('HELP_ADD_FIELD_CC')))); //$form->addElement(new Element_Select("<b>" . RM_UI_Strings::get('LABEL_CREATED_DATE') . ":</b>", "created_date",$data->field_array['date'], array("id" => "created_date", "value" =>isset($data->model->form_options->cc_relations->created_date) ?$data->model->form_options->cc_relations->created_date : "" , "longDesc"=>RM_UI_Strings::get('HELP_ADD_FIELD_CC')))); $form->addElement(new Element_Checkbox("<b>" . RM_UI_Strings::get('LABEL_OPT_IN_CB') . ":</b>", "form_is_opt_in_checkbox_cc", array(1 => ""), array("id" => "rm_", "class" => "rm_op", "disabled" => "disabled", "value" => "", "longDesc" => RM_UI_Strings::get('HELP_OPT_IN_CB_CC')))); $form->addElement(new Element_HTML('<div class="childfieldsrow" id="rm_op_childfieldsrow" >')); $form->addElement(new Element_Textbox("<b>" . RM_UI_Strings::get('LABEL_OPT_IN_CB_TEXT') . ":</b>", "form_opt_in_text_cc", array("id" => "rm_form_name", "disabled" => "disabled", "value" => "", "longDesc" => RM_UI_Strings::get('HELP_OPT_IN_CB_TEXT')))); $form->addElement(new Element_HTML('</div>')); $form->addElement(new Element_HTML('</div>')); $form->addElement(new Element_HTMLL('← Cancel', '?page=rm_form_sett_manage&rm_form_id=' . $data->form_id, array('class' => 'cancel'))); $form->render(); ?> </div> <div class="rm-upgrade-note-gold"> <div class="rm-banner-title">Integrate with your Constant contact account and more by upgrading<img src="<?php echo RM_IMG_URL . 'logo.png'; ?> "> </div> <div class="rm-banner-subtitle">Choose from two powerful extension bundles</div> <div class="rm-banner-box"><a href="http://registrationmagic.com/?download_id=317&edd_action=add_to_cart" target="blank"><img src="<?php echo RM_IMG_URL . 'silver-logo.png'; ?>
$form->addElement(new Element_Hidden("rm_slug", "rm_login_form")); $form->addElement(new Element_Textbox("<b>" . RM_UI_Strings::get('LABEL_USERNAME') . ":</b>", "username", array("required" => "1"))); $form->addElement(new Element_Password("<b>" . RM_UI_Strings::get('LABEL_PASSWORD') . ":</b>", "password", array("required" => 1))); $form->addElement(new Element_Checkbox(RM_UI_Strings::get('LABEL_REMEMBER'), "remember", array(1 => ""), array("value" => 1))); /* * Checking if recpatcha is enabled */ if (get_option('rm_option_enable_captcha') == "yes") { $form->addElement(new Element_Captcha()); } $form->addElement(new Element_Button(RM_UI_Strings::get('LABEL_LOGIN'), "submit", array("id" => "rm_submit_btn", "class" => "rm_btn rm_login_btn", "name" => "submit"))); $form->addElement(new Element_HTML('<div class="rm_forgot_pass"><a href="' . wp_lostpassword_url() . '" target="blank">' . RM_UI_Strings::get('MSG_LOST_PASS') . '</a></div>')); /* * Render the form if user is not logged in */ ?> <div class='rmagic'> <div class='rmcontent'> <?php if (!is_user_logged_in()) { $form->render(); echo $data->facebook_html; } else { echo '<div class="rm_notice">' . RM_UI_Strings::get('LOGGED_STATUS') . '</div>'; } ?> </div> </div>
public function edit($model, RM_User_Services $service, $request, $params) { if (isset($request->req['user_id'])) { if ($this->mv_handler->validateForm("rm_edit_user")) { if (isset($request->req['user_password']) && isset($request->req['user_password_conf'])) { if ($request->req['user_password'] && $request->req['user_password_conf'] && $request->req['user_id']) { $service->reset_user_password($request->req['user_password'], $request->req['user_password_conf'], $request->req['user_id']); } $service->set_user_role($request->req['user_id'], $request->req['user_role']); } else { die(RM_UI_Strings::get('MSG_USER_PASS_NOT_SET')); } $this->view($model, $service, $request, $params); } else { if (!isset($request->req['rm_submitted'])) { $this->mv_handler->clearFormErrors("rm_edit_user"); } $view_data = new stdClass(); $view_data->user = $service->get_user_by('id', $request->req['user_id']); $view_data->roles = RM_Utilities::user_role_dropdown(false); $view = $this->mv_handler->setView('user_edit'); $view->render($view_data); } } }
<?php /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ $form = new Form("add-field"); $form->configure(array("prevent" => array("bootstrap", "jQuery"), "action" => "")); $form->addElement(new Element_HTML('<div class="rmheader">' . RM_UI_Strings::get("TITLE_EDIT_FIELD_PAGE") . '</div>')); $form->addElement(new Element_Hidden("field_id", $data->model->field_id)); $form->addElement(new Element_Hidden("form_id", $data->form_id)); $form->addElement(new Element_Hidden("field_is_required", 1)); $form->addElement(new Element_Textbox("<b>" . RM_UI_Strings::get('LABEL_SELECT_TYPE') . ":</b>", "primary_field_type", array("id" => "rm_field_type_select_primary", "disabled" => "1", "value" => 'Email', "class" => "rm_static_field rm_required", "longDesc" => RM_UI_Strings::get('HELP_ADD_PRIMARY_FIELD_EMAIL')))); $form->addElement(new Element_Hidden('field_type', 'Email')); $form->addElement(new Element_Textbox("<b>" . RM_UI_Strings::get('LABEL_LABEL') . ":</b>", "field_label", array("class" => "rm_static_field rm_required", "required" => "1", "value" => $data->model->field_label, "longDesc" => RM_UI_Strings::get('HELP_ADD_FIELD_LABEL')))); $form->addElement(new Element_Textbox("<b>" . RM_UI_Strings::get('LABEL_PLACEHOLDER_TEXT') . ":</b>", "field_placeholder", array("id" => "rm_field_placeholder", "class" => "rm_static_field rm_text_type_field rm_input_type", "value" => $data->model->field_options->field_placeholder, "longDesc" => RM_UI_Strings::get('HELP_ADD_FIELD_PLACEHOLDER')))); $form->addElement(new Element_Textbox("<b>" . RM_UI_Strings::get('LABEL_CSS_CLASS') . ":</b>", "field_css_class", array("id" => "rm_field_class", "class" => "rm_static_field rm_required", "value" => $data->model->field_options->field_css_class, "longDesc" => RM_UI_Strings::get('HELP_ADD_FIELD_CSS_CLASS')))); //Button Area $form->addElement(new Element_HTMLL('← Cancel', '?page=rm_field_manage&rm_form_id=' . $data->form_id, array('class' => 'cancel'))); $form->addElement(new Element_Button(RM_UI_Strings::get('LABEL_SAVE'), "submit", array("id" => "rm_submit_btn", "class" => "rm_btn", "name" => "submit"))); $form->render();
$total = $data->expiry_details->sub_limit; $rem = $data->expiry_details->remaining_subs; $wtot = 100; $rem = $rem * 100 / $total; $done = 100 - $rem; if ($data->expiry_details->criteria == 'subs') { $exp_str .= '<div class="rm-formcard-expired">' . ($data->expiry_details->sub_limit - $data->expiry_details->remaining_subs) . ' out of ' . $data->expiry_details->sub_limit . ' filled' . '</div>'; } break; case 'date': $exp_str .= '<div class="rm-formcard-expired">' . $data->expiry_details->remaining_days . ' days to go' . '</div>'; break; } } $exp_str .= '</div>'; echo $exp_str; } /* * ****** End expiry drama ************ */ $form->render(); } ?> </div> <?php } else { echo RM_UI_Strings::get('MSG_NO_FIELDS'); } ?> </div>
$form->addElement(new Element_Textbox("<b>" . RM_UI_Strings::get('LABEL_ACTRL_PASS_PASS') . ":</b>", "form_actrl_pass_passphrase", array("value" => $passphrase, "disabled" => 1, "longDesc" => RM_UI_Strings::get('HELP_FORM_ACTRL_PASS_PASS')))); $form->addElement(new Element_HTML('<div class="rmrow" id="rm_jqnotice_row_pass_pass" style="display:none;padding: 0px 20px 0px 20px;min-height: 0px;"><div class="rmfield" for="rm_field_value_options_textarea"><label></label></div><div class="rminput" id="rm_jqnotice_text">' . RM_UI_Strings::get('MSG_INVALID_ACTRL_PASS_PASS') . '</div></div>')); $form->addElement(new Element_HTML("</div>")); //User role based restrictions $form->addElement(new Element_Checkbox("<b>" . RM_UI_Strings::get('LABEL_ACTRL_ROLE_CB') . ":</b>", "form_actrl_role_cb", array(1 => ''), array("id" => "id_form_actrl_role_cb", "value" => $role_cb_value, "onclick" => "actrl_role_click_handler()", "disabled" => 1, "longDesc" => RM_UI_Strings::get('HELP_FORM_ACTRL_ROLE') . RM_UI_Strings::get('MSG_BUY_PRO_BOTH_INLINE')))); if ($role_cb_value) { $form->addElement(new Element_HTML("<div id='form_actrl_role_container' class='childfieldsrow' style='border: 1px solid transparent;'>")); } else { $form->addElement(new Element_HTML("<div id='form_actrl_role_container' class='childfieldsrow' style='display:none;border: 1px solid transparent;'>")); } $form->addElement(new Element_Checkbox("<b>" . RM_UI_Strings::get('LABEL_ACTRL_ROLE_ROLES') . ":</b>", "form_actrl_roles", $data->all_roles, array("id" => "id_form_actrl_date_type", "disabled" => 1, "value" => $roles, "longDesc" => RM_UI_Strings::get('HELP_FORM_ACTRL_ROLE_ROLES')))); $form->addElement(new Element_HTML('<div class="rmrow" id="rm_jqnotice_row_roles" style="display:none;padding: 0px 20px 0px 20px;min-height: 0px;"><div class="rmfield" for="rm_field_value_options_textarea"><label></label></div><div class="rminput" id="rm_jqnotice_text">' . RM_UI_Strings::get('MSG_INVALID_ACTRL_ROLES') . '</div></div>')); $form->addElement(new Element_HTML("</div>")); $form->addElement(new Element_Textbox("<b>" . RM_UI_Strings::get('LABEL_ACTRL_FAIL_MSG') . ":</b>", "form_actrl_fail_msg", array("value" => $fail_msg, "disabled" => 1, "longDesc" => RM_UI_Strings::get('HELP_FORM_ACTRL_FAIL_MSG')))); $form->addElement(new Element_HTMLL('← Cancel', '?page=rm_form_sett_manage&rm_form_id=' . $data->form_id, array('class' => 'cancel'))); $form->addElement(new Element_Button(RM_UI_Strings::get('LABEL_SAVE'), "submit", array("id" => "rm_submit_btn", "class" => "rm_btn", "disabled" => 1, "name" => "submit", "style" => "opacity:0.25"))); $form->render(); ?> </div> <div class="rm-upgrade-note-gold"> <div class="rm-banner-title">Unlock powerful access control and more by upgrading<img src="<?php echo RM_IMG_URL . 'logo.png'; ?> "> </div> <div class="rm-banner-subtitle">Choose from two powerful extension bundles</div> <div class="rm-banner-box"><a href="http://registrationmagic.com/?download_id=317&edd_action=add_to_cart" target="blank"><img src="<?php echo RM_IMG_URL . 'silver-logo.png'; ?> "></a>