You are here

function miniorange_saml_export_config in SAML SP 2.0 Single Sign On (SSO) - SAML Service Provider 7

Showing Support form info.

1 string reference to 'miniorange_saml_export_config'
miniorange_saml_menu in ./miniorange_saml.module

File

./miniorange_saml_export_config.inc, line 13

Code

function miniorange_saml_export_config($form, &$form_state) {
  drupal_add_css(drupal_get_path('module', 'miniorange_saml') . '/css/style_settings.css', array(
    'group' => CSS_DEFAULT,
    'every_page' => FALSE,
  ));
  $b_url = Utilities::miniorange_get_baseURL();
  $form['markup_top_head'] = array(
    '#markup' => '<div class="mo_saml_table_layout_1"><div class="mo_saml_table_layout mo_saml_container"><b>
                        <span style="font-size: 17px;">IMPORT/EXPORT CONFIGURATIONS</span></b>
                        <a class="mo_saml_btn mo_saml_btn-primary btn-large mo_saml_restart_button" id="mo_saml_restart_tour_button">Take a Tour</a>
                        <br><br><hr><br/>',
  );
  $form['markup_1s'] = array(
    '#markup' => '<div class="mo_saml_highlight_background_note" style="width: auto" ><p><b>NOTE: </b>This tab will help you to transfer your module configurations when you change your Drupal instance.
                        <br>Example: When you switch from test environment to production.<br>Follow these 3 simple steps to do that:<br>
                        <br><strong>1.</strong> Download module configuration file by clicking on the Download Configuration button given below.
                        <br><strong>2.</strong> Install the module on new Drupal instance.<br><strong>3.</strong> Upload the configuration file in Import module Configurations section.<br>
                        <br><b>And just like that, all your module configurations will be transferred!</b></p></div>',
  );
  $form['mo_markup_top'] = array(
    '#markup' => '<div id="mosaml_vt_import"><br><br><div class="mo_saml_tadble_layout mo_saml_container_3" style="text-align: center;float: left;margin-right: 20px;border: solid 1px #00000024;padding-bottom: 55px;">
                    <div id="mosaml_vt_impexp"><b><span style="font-size: 17px;">EXPORT CONFIGURATION</span></b><br><br><hr><br/><br>',
  );
  if (Utilities::miniorange_saml_is_sp_configured()) {
    $form['miniorange_saml_idp_export'] = array(
      '#type' => 'submit',
      '#value' => t('Download Module Configuration'),
      '#prefix' => '<td>',
      '#suffix' => '</td>',
      '#submit' => array(
        'miniorange_import_export',
      ),
      '#attributes' => array(
        'class' => array(
          'mo_saml_save_mapping_config_button',
        ),
      ),
    );
  }
  else {
    $form['miniorange_saml_idp_export'] = array(
      '#markup' => '<div class="mo_saml_register_message">
	                            Please <a href="' . $b_url . '/admin/config/people/miniorange_saml/sp_setup">configure the module</a> first to export the configurations.
                          </div>',
    );
  }
  $form['miniorange_idp_guide_link_cont'] = array(
    '#markup' => '</div></div><div class="mo_saml_tadble_layout mo_saml_container_3" style="float: left;text-align:center;padding-bottom: 20px;border: solid 1px #00000024;;">
                      <b><span style="font-size: 17px;">IMPORT CONFIGURATION <b><a href="' . Utilities::getLicensePageURL() . '"> [Standard]</a></b></span></b><br><br><hr><br>  ',
  );
  $form['import_Config_file'] = array(
    '#type' => 'file',
    '#disabled' => TRUE,
    '#attributes' => array(
      'id' => 'mosaml_vt_import',
      'style' => 'width: 175px;',
    ),
  );
  $form['miniorange_saml_idp_import'] = array(
    '#type' => 'submit',
    '#value' => t('Upload'),
    '#submit' => array(
      'miniorange_import_Config',
    ),
    '#disabled' => TRUE,
    '#suffix' => '</div></div></div>',
  );
  Utilities::Two_FA_Advertisement($form, $form_state);
  Utilities::AddSupportButton($form, $form_state);
  return $form;
}