Changeset 1385806
- Timestamp:
- 04/03/2016 11:45:55 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
blue-storage/branches/2.0.0/class-blue-storage-settings.php
r1385690 r1385806 26 26 public static $AzureAsDefaultUploadSlug = 'azure_storage_use_for_default_upload'; 27 27 public static $MaxCacheSlug = 'max_cache'; 28 public static $CnameSlug = 'cname'; 28 29 29 30 public static function init() … … 40 41 public static function options_page() 41 42 { 43 if( BlueStorageConst::ALLOW_DELETE_ALL ) 44 { 45 self::delete_files_form(); 46 } 42 47 echo '<form method="post" action="options.php">'; 43 48 do_settings_sections(self::$PluginOptionsPage); … … 58 63 add_settings_field( self::$AzureAsDefaultUploadSlug, 'Use Azure Storage by default', array(get_called_class(), 'input_callback'), self::$PluginOptionsPage, self::$BlueStorageSettingsGroup, array('slug' => self::$AzureAsDefaultUploadSlug, 'type'=> 'checkbox') ); 59 64 add_settings_field( self::$MaxCacheSlug, 'Max cache timeout', array(get_called_class(), 'input_callback'), self::$PluginOptionsPage, self::$BlueStorageSettingsGroup, array('slug' => self::$MaxCacheSlug, 'type' => 'text') ); 65 add_settings_field( self::$CnameSlug, 'URL CNAME', array(get_called_class(), 'input_callback'), self::$PluginOptionsPage, self::$BlueStorageSettingsGroup, array('slug' => self::$CnameSlug, 'type' => 'text') ); 60 66 61 67 //Now register all the settings … … 65 71 register_setting( self::$BlueStorageSettingsGroup, self::$AzureAsDefaultUploadSlug ); 66 72 register_setting( self::$BlueStorageSettingsGroup, self::$MaxCacheSlug ); 73 register_setting( self::$BlueStorageSettingsGroup, self::$CnameSlug ); 67 74 } 68 75 … … 120 127 } 121 128 129 public static function delete_files_form() 130 { 131 echo '<form name = "DeleteAllBlobsForm" style = "margin: 20px;" method = "post" action = "'.$_SERVER['REQUEST_URI'].'"> 132 <input type = "hidden" name = "DeleteAllBlobs" value = "true" /> 133 <input type = "hidden" name = "selected_container" value='.get_option('default_azure_storage_account_container_name').'/> 134 <label style = "font-weight: bold;" > Delete all uploaded files from this site in "'.get_option('default_azure_storage_account_container_name').'"</label > 135 <br/>Yes, I really want to <span id="blue-storage-warning">delete everything</span>. I know this is irreversable. <input type = checkbox name = "confirm"/> 136 <br/> 137 <input type = "submit" value = "Delete All Files" id="blue-storage-red-button"/> 138 </form>'; 139 } 140 122 141 public static function delete_all_uploads() 123 142 {
Note: See TracChangeset
for help on using the changeset viewer.